Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Open
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversions
Description
In [1]: importpandasaspdIn [2]: s=pd.Series([1, 2, "1"]) ...: s.sort_values() TypeError: '<'notsupportedbetweeninstancesof'str'and'int'In [3]: s=pd.Series([1, 2]) ...: s.searchsorted("1") Out[3]: 0In [4]: importnumpyasnpIn [5]: arr=np.array([1, 2]) In [6]: arr.searchsorted("1") Out[6]: 0Looks like we are mirroring this behavior from numpy, but since Series does not support sorting incomparable objects then it seems like searchsorted with incomparable objects should raise too
Metadata
Metadata
Assignees
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversions