Improve error message in Series.any and Series.all, when bool_only is passed and not level #38810
Labels
Bug
Error Reporting
Incorrect or improved errors from pandas
Reduction Operations
sum, mean, min, max, etc.
Uh oh!
There was an error while loading. Please reload this page.
When working on xref #30999 I came across TestSeriesReductions.test_all_any_params in pandas/tests/reductions/test_reductions.py
It showed that calling the following code:
would raise a
NotImplementedError
with the error message "Series.any does not implement numeric_only", and equivalent for callings.all
the same way. This error message is confusing because the user didn't passnumeric_only
, they passedbool_only
.So the messages need to change to "Series.any does not implement bool_only" and "Series.all does not implement bool_only".
The text was updated successfully, but these errors were encountered: