-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
DOC: update copy keyword explanation in astype docstring #63274
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
| mapping, e.g. {col: dtype, ...}, where col is a column label and dtype is | ||
| a numpy.dtype or Python type to cast one or more of the DataFrame's | ||
| columns to column-specific types. | ||
| copy : bool, default False |
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.
Since no one should specify this keyword, we could also just leave out the type part entirely?
| copy : bool, default False | |
| copy |
(probably would need to suppress some numpydoc linting rule for this method, though)
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.
In general for a deprecated parameter, I think we should still keep the type/default/description even if we don't want users to use it. In this case I would update the description to something like
This keyword is now ignored; changing its value will have no impact on the method.
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.
Done
rhshadrach
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
|
Thanks @jorisvandenbossche |
|
Looks good: https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.astype.html Will do the same for the other methods with copy keywords. |
|
-> #63297 |
xref #63144
I just removed the explanation of the keyword entirely (since the keyword is ignored and has no effect anymore), just leaving the deprecation note (and updated that to reflect this is now in effect)