How would I go about renaming the index on a dask dataframe? I tried it like so
df.index.name = 'foo'
but rechecking df.index.name shows it still being whatever it was previously.
How would I go about renaming the index on a dask dataframe? I tried it like so
df.index.name = 'foo'
but rechecking df.index.name shows it still being whatever it was previously.
A bit late, but the following functions:
import dask.dataframe as dd
import pandas as pd
df = pd.DataFrame().assign(s=[1, 2], o=[3, 4], p=[5, 6]).set_index("si")
ddf = dd.from_pandas(df, npartitions=2)
ddf.index = ddf.index.rename("si2")
I hope this can help someone else out!