BUG: df.groupby(axis=1).size()
returns weird output
#48738
Labels
Milestone
df.groupby(axis=1).size()
returns weird output
#48738
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
In the example, I think that starting on 1.5,
.size()
is providing multi-columnDataFrame
(instead ofSeries
) with all columns equal to each other (and names identical to originaldf
columns).I wonder if that change is intentional, I sure hope it's not.
Output of the reproducer on pandas 1.5
Expected Behavior
Expected output (on pandas 1.4.4)
Installed Versions
pd.show_versions()
The text was updated successfully, but these errors were encountered: