You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [11]: df = pd.DataFrame([[1, 3], [2, 3]])
In [12]: df.groupby(1).transform('mean')
Out[12]:
0
0 1
1 1
In [13]: df.groupby(1).mean() # converts when it's a normal groupby mean
Out[13]:
0
1
3 1.5
Previously `transform` output was always the same dtype as the groupby
object. This allows the output dtype to differ from the input. Fixespandas-dev#9807.
http://stackoverflow.com/a/29437332/1240268
The text was updated successfully, but these errors were encountered: