Skip to content

cumsum sums the groupby column #5614

Closed
@hayd

Description

@hayd

It shouldn't sum the groupby'd col (in fact index col should be the index, if groupby as_index).

In [13]: df = pd.DataFrame([[1, 2, np.nan], [1, np.nan, 9], [3, 4, 9]], columns=['A', 'B', 'C'])

In [14]: g = df.groupby('A')

In [16]: g.cumsum()
Out[16]: 
   A   B   C
0  1   2 NaN
1  2 NaN   9
2  3   4   9

[3 rows x 3 columns]

Nature of it being dispatch. Should fix up for 0.14 possibly along with some other whitelisted groupby functions.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions