-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
DOC: append deprecation #45587
DOC: append deprecation #45587
Conversation
gesoos
commented
Jan 24, 2022
- adds to documentation for Deprecate Series / DataFrame.append #35407
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.
Thanks @gesoos
Should the suggested alternative be pd.concat
instead ofDataFrame/Series.concat
?
Sorry, hurried too much, changed it to pandas.concat and especially added it to the Series.append method too |
pandas/core/frame.py
Outdated
@@ -8936,6 +8936,10 @@ def append( | |||
|
|||
Columns in `other` that are not in the caller are added as new columns. | |||
|
|||
.. deprecated:: 1.4.0 | |||
append is deprecated, |
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 don't know if we need 'append is deprecated'. This IS the append doc-string. We don't do this anywhere else.
Also capital the first letter of the sentence.
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.
@jreback isn't it the same as in lookup
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.lookup.html , where it says
DataFrame.lookup is deprecated
?
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 took inspiration from existing messages that describe the issue. Since append refers to the method, I would not capitalize it.
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.
sure lookup is a full message, this is not.
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 ok if its a full sentence in a similar way.
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.
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.
@gesoos I think if you make it similar to how lookup
is (suggest to use concat instead, and point to the relevant part of the user guide if there is one - check the whatsnew note) it'll be OK
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.
yeah we would like to make these consistent.
@gesoos if you can update |
Updated it, tried linking to the deprecation note in the what's new, but I am not 100% sure the formatting is correct, so let me know and I will fix it |
@gesoos its not necessasry to add that link, not what i meant. its failing: https://github.com/pandas-dev/pandas/runs/5012248628?check_suite_focus=true just make this simple. |
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.
you need to build the doc page, this is still failing.
@gesoos check https://pandas.pydata.org/docs/development/contributing_documentation.html#building-the-documentation and the examples using |
Sorry, this will take me a few more days, I need a new computer and it will only be available tomorrow. Thanks for the hint with the documentation building, was not aware that it's possible! |
@gesoos if you can update |
I think the deprecation was adequately documented in the release notes https://pandas.pydata.org/pandas-docs/dev/whatsnew/v1.4.0.html#deprecated-frame-append-and-series-append and all other documentation was updated appropriately in #44539. The only thing missing is the deprecated tag for the the method itself? having |
sounds good - @gesoos want to update it to this? |
@MarcoGorelli I can update it, but I cannot build the documentation. If you have a more detailed description on how this should work than what can be found here, please let me know... There is a known issue with the Dockerfile, which I already noticed and am using the suggested fix, but it throws
|
Hey - I'd suggest following the conda instructions |
we should do this for 1.4.1 |
sorry @gesoos to mess you around. This was covered in our monthly dev meeting and agreed that a one-liner would be helpful have updated this PR as release is planned for tomorrow. |
pandas/core/frame.py
Outdated
@@ -9031,17 +9034,18 @@ def append( | |||
Returns | |||
------- | |||
DataFrame | |||
A new DataFrame consisting of the rows of caller and the rows of `other`. | |||
A new DataFrame consisting of the rows of caller and the rows of | |||
`other`. |
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.
urgh. this was auto re-wrapped. Can revert for clarity or leave as is.
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.
fine as long as renders ok
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.
hmm seems like the rewarpping didn't work anyway
flake8..........................................................................................................Failed
- hook id: flake8
- exit code: 1
pandas/core/frame.py:9017:89: E501 line too long (116 > 88 characters)
pandas/core/series.py:2884:89: E501 line too long (116 > 88 characters)
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.
fine as long as renders ok
yeah it rendered ok, but have reverted anyway
merge when ready |
am just rebuilding docs after flake8 fixup to be sure. |
Thanks @gesoos |
Co-authored-by: gesoos <66533786+gesoos@users.noreply.github.com>