Example : df = pd.DataFrame([[np.nan,0],[0,1]]) df.groupby(0)[1].cumsum()
out: 0 -1 1 1 which is incorrect
df = pd.DataFrame([[np.nan,0],[0.0,1.0]]) df.groupby(0)[1].cumsum()
out: 0 NaN 1 1.0 which is correct
Problem description
pandas version 0.22.0 when the aggregation key contains nan, the cumulative aggregation of int gives a wrong result on the contrary the aggregation of float works.
Comment From: mroeschke
This looks to work on main and I believe we have tests for this so closing