get_item¶
- DateTimeIndex.get_item(arg)¶
Retrieves the exact index location of the given argument.
Parameters¶
- argnp.datetime64 or int
The key to retrieve the index for.
Returns¶
- int
The index of the key.
Examples¶
>>> idx = DateTimeIndex(np.array(['2022-01-01', '2022-01-02', '2022-01-03'], dtype='datetime64')) >>> idx.get_item(np.datetime64('2022-01-02')) 1