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: Deprecate DataFrame.last and Series.last #53710

Merged
merged 8 commits into from
Jun 21, 2023
Merged

DEPR: Deprecate DataFrame.last and Series.last #53710

merged 8 commits into from
Jun 21, 2023

Conversation

rmhowe425
Copy link
Contributor

@rmhowe425 rmhowe425 marked this pull request as draft June 17, 2023 16:43
@MarcoGorelli MarcoGorelli self-requested a review June 17, 2023 17:30
@rmhowe425
Copy link
Contributor Author

rmhowe425 commented Jun 18, 2023

@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

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

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
Parameters
Parameters
Copy link
Member

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 rmhowe425 marked this pull request as ready for review June 19, 2023 12:13
@rmhowe425
Copy link
Contributor Author

rmhowe425 commented Jun 19, 2023

@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

@rmhowe425 rmhowe425 requested a review from MarcoGorelli June 19, 2023 22:31
@mroeschke mroeschke added the Deprecate Functionality to remove in pandas label Jun 20, 2023
@MarcoGorelli
Copy link
Member

thanks @rmhowe425 - does it work to doctest: skip the failing doctest?

@rmhowe425
Copy link
Contributor Author

rmhowe425 commented Jun 21, 2023

@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?

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

nice one @rmhowe425 !

@MarcoGorelli MarcoGorelli added this to the 2.1 milestone Jun 21, 2023
@MarcoGorelli MarcoGorelli merged commit bc112f6 into pandas-dev:main Jun 21, 2023
punndcoder28 pushed a commit to punndcoder28/pandas that referenced this pull request Jun 21, 2023
* 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()
canthonyscott pushed a commit to canthonyscott/pandas-anthony that referenced this pull request Jun 23, 2023
* 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 Jul 8, 2023
* 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()
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: deprecate DataFrame.last and Series.last
3 participants