-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Compatpandas objects compatability with Numpy or Python functionspandas objects compatability with Numpy or Python functionsIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves
Milestone
Description
This should also be noted in the docstring for the method.
Currently, it sometimes returns numpy arrays:
>>> pd.DatetimeIndex(['2000-01-01', '2000-01-02']).unique()
DatetimeIndex(['2000-01-01', '2000-01-02'], dtype='datetime64[ns]', freq=None)
>>> pd.Index([0, 1, 2]).unique()
array([0, 1, 2])
Most of the work here is probably writing comprehensive tests to check each index type.
Metadata
Metadata
Assignees
Labels
Compatpandas objects compatability with Numpy or Python functionspandas objects compatability with Numpy or Python functionsIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves