Skip to content

BUG Fix: pd.apply returns a dataframe when empty dataframe instead of a series #47222

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 9 commits into from
Jul 5, 2022

Conversation

weikhor
Copy link
Contributor

@weikhor weikhor commented Jun 4, 2022

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

This broke stuff I think

@datapythonista datapythonista added Bug Apply Apply, Aggregate, Transform, Map labels Jun 16, 2022
@datapythonista
Copy link
Member

The test looks good, but you're applying the fix in the wrong location. Maybe debugging the test code helps you identify where the empty DataFrame is created.

@weikhor weikhor requested a review from mroeschke July 5, 2022 15:16
@mroeschke mroeschke merged commit fa76d81 into pandas-dev:main Jul 5, 2022
@mroeschke
Copy link
Member

Thanks @weikhor

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
@weikhor weikhor deleted the apply_empty_dataframe branch August 4, 2022 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apply Apply, Aggregate, Transform, Map Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: pd.apply returns a dataframe when empty dataframe instead of a series
4 participants