Skip to content

Groupby-agg on index with known divisions results in unknown divisions #2999

@michcio1234

Description

@michcio1234

I would expect ddf.groupby(ddf.index).sum() to have same divisions as ddf, but they seem to be unknown. Not sure if this is a desired behaviour or if I'm doing something wrong.

In[2]: import pandas as pd
In[3]: import dask.dataframe as dd
In[4]: ddf = dd.from_pandas(pd.DataFrame({'A': [1, 2]}), npartitions=1)
In[5]: ddf.divisions
Out[5]: (0, 1)
In[6]: ddf.groupby(ddf.index).sum().divisions
Out[6]: (None, None)
  • dask 0.16
  • pandas 0.21.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions