beam
beam copied to clipboard
GroupBy.describe generates an incorrect proxy
Root cause is https://github.com/pandas-dev/pandas/issues/41575
In the Series groupby case proxy generation raises an error. In the DataFrame case it produces a Series, when it should produce a DataFrame with the expected columns.
Imported from Jira BEAM-12366. Original Jira may contain additional context. Reported by: bhulette.
.take-issue
On pandas 2.2/2.3 the proxy no longer raises, but its index loses the group-key names, so for example to_pcollection(df.groupby(['c', 'd']).a.describe()[['count', 'mean']], include_indexes=True) raises "Encountered an unnamed index".