modin.pandas.DataFrame.melt¶
- DataFrame.melt(id_vars=None, value_vars=None, var_name=None, value_name='value', col_level=None, ignore_index=True) DataFrame[source]¶
Unpivot a
DataFramefrom wide to long format, optionally leaving identifiers set.- Parameters:
id_vars (list of identifiers to retain in the result) –
value_vars (list of columns to unpivot on) – defaults to all columns, excluding the id_vars columns
var_name (variable name, defaults to "variable") –
value_name (value name, defaults to "value") –
col_level (int, not implemented) –
ignore_index (bool) –
- Returns:
unpivoted on the value columns
- Return type:
Examples