-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Check for categorical data to histogram #5540
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5540 +/- ##
=======================================
Coverage 88.22% 88.22%
=======================================
Files 302 302
Lines 62179 62187 +8
=======================================
+ Hits 54857 54865 +8
Misses 7322 7322
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The tests fails on Python 3.11 only and I believe its not related to this PR. This should be ready for review. |
@MarcSkovMadsen Change makes good sense to me. Hopefully the tests will now pass (including 3.11) after the merge commit at which point I am happy to see this merge. |
Looks like all tests are now green! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Addresses hvplot/#998 by providing an error message if the user tries to create a
histogram
from categorical data.Before the user would get the error message
numpy.core._exceptions._UFuncNoLoopError: ufunc 'multiply' did not contain a loop with signature matching types (dtype('<U1'), dtype('float64')) -> None
This is not an error message that a new user to python and plotting would be able to make sense of. It takes a long time to realize that theoretically a histogram is for numerical data only. For example users can find plotly express examples of creating "histograms" from categorical data. In their documentation its the second example you see. I think they realized this is a very common use case.