Detail: IndexHierarchyGO: Selector

Overview: IndexHierarchyGO: Selector

IndexHierarchyGO[key]()
IndexHierarchyGO.__getitem__ = <function IndexHierarchy.__getitem__>
>>> ih = sf.IndexHierarchyGO.from_labels((('a', 1024, True), ('a', 2048, True), ('a', 2048, False), ('b', 1024, True)), name='x')
>>> ih
<IndexHierarchyGO: x>
a                     1024    True
a                     2048    True
a                     2048    False
b                     1024    True
<<U1>                 <int64> <bool>
>>> ih[2]
('a', 2048, False)
>>> ih[2:]
<IndexHierarchyGO: x>
a                     2048    False
b                     1024    True
<<U1>                 <int64> <bool>
>>> ih[[0, 3]]
<IndexHierarchyGO: x>
a                     1024    True
b                     1024    True
<<U1>                 <int64> <bool>
IndexHierarchyGO.iloc[key]
iloc
>>> ih = sf.IndexHierarchyGO.from_labels((('a', 1024, True), ('a', 2048, True), ('a', 2048, False), ('b', 1024, True)), name='x')
>>> ih
<IndexHierarchyGO: x>
a                     1024    True
a                     2048    True
a                     2048    False
b                     1024    True
<<U1>                 <int64> <bool>
>>> ih.iloc[2]
('a', 2048, False)
>>> ih.iloc[2:]
<IndexHierarchyGO: x>
a                     2048    False
b                     1024    True
<<U1>                 <int64> <bool>
>>> ih.iloc[[0, 3]]
<IndexHierarchyGO: x>
a                     1024    True
b                     1024    True
<<U1>                 <int64> <bool>
IndexHierarchyGO.loc[key]
loc
>>> ih = sf.IndexHierarchyGO.from_labels((('a', 1024, True), ('a', 2048, True), ('a', 2048, False), ('b', 1024, True)), name='x')
>>> ih
<IndexHierarchyGO: x>
a                     1024    True
a                     2048    True
a                     2048    False
b                     1024    True
<<U1>                 <int64> <bool>
>>> ih.loc[('a', 2048, True)]
('a', 2048, True)
>>> ih.loc[('a', 2048, True):]
<IndexHierarchyGO: x>
a                     2048    True
a                     2048    False
b                     1024    True
<<U1>                 <int64> <bool>
>>> ih.loc[[('a', 2048, True), ('b', 1024, True)]]
<IndexHierarchyGO: x>
a                     2048    True
b                     1024    True
<<U1>                 <int64> <bool>

IndexHierarchyGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic