Skip to content
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

Revert "DEPR: Deprecate returning a DataFrame in SeriesApply.apply_standard #55189

Merged
merged 5 commits into from
Sep 19, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Sep 18, 2023

Reasons for reverting:

  • This was done for performance reasons, but this kills the use case to unpack nested data (lists for example)
  • The deprecation is poorly done (axis 1 does not emit a warning)
  • There is no documentation what users should do, this is necessary if we deprecate something for performance reasons

#52116

closes #55134

@phofl phofl added this to the 2.1.1 milestone Sep 18, 2023
@mroeschke
Copy link
Member

I'm okay with reverting this for now. Could you link any related open user issues (if available)?

Also might be worth adding a unit test for unpacking nested data with apply.

cc @topper-123

@mroeschke mroeschke added the Apply Apply, Aggregate, Transform, Map label Sep 19, 2023
@phofl
Copy link
Member Author

phofl commented Sep 19, 2023

Added a test and linked the issue in the top post

@mroeschke mroeschke merged commit 5d8cacd into pandas-dev:main Sep 19, 2023
32 of 33 checks passed
@mroeschke
Copy link
Member

Thanks @phofl. This deprecation is probably highly relevant in the PDEP 13 discussion

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Sep 19, 2023
@phofl phofl deleted the revert_apply_dataframe branch September 19, 2023 22:41
@phofl
Copy link
Member Author

phofl commented Sep 19, 2023

yep agree

hedeershowk pushed a commit to hedeershowk/pandas that referenced this pull request Sep 20, 2023
…andard (pandas-dev#55189)

* Revert "DEPR: Deprecate returning a DataFrame in SeriesApply.apply_standard (pandas-dev#52123)"

This reverts commit fe415f5

* Fix tests

* Add whatsnew

* Add whatsnew

* Add test
lithomas1 pushed a commit that referenced this pull request Sep 20, 2023
… a DataFrame in SeriesApply.apply_standard) (#55205)

Backport PR #55189: Revert "DEPR: Deprecate returning a DataFrame in SeriesApply.apply_standard

Co-authored-by: Patrick Hoefler <61934744+phofl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apply Apply, Aggregate, Transform, Map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Don't remove the ability to expand a Series to a DataFrame by applying a function that returns Series
3 participants