xorbits.pandas.Index#
- class xorbits.pandas.Index(*args, **kwargs)[source]#
Immutable sequence used for indexing and alignment.
The basic object storing axis labels for all pandas objects.
Changed in version 2.0.0(pandas): Index can hold all numpy numeric dtypes (except float16). Previously only int64/uint64/float64 dtypes were accepted.
- Parameters
data (array-like (1-dimensional) (Not supported yet)) –
dtype (NumPy dtype (default: object) (Not supported yet)) – If dtype is None, we find the dtype that best fits the data. If an actual dtype is provided, we coerce to that dtype if it’s safe. Otherwise, an error will be raised.
copy (bool (Not supported yet)) – Make a copy of input ndarray.
name (object (Not supported yet)) – Name to be stored in the index.
tupleize_cols (bool (default: True) (Not supported yet)) – When True, attempt to create a MultiIndex if possible.
See also
RangeIndexIndex implementing a monotonic integer range.
CategoricalIndexIndex of
Categoricals.MultiIndexA multi-level, or hierarchical Index.
IntervalIndexAn Index of
Intervals.DatetimeIndexIndex of datetime64 data.
TimedeltaIndexIndex of timedelta64 data.
PeriodIndexIndex of Period data.
Notes
An Index instance can only contain hashable objects. An Index instance can not hold numpy float16 dtype.
Examples
>>> pd.Index([1, 2, 3]) Index([1, 2, 3], dtype='int64')
>>> pd.Index(list('abc')) Index(['a', 'b', 'c'], dtype='object')
>>> pd.Index([1, 2, 3], dtype="uint8") Index([1, 2, 3], dtype='uint8')
This docstring was copied from pandas.
Methods
__init__(*args, **kwargs)Attributes
data