-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: add note to docstring about dtype
keyword when creating Series from abother Series
#59300
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: add note to docstring about dtype
keyword when creating Series from abother Series
#59300
Conversation
78bc8d4
to
82ca349
Compare
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.
A warning would be too noisy. A note in the docs would be sufficient.
82ca349
to
d478473
Compare
When creating Series from another Series `dtype` keyword is ignored. See GH pandas-dev#59060. Add note to the docstring to underline this behaviour to Series and DataFrame constructors.
d478473
to
9591092
Compare
Undo the previous changes and add a note to the |
dtype
keyworddtype
keyword when creating Series from abother Series
Co-authored-by: Matthew Roeschke <[email protected]>
Thanks @taranarmo |
I was going to comment that I find this a bit surprising behaviour, and so whether we shouldn't rather consider this as a bug instead of documenting it. But from a quick check, it seems that the
Here it does cast the float series to an int64 dtype, so the Will also comment on the issue, but so it seems the simple "If |
dtype
keyword when creating Series from abother Seriesdtype
keyword when creating Series from abother Series
IIUC I agree with Joris. The solution is not to change the doc, but to make the behavior consistent. The dtype kwarg should never be silently ignored. |
When creating Series from another Series
dtype
keyword is not not used. Add note ondtype
keyword to Series and DataFrame constructor. See GH #59060.doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.