Skip to content

Commit

Permalink
remove melt override
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-joshi committed Oct 22, 2024
1 parent f187eb0 commit baced1e
Showing 1 changed file with 0 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1488,42 +1488,6 @@ def mask(
)


# Snowpark pandas has a fix for a pandas behavior change. It is available in Modin 0.30.1 (SNOW-1552497).
@register_dataframe_accessor("melt")
def melt(
self,
id_vars=None,
value_vars=None,
var_name=None,
value_name="value",
col_level=None,
ignore_index=True,
): # noqa: PR01, RT01, D200
"""
Unpivot a ``DataFrame`` from wide to long format, optionally leaving identifiers set.
"""
# TODO: SNOW-1063346: Modin upgrade - modin.pandas.DataFrame functions
if id_vars is None:
id_vars = []
if not is_list_like(id_vars):
id_vars = [id_vars]
if value_vars is None:
value_vars = self.columns.drop(id_vars)
if var_name is None:
columns_name = self._query_compiler.get_index_name(axis=1)
var_name = columns_name if columns_name is not None else "variable"
return self.__constructor__(
query_compiler=self._query_compiler.melt(
id_vars=id_vars,
value_vars=value_vars,
var_name=var_name,
value_name=value_name,
col_level=col_level,
ignore_index=ignore_index,
)
)


# Snowpark pandas does more thorough error checking.
@register_dataframe_accessor("merge")
def merge(
Expand Down

0 comments on commit baced1e

Please sign in to comment.