-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Plotting ExtensionArrays #27118
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
Plotting ExtensionArrays #27118
Conversation
Hello @andrewgsavage! 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 2019-06-30 07:12:34 UTC |
pandas/plotting/_matplotlib/core.py
Outdated
# in select_dtypes | ||
numeric_dtypes = [dtype for dtype in set(data.dtypes) | ||
if hasattr(dtype, "_is_numeric") and | ||
dtype._is_numeric and |
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.
rather than this i would fix select_dtypes to understand the is_numeric flag of the EA dtype; it’s possible that actually need something more because for example datetimes are not numeric but are allowed for plotting
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.
Agreed that this should be addressed in select_dtypes rather than here.
I'm a bit confused here, df.select_dtypes('number') will not return columns with bool dtype. However is_numeric_dtype(dtype) will return True for bool. Should is_numeric_dtype be used in select_dtypes? |
return frozenset(dtypes.union(extension_dtypes)) | ||
else: | ||
return dtypes | ||
include = add_extension_types(include, np.number, is_numeric_dtype) |
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 quite understand this. Are you unconditionally adding adding an EA if it's considered numeric here?
can you merge master |
Nice idea but looks like this has gone stale and I think has a few dependencies that need to be cleaned up. In any case @andrewgsavage if interested in continuing please ping and can reopen |
git diff upstream/master -u -- "*.py" | flake8 --diff
How do I go about adding tests for that rely on an external module?
Would be something like