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

DEPR: kind keyword in resample #55895

Merged
merged 6 commits into from
Nov 30, 2023
Merged

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Nov 9, 2023

@jbrockmendel jbrockmendel added Resample resample method Deprecate Functionality to remove in pandas labels Nov 13, 2023
@mroeschke
Copy link
Member

Was there an existing issue discussing this too?

@jbrockmendel
Copy link
Member Author

no

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

I am on board with this - I don't think this keyword offers any value over the suggested approach

@@ -751,7 +751,8 @@ def test_to_excel_timedelta(self, path):
tm.assert_frame_equal(expected, recons)

def test_to_excel_periodindex(self, tsframe, path):
xp = tsframe.resample("ME", kind="period").mean()
# xp has a PeriodIndex
xp = tsframe.resample("ME").mean().to_period("M")
Copy link
Member

Choose a reason for hiding this comment

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

Does it matter at all that the order of operations here change? Before the conversion to period happened before the mean() call - wonder if there are differences in how those objects implement mean that could cause rounding issues or behavior changes

Copy link
Member Author

Choose a reason for hiding this comment

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

i think the only thing we care about is the xp we get here, since we are checking that it round-trips. i checked manually that this is equivalent to what we have in main

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm @mroeschke

@mroeschke mroeschke added this to the 2.2 milestone Nov 30, 2023
@mroeschke mroeschke merged commit 6093074 into pandas-dev:main Nov 30, 2023
40 checks passed
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the depr-kind branch November 30, 2023 21:59
rapids-bot bot pushed a commit to rapidsai/cudf that referenced this pull request Feb 8, 2024
For comparison:

pandas-dev/pandas#55856
pandas-dev/pandas#55895
pandas-dev/pandas#55499

The `errors="ignore"` parameter is the only one that is implemented so just added a test for that deprecation

Authors:
  - Matthew Roeschke (https://github.com/mroeschke)
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

URL: #14984
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: 'kind' kwd in resample
3 participants