-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: fixes plotting with nullable integers (#32073) #32410
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
Co-Authored-By: Tom Augspurger <[email protected]>
Co-Authored-By: Tom Augspurger <[email protected]>
Hello @jeandersonbc! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-03-03 18:33:32 UTC |
Is this still useful? |
if len(data) > 0: | ||
return np.asarray(data) |
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.
Why do you need this check?
{ | ||
"A": [1, 2, 3, 4, 5], | ||
"B": [7, 5, np.nan, 3, 2], | ||
"C": pd.to_datetime(dates, format="%Y"), |
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.
Can you add a datetime with timezone column? That will have an extension dtype.
if len(data) > 0: | ||
return np.asarray(data) | ||
|
||
return data |
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.
Previously we always converted to ndarray. Why aren't we doing that anymore?
|
||
self.data = numeric_data | ||
# GH25587: cast ExtensionArray of pandas (IntegerArray, etc.) to |
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.
why is this not just np.asarray(data)
?
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.
That will result in object dtype with NAs, which matplotlib doesn't understand.
@jeandersonbc can you update and address comments. |
@jeandersonbc closing as stale. ping if you want to continue. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff