Detail: IndexYear: Dictionary-Like

Overview: IndexYear: Dictionary-Like

IndexYear.__contains__(value)[source]

Return True if value in the labels. Will only return True for an exact match to the type of dates stored within.

>>> ix = sf.IndexYear(('1517', '1520', '1518'))
>>> ix.__contains__('a')
ValueError('Error parsing datetime string "a" at position 0')
>>> ix = sf.IndexYear(('1517', '1520', '1518'))
>>> ix.__contains__('1518')
True
IndexYear.__iter__()

Iterate over labels.

>>> ix = sf.IndexYear(('1517', '1520', '1518'))
>>> tuple(ix.__iter__())
(numpy.datetime64('1517'), numpy.datetime64('1520'), numpy.datetime64('1518'))
>>> ix = sf.IndexYear(('1517', '1520', '1518'))
>>> tuple(ix.__iter__())
(numpy.datetime64('1517'), numpy.datetime64('1520'), numpy.datetime64('1518'))
IndexYear.__reversed__()

Returns a reverse iterator on the index labels.

>>> ix = sf.IndexYear(('1517', '1520', '1518'))
>>> tuple(ix.__reversed__())
(numpy.datetime64('1518'), numpy.datetime64('1520'), numpy.datetime64('1517'))
>>> ix = sf.IndexYear(('1517', '1520', '1518'))
>>> tuple(ix.__reversed__())
(numpy.datetime64('1518'), numpy.datetime64('1520'), numpy.datetime64('1517'))
IndexYear.values

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

>>> ix = sf.IndexYear(('1517', '1520', '1518'))
>>> ix.values_at_depth(0)
['1517' '1520' '1518']

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