-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
DEPR: kind keyword in resample #55895
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
Conversation
|
Was there an existing issue discussing this too? |
|
no |
WillAyd
left a comment
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
| 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
WillAyd
left a comment
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.rstfile if fixing a bug or adding a new feature.