pandas.Index¶
-
class
pandas.
Index
¶ Immutable ndarray implementing an ordered, sliceable set. The basic object storing axis labels for all pandas objects
Parameters: data : array-like (1-dimensional)
dtype : NumPy dtype (default: object)
copy : bool
Make a copy of input ndarray
name : object
Name to be stored in the index
tupleize_cols : bool (default: True)
When True, attempt to create a MultiIndex if possible
Notes
An Index instance can only contain hashable objects
Attributes
T
return the transpose, which is by definition self asi8
base
return the base object if the memory of the underlying data is shared data
return the data pointer of the underlying data dtype
dtype_str
flags
has_duplicates
hasnans
inferred_type
is_all_dates
is_monotonic
alias for is_monotonic_increasing (deprecated) is_monotonic_decreasing
return if the index is monotonic decreasing (only equal or is_monotonic_increasing
return if the index is monotonic increasing (only equal or is_unique
itemsize
return the size of the dtype of the item of the underlying data name
names
nbytes
return the number of bytes in the underlying data ndim
return the number of dimensions of the underlying data, by definition 1 nlevels
shape
return a tuple of the shape of the underlying data size
return the number of elements in the underlying data strides
return the strides of the underlying data values
return the underlying data as an ndarray Methods