Skip to content

Commit

Permalink
Remove hard pandas dependency for melt by using methodcaller (dask#4719)
Browse files Browse the repository at this point in the history
* remove hard pandas dependency for melt by using methodcaller

* move import to the top of the file

* whitespace line
  • Loading branch information
beckernick authored and Jorge Pessoa committed May 14, 2019
1 parent 63d1c2b commit 224d3c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dask/dataframe/reshape.py
Expand Up @@ -8,6 +8,7 @@
from .utils import (
is_categorical_dtype, is_scalar, has_known_categories, PANDAS_VERSION
)
from ..utils import M


###############################################################
Expand Down Expand Up @@ -240,7 +241,7 @@ def melt(frame, id_vars=None, value_vars=None, var_name=None,

from dask.dataframe.core import no_default

return frame.map_partitions(pd.melt, meta=no_default, id_vars=id_vars,
return frame.map_partitions(M.melt, meta=no_default, id_vars=id_vars,
value_vars=value_vars,
var_name=var_name, value_name=value_name,
col_level=col_level, token='melt')

0 comments on commit 224d3c7

Please sign in to comment.