Closed
Description
Currently we don't specify what the behaviour should be for ExtensionArray.argsort
when there are missing values.
This is not a huge problem because the Series.sort_values
deals with the missing values itself (only argsorts the non-missing data), but still we should pin down and test the behaviour.
I suppose we should follow numpy's example here and put them last (which is also consistent with the default behaviour of sort_values
):
In [114]: a = np.array([1, 3, 2, np.nan, 4, np.nan])
In [115]: a.argsort()
Out[115]: array([0, 2, 1, 4, 3, 5])