Detail: Index: Attribute

Overview: Index: Attribute

Index.STATIC = True
>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.STATIC
True
Index.depth = 1
>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.depth
1
Index.dtype

Return the dtype of the underlying NumPy array.

Returns:

numpy.dtype

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.dtype
<U1
Index.index_types

Return a Series of Index classes for each index depth.

Returns:

Series

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.index_types
<Series>
<Index>
x        <Index>
<<U1>    <object>
Index.memory

Return a MemoryDisplay, providing the size in memory of this object. For compound containers, component sizes will also be provided. Size can be interpreted through six combinations of three configurations:

L: Local: memory ignoring referenced array data provided via views. LM: Local Materialized: memory where arrays that are locally owned report their byte payload LMD: Local Materialized Data: locally owned memory of arrays byte payloads, excluding all other components

R: Referenced: memory including referenced array data provided via views RM: Referenced Materialized: memory where arrays that are locally owned or referenced report their byte payload RMD: Referenced Materialized Data: localy owned and referenced array byte payloads, excluding all other components

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.memory
          L   Lu    LM  LMu   LMD LMDu  R    Ru    RM   RMu   RMD RMDu
Name      50  B     50  B     50  B     50   B     50   B     50  B
Map       520 B     520 B     520 B     520  B     520  B     520 B
Labels    132 B     148 B     20  B     132  B     148  B     20  B
Positions 112 B     128 B     0   B     8.22 KB    168  B     40  B
Total     938 B     970 B     714 B     9.03 KB    1010 B     754 B
Index.mloc

The memory location, represented as an integer, of the underlying NumPy array.

Index.name

A hashable label attached to this container.

Returns:

Hashable

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.name
x
Index.names

Provide a suitable iterable of names for usage in output formats that require a field name as string for the index.

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.names
('x',)
Index.nbytes

Return the total bytes of the underlying NumPy array.

Returns:

int

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.nbytes
20
Index.ndim

Return the number of dimensions.

Returns:

int

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.ndim
1
Index.positions

Return the immutable positions array.

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.positions
[0 1 2 3 4]
Index.shape

Return a tuple describing the shape of the underlying NumPy array.

Returns:

tp.Tuple[int]

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.shape
(5,)
Index.size

Return the size of the underlying NumPy array.

Returns:

int

>>> ix = sf.Index(('a', 'b', 'c', 'd', 'e'), name='x')
>>> ix.size
5

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