-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Conversation
Was there an existing issue discussing this too? |
no |
There was a problem hiding this 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") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm @mroeschke
Thanks @jbrockmendel |
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
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.