Detail: IndexYearGO: Dictionary-Like

Overview: IndexYearGO: Dictionary-Like

IndexYearGO.__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.IndexYearGO(('1517', '1520', '1518'))
>>> ix
<IndexYearGO>
1517
1520
1518
<datetime64[Y]>
>>> ix.__contains__('a')
ValueError('Error parsing datetime string "a" at position 0')
>>> ix = sf.IndexYearGO(('1517', '1520', '1518'))
>>> ix
<IndexYearGO>
1517
1520
1518
<datetime64[Y]>
>>> ix.__contains__('1518')
True
IndexYearGO.__iter__()

Iterate over labels.

>>> ix = sf.IndexYearGO(('1517', '1520', '1518'))
>>> ix
<IndexYearGO>
1517
1520
1518
<datetime64[Y]>
>>> tuple(ix.__iter__())
(numpy.datetime64('1517'), numpy.datetime64('1520'), numpy.datetime64('1518'))
>>> ix = sf.IndexYearGO(('1517', '1520', '1518'))
>>> ix
<IndexYearGO>
1517
1520
1518
<datetime64[Y]>
>>> tuple(ix.__iter__())
(numpy.datetime64('1517'), numpy.datetime64('1520'), numpy.datetime64('1518'))
IndexYearGO.__reversed__()

Returns a reverse iterator on the index labels.

>>> ix = sf.IndexYearGO(('1517', '1520', '1518'))
>>> ix
<IndexYearGO>
1517
1520
1518
<datetime64[Y]>
>>> tuple(ix.__reversed__())
(numpy.datetime64('1518'), numpy.datetime64('1520'), numpy.datetime64('1517'))
>>> ix = sf.IndexYearGO(('1517', '1520', '1518'))
>>> ix
<IndexYearGO>
1517
1520
1518
<datetime64[Y]>
>>> tuple(ix.__reversed__())
(numpy.datetime64('1518'), numpy.datetime64('1520'), numpy.datetime64('1517'))
IndexYearGO.values

A 1D NumPy array of the values in the Index. This array will have the same dtype as the container.

>>> ix = sf.IndexYearGO(('1517', '1520', '1518'))
>>> ix
<IndexYearGO>
1517
1520
1518
<datetime64[Y]>
>>> ix.values_at_depth(0)
['1517' '1520' '1518']

IndexYearGO: 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