Skip to content

Groupby mean transform not converting to float #9807

Closed
@hayd

Description

@hayd
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

http://stackoverflow.com/a/29437332/1240268

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions