def melt(frame, id_vars=None, value_vars=None, var_name=None, value_name='value', col_level=None):
    '\n    Unpivots a DataFrame from wide format to long format, optionally leaving identifier variables set.\n\n    This function is useful to massage a DataFrame into a format where one or more columns are identifier variables\n    (``id_vars``), while all other columns, considered measured variables (``value_vars``), are "unpivoted" to the row\n    axis, leaving just two non-identifier columns, \'variable\' and \'value\'.\n\n    Parameters\n    ----------\n    frame : DataFrame\n    id_vars : tuple, list, or ndarray, optional\n        Column(s) to use as identifier variables.\n    value_vars : tuple, list, or ndarray, optional\n        Column(s) to unpivot. If not specified, uses all columns that\n        are not set as `id_vars`.\n    var_name : scalar\n        Name to use for the \'variable\' column. If None it uses\n        ``frame.columns.name`` or \'variable\'.\n    value_name : scalar, default \'value\'\n        Name to use for the \'value\' column.\n    col_level : int or string, optional\n        If columns are a MultiIndex then use this level to melt.\n\n    Returns\n    -------\n    DataFrame\n        Unpivoted DataFrame.\n\n    See Also\n    --------\n    pandas.DataFrame.melt\n    '
    from dask.dataframe.core import no_default
    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')
Unpivots a DataFrame from wide format to long format, optionally leaving identifier variables set.

This function is useful to massage a DataFrame into a format where one or more columns are identifier variables
(``id_vars``), while all other columns, considered measured variables (``value_vars``), are "unpivoted" to the row
axis, leaving just two non-identifier columns, 'variable' and 'value'.

Parameters
----------
frame : DataFrame
id_vars : tuple, list, or ndarray, optional
    Column(s) to use as identifier variables.
value_vars : tuple, list, or ndarray, optional
    Column(s) to unpivot. If not specified, uses all columns that
    are not set as `id_vars`.
var_name : scalar
    Name to use for the 'variable' column. If None it uses
    ``frame.columns.name`` or 'variable'.
value_name : scalar, default 'value'
    Name to use for the 'value' column.
col_level : int or string, optional
    If columns are a MultiIndex then use this level to melt.

Returns
-------
DataFrame
    Unpivoted DataFrame.

See Also
--------
pandas.DataFrame.melt
def melt(frame, id_vars=None, value_vars=None, var_name=None, value_name='value', col_level=None):
    '\n    Unpivots a DataFrame from wide format to long format, optionally leaving identifier variables set.\n\n    This function is useful to massage a DataFrame into a format where one or more columns are identifier variables\n    (``id_vars``), while all other columns, considered measured variables (``value_vars``), are "unpivoted" to the row\n    axis, leaving just two non-identifier columns, \'variable\' and \'value\'.\n\n    Parameters\n    ----------\n    frame : DataFrame\n    id_vars : tuple, list, or ndarray, optional\n        Column(s) to use as identifier variables.\n    value_vars : tuple, list, or ndarray, optional\n        Column(s) to unpivot. If not specified, uses all columns that\n        are not set as `id_vars`.\n    var_name : scalar\n        Name to use for the \'variable\' column. If None it uses\n        ``frame.columns.name`` or \'variable\'.\n    value_name : scalar, default \'value\'\n        Name to use for the \'value\' column.\n    col_level : int or string, optional\n        If columns are a MultiIndex then use this level to melt.\n\n    Returns\n    -------\n    DataFrame\n        Unpivoted DataFrame.\n\n    See Also\n    --------\n    pandas.DataFrame.melt\n    '
    from dask.dataframe.core import no_default
    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')