-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Plotting Int64 columns with nulled integers (NAType) fails #32073 #32387
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
Thanks @jeandersonbc However, before this PR can be accepted, you need to write tests / make sure you don't break existing ones - see contributing to the code base:
|
Thanks for the feedback @MarcoGorelli! I'm wondering whether the example provided in the related issue (first comment in #32073) would be sufficient to be added as a test in the |
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 for working on this. We'll need a test and a release note in 1.1.0.rst.
if values.isna().any().all(): | ||
values = values.astype(float) | ||
|
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.
It seems like date-like data can be included here, and we don't want to convert those to floats.
I think this should be restricted to
if is_integer_dtype(values.dtype):
values = values.to_numpy(dtype="float", na_value=np.nan)
According to https://docs.python.org/3/library/pickle.html#object.__reduce__, > If a string is returned, the string should be interpreted as the name > of a global variable. It should be the object’s local name relative to > its module; the pickle module searches the module namespace to determine > the object’s module. This behaviour is typically useful for singletons. Closes #31847
Co-authored-by: Simon Hawkins <[email protected]>
well, I'm going to close this pull request and work in a single branch as this was not the first time that I messed up after updating my branch |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff