-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
BugError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasgood first issue
Description
xref #42358
See the next code (and ascending
provided as a string, not boolean):
>>> pandas.DataFrame({'col': [3, 1, 2]}).sort_values(by='col', ascending='False')
col
1 1
2 2
0 3
This should fail in the same way as in Series
:
>>> pandas.Series([3, 1, 2]).sort_values(ascending='False')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-f05e80474e4f> in <module>
----> 1 pandas.Series([3, 1, 2]).sort_values(ascending='False')
~/miniconda3/envs/ibis-dev/lib/python3.7/site-packages/pandas/core/series.py in sort_values(self, axis, ascending, inplace, kind, na_position, ignore_index, key)
3254
3255 if not is_bool(ascending):
-> 3256 raise ValueError("ascending must be boolean")
3257
3258 if na_position not in ["first", "last"]:
ValueError: ascending must be boolean
Metadata
Metadata
Assignees
Labels
BugError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasgood first issue