DEPR: Deprecate DataFrame.last and Series.last by rmhowe425 · Pull Request #53710 · pandas-dev/pandas (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation7 Commits8 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
- closes DEPR: deprecate DataFrame.last and Series.last #53692
- Tests added and passed if fixing a bug or adding a new feature
- All code checks passed.
- Added type annotations to new arguments/methods/functions.
- Added an entry in the latest
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.
@MarcoGorelli Is something going on with the CI environment? The tests that are failing for this PR are not failing locally for me when I run pytest.
The same tests also started failing in #53439 this morning after I updated my entry in whatsnew v2.1.0. None of the failing tests seem to have anything to do with whats being changed in the PR hmmmm
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your pr, generally looks good
failures might be unrelated - just got a minor comment, if you address that and then fetch and merge upstream/main then hopefully it'll be resolved
Comment on lines 231 to 232
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to duplicate this
rmhowe425 marked this pull request as ready for review
@MarcoGorelli The Doc build test failure seems to be unrelated
The docstring test is failing because the warning message that I imeplemented is executing. Since this method is being deprecated what would be the recommended solution in this instance?
Should I add an additional note in the docstring to create a mask and filter using .loc
instead of last
and then add code that shows how to do that? I don't believe this was handled in the PR for deprecating series.first and DataFrame.first
thanks @rmhowe425 - does it work to doctest: skip
the failing doctest?
@MarcoGorelli Doc tests passing now. Ready for review. 😄
The two failing unit tests still don't seem to be related to the PR.
Just out of curiosity, when updating doc strings for methods that will be deprecated, is the correct approach to skip doc tests for those methods?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
punndcoder28 pushed a commit to punndcoder28/pandas that referenced this pull request
Adding implementation for deprecation and entry in whatsnew file
Updating unit tests to account for deprecating of series.last() and DataFrame.last()
Added deprecation message in doc string
Adding PR number to new unit test
Removing duplicate "Parameters" docstring header
Adding doctest skip for call to last()
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request
Adding implementation for deprecation and entry in whatsnew file
Updating unit tests to account for deprecating of series.last() and DataFrame.last()
Added deprecation message in doc string
Adding PR number to new unit test
Removing duplicate "Parameters" docstring header
Adding doctest skip for call to last()
phofl mentioned this pull request
5 tasks