Detail: IndexGO: Constructor

Overview: IndexGO: Constructor

IndexGO.__init__(labels, *, loc_is_iloc=False, name=<object object>, dtype=None)

Initializer.

Parameters
  • labels – An iterable of unique, hashable values, or another Index or IndexHierarchy, to be used as the labels of the index.

  • name – A hashable object to label the container.

  • loc_is_iloc – Optimization when a contiguous integer index is provided as labels. Generally only set by internal clients.

  • dtype – A value suitable for specyfying a NumPy dtype, such as a Python type (float), NumPy array protocol strings (‘f8’), or a dtype instance.

>>> sf.IndexGO(('a', 'b', 'c', 'd', 'e'), name='x')
<IndexGO: x>
a
b
c
d
e
<<U1>
classmethod IndexGO.from_labels(labels, *, name=None)

Construct an Index from an iterable of labels, where each label is a hashable. Provided for a compatible interface to IndexHierarchy.

>>> sf.IndexGO.from_labels(('a', 'b', 'c', 'd', 'e'), name='x')
<IndexGO: x>
a
b
c
d
e
<<U1>
classmethod IndexGO.from_pandas(value)

Given a Pandas index, return the appropriate IndexBase derived class.

>>> ix = pd.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> sf.IndexGO.from_pandas(ix)
<IndexGO: x>
a
b
c
d
e
<object>

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