Skip to content

REGR: groupby with as_index=False on an empty frame #42254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 28, 2021

Conversation

rhshadrach
Copy link
Member

No whatsnew because this was introduced in 1.3

@rhshadrach rhshadrach added Groupby Regression Functionality that used to work in a prior pandas version labels Jun 26, 2021
@rhshadrach rhshadrach added this to the 1.3 milestone Jun 26, 2021
@rhshadrach rhshadrach requested a review from jbrockmendel June 26, 2021 17:10
@@ -1676,7 +1676,8 @@ def _wrap_transformed_output(

def _wrap_agged_manager(self, mgr: Manager2D) -> DataFrame:
if not self.as_index:
index = Index(range(mgr.shape[1]))
rows = mgr.shape[1] if mgr.shape[0] > 0 else 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment here about why, pointing back to the issue/pr?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should strive to move this code inside internal (separate PR for sure)

@jbrockmendel
Copy link
Member

This looks right to me, but merits another pair of eyeballs

@jreback
Copy link
Contributor

jreback commented Jun 28, 2021

this looks good, thanks @rhshadrach

@jreback jreback merged commit 2d69cf6 into pandas-dev:master Jun 28, 2021
@jreback
Copy link
Contributor

jreback commented Jun 28, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jun 28, 2021

Something went wrong ... Please have a look at my logs.

jreback pushed a commit that referenced this pull request Jun 28, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
@rhshadrach rhshadrach deleted the empty_apply branch October 19, 2021 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REGR: 1.3 behavior change with groupby and asindex=False
3 participants