Detail: IndexMillisecond: Dictionary-Like
Overview: IndexMillisecond: Dictionary-Like
- IndexMillisecond.__contains__(value)
Return True if value in the labels. Will only return True for an exact match to the type of dates stored within.
>>> ix = sf.IndexMillisecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMillisecond> 1517-04-01T00:00:00.000 1517-12-31T00:00:00.000 1517-06-30T00:00:00.000 <datetime64[ms]> >>> ix.__contains__('a') False >>> ix = sf.IndexMillisecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMillisecond> 1517-04-01T00:00:00.000 1517-12-31T00:00:00.000 1517-06-30T00:00:00.000 <datetime64[ms]> >>> ix.__contains__('1517-06-30') False
- IndexMillisecond.__iter__()
Iterate over labels.
>>> ix = sf.IndexMillisecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMillisecond> 1517-04-01T00:00:00.000 1517-12-31T00:00:00.000 1517-06-30T00:00:00.000 <datetime64[ms]> >>> tuple(ix.__iter__()) (np.datetime64('1517-04-01T00:00:00.000'), np.datetime64('1517-12-31T00:00:00.000'), np.datetime64('1517-06-30T00:00:00.000')) >>> ix = sf.IndexMillisecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMillisecond> 1517-04-01T00:00:00.000 1517-12-31T00:00:00.000 1517-06-30T00:00:00.000 <datetime64[ms]> >>> tuple(ix.__iter__()) (np.datetime64('1517-04-01T00:00:00.000'), np.datetime64('1517-12-31T00:00:00.000'), np.datetime64('1517-06-30T00:00:00.000'))
- IndexMillisecond.__reversed__()
Returns a reverse iterator on the index labels.
>>> ix = sf.IndexMillisecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMillisecond> 1517-04-01T00:00:00.000 1517-12-31T00:00:00.000 1517-06-30T00:00:00.000 <datetime64[ms]> >>> tuple(ix.__reversed__()) (np.datetime64('1517-06-30T00:00:00.000'), np.datetime64('1517-12-31T00:00:00.000'), np.datetime64('1517-04-01T00:00:00.000')) >>> ix = sf.IndexMillisecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMillisecond> 1517-04-01T00:00:00.000 1517-12-31T00:00:00.000 1517-06-30T00:00:00.000 <datetime64[ms]> >>> tuple(ix.__reversed__()) (np.datetime64('1517-06-30T00:00:00.000'), np.datetime64('1517-12-31T00:00:00.000'), np.datetime64('1517-04-01T00:00:00.000'))
- IndexMillisecond.values
A 1D NumPy array of the values in the
Index
. This array will have the same dtype as the container.>>> ix = sf.IndexMillisecond(('1517-04-01', '1517-12-31', '1517-06-30')) >>> ix <IndexMillisecond> 1517-04-01T00:00:00.000 1517-12-31T00:00:00.000 1517-06-30T00:00:00.000 <datetime64[ms]> >>> ix.values_at_depth(0) ['1517-04-01T00:00:00.000' '1517-12-31T00:00:00.000' '1517-06-30T00:00:00.000']
IndexMillisecond: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic