Detail: Index: Dictionary-Like
Overview: Index: Dictionary-Like
- Index.__contains__(value)[source]
Return True if value in the labels.
>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x') >>> ix <Index: x> a b c d e <<U1> >>> ix.__contains__('a') True
- Index.__iter__()[source]
Iterate over labels.
>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x') >>> ix <Index: x> a b c d e <<U1> >>> tuple(ix.__iter__()) ('a', 'b', 'c', 'd', 'e')
- Index.__reversed__()[source]
Returns a reverse iterator on the index labels.
>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x') >>> ix <Index: x> a b c d e <<U1> >>> tuple(ix.__reversed__()) ('e', 'd', 'c', 'b', 'a')
- Index.values
A 1D NumPy array of the values in the
Index
. This array will have the same dtype as the container.>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x') >>> ix <Index: x> a b c d e <<U1> >>> ix.values_at_depth(0) ['a' 'b' 'c' 'd' 'e']
Index: 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