Detail: IndexGO: Constructor#
Overview: IndexGO: Constructor
- IndexGO.__init__(labels, /, *, loc_is_iloc=False, name=<object object>, dtype=None, sort_status=SortStatus.UNKNOWN)#
Initializer.
- Parameters:
labels – An iterable of unique, hashable values, or another
IndexorIndexHierarchy, 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_difference(*others)#
Construct a new Index based on the difference with Index, containers, or NumPy arrays. Retains order.
>>> ix1 = sf.IndexGO.from_labels(('a', 'b', 'c', 'd', 'e'), name='x') >>> ix2 = sf.IndexGO.from_labels(('c', 'd', 'e', 'f'), name='y') >>> sf.IndexGO.from_difference(ix1, ix2) <IndexGO> a b <<U1>
- classmethod IndexGO.from_intersection(*others)#
Construct a new Index based on the intersection with Index, containers, or NumPy arrays. Identical comparisons retain order.
>>> ix1 = sf.IndexGO.from_labels(('a', 'b', 'c', 'd', 'e'), name='x') >>> ix2 = sf.IndexGO.from_labels(('c', 'd', 'e', 'f'), name='y') >>> sf.IndexGO.from_intersection(ix1, ix2) <IndexGO> c d e <<U1>
- classmethod IndexGO.from_labels(labels, /, *, name=None)#
Construct an
Indexfrom an iterable of labels, where each label is a hashable. Provided for a compatible interface toIndexHierarchy.>>> 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>
- classmethod IndexGO.from_union(*others)#
Construct a new Index based on the union with Index, containers, or NumPy arrays. Identical comparisons retain order.
>>> ix1 = sf.IndexGO.from_labels(('a', 'b', 'c', 'd', 'e'), name='x') >>> ix2 = sf.IndexGO.from_labels(('c', 'd', 'e', 'f'), name='y') >>> sf.IndexGO.from_union(ix1, ix2) <IndexGO> a b c d e f <<U1>
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 | Accessor Type Clinic