Skip to content

DEPR: DataFrame.resample axis parameter #51901

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 19 commits into from
Mar 23, 2023

Conversation

dannyi96
Copy link
Contributor

@dannyi96 dannyi96 commented Mar 11, 2023

@dannyi96 dannyi96 marked this pull request as ready for review March 11, 2023 17:10
@mroeschke
Copy link
Member

From the original issue. The rolling axis parameter should be deprecated too

@mroeschke mroeschke added Resample resample method Deprecate Functionality to remove in pandas labels Mar 13, 2023
@dannyi96
Copy link
Contributor Author

/home/runner/micromamba/envs/test/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:
17:2: warning: #warning "Using deprecated NumPy API, 
disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
build finished with problems, 2 warnings.

The docs build seems to have failed.
Is there any such known issue ? ( seems unrelated to the changes made in this PR )

axis = self._get_axis_number(axis)
if axis == 1:
warnings.warn(
"DataFrame.ewm with axis=1 is deprecated. Do "
Copy link
Contributor Author

Choose a reason for hiding this comment

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

one query here -

  1. should we make this message separate for DataFrame vs Series
  2. or use a common generic message without usage of the words DataFrame/Series

Copy link
Member

Choose a reason for hiding this comment

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

You can use f"{type(self).__name__}.ewm with ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice ! will update the PR

@dannyi96 dannyi96 changed the title Depricate DataFrame.resample axis parameter Depricate DataFrame.window, resample axis parameter Mar 16, 2023
@dannyi96 dannyi96 requested a review from mroeschke March 18, 2023 06:31
@dannyi96
Copy link
Contributor Author

dannyi96 commented Mar 22, 2023

seems like this issue has already been worked upon and merged by #51997 ( CC: @jbrockmendel , @mroeschke )
[ I guess except for the resample part ]

@mroeschke
Copy link
Member

Ah yes, sorry @dannyi96. As you mentioned, this PR can still deprecate the axis parameter for resample if you're still interested

@dannyi96 dannyi96 changed the title Depricate DataFrame.window, resample axis parameter DEPR: DataFrame.resample axis parameter Mar 23, 2023
@dannyi96
Copy link
Contributor Author

Ah yes, sorry @dannyi96. As you mentioned, this PR can still deprecate the axis parameter for resample if you're still interested

Sure @mroeschke , have updated the PR

@mroeschke mroeschke added this to the 2.1 milestone Mar 23, 2023
@mroeschke mroeschke merged commit d22d1f2 into pandas-dev:main Mar 23, 2023
@mroeschke
Copy link
Member

Nice thanks @dannyi96

@dannyi96 dannyi96 deleted the depricate_resample branch March 23, 2023 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Resample resample method
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: axis=1 in DataFrame.window, resample
2 participants