Index objects#
Index#
Many of these methods or variants thereof are available on the objects that contain an index (Series/DataFrame) and those should most likely be used before calling these methods directly.
|
Immutable sequence used for indexing and alignment. |
Properties#
dtype of the underlying values in Index. |
|
|
Indicate duplicate index values. |
Return True if there are any NaNs or nulls. |
|
Return boolean if values in the object are monotonically increasing. |
|
Return boolean if values in the object are monotonically decreasing. |
|
Return boolean if values in the object are unique. |
|
Get the name of this object. |
|
Returns a FrozenList containing the name of the Index. |
|
Number of dimensions of the underlying data, by definition 1. |
|
Number of levels. |
|
Get a tuple representing the dimensionality of the Index. |
|
Return the number of elements in the underlying data. |
|
Return a CuPy representation of the DataFrame. |
Modifying and computations#
|
Return whether all elements are True in DataFrame. |
Return whether any elements is True in DataFrame. |
|
|
Make a copy of this object. |
|
Drop duplicate rows in index. |
|
Test whether two objects contain the same elements. |
|
Encode the input values as integer labels. |
Check if the Index only consists of booleans. |
|
Check if the Index holds categorical data. |
|
Check if the Index is a floating type. |
|
Check if the Index only consists of integers. |
|
Check if the Index holds Interval objects. |
|
Check if the Index only consists of numeric data. |
|
Check if the Index is of the object dtype. |
|
|
Return the minimum of the values in the DataFrame. |
|
Return the maximum of the values in the DataFrame. |
|
Alter Index name. |
|
Repeat elements of a Index. |
|
Replace values where the condition is False. |
|
Return a new index containing the rows specified by indices |
|
Return unique values in the index. |
|
Return count of unique values for the column. |
Compatibility with MultiIndex#
|
Set Index or MultiIndex name. |
Missing values#
|
Fill null values with |
|
Drop null rows from Index. |
Identify missing values. |
|
Identify missing values. |
|
Identify non-missing values. |
|
Identify non-missing values. |
Memory usage#
|
Return the memory usage of an object. |
Conversion#
|
Create an Index with values cast to dtypes. |
|
Generate an object from a serialized representation. |
|
Perform device-side deserialization tasks. |
Serialize data and metadata associated with device memory. |
|
|
Perform device-side deserialization tasks. |
Serialize data and metadata associated with host memory. |
|
Generate an equivalent serializable representation of an object. |
|
Convert to a PyArrow Array. |
|
|
Convert the Frame to a CuPy array. |
|
Convert the Frame to a NumPy array. |
|
Create a Series with both index and values equal to the index keys. |
|
Create a DataFrame with a column containing this Index |
|
Convert to a Pandas Index. |
Converts a cuDF object into a DLPack tensor. |
|
|
Convert from a Pandas Index. |
|
Create from PyArrow Array/ChunkedArray. |
Sorting#
|
Return the integer indices that would sort the index. |
Translate a label-based slice to an index-based slice |
|
|
Find indices where elements should be inserted to maintain order |
|
Return a sorted copy of the index, and optionally return the indices that sorted the index itself. |
Time-specific operations#
|
Not yet implemented |
Combining / joining / set operations#
|
Append a collection of Index objects together. |
|
Form the union of two Index objects. |
|
Form the intersection of two Index objects. |
|
Compute join_index and indexers to conform data structures to the new index. |
|
Return a new Index with elements from the index that are not in other. |
Selecting#
|
Compute indexer and mask for new index given the current index. |
|
Return an Index of values for requested level. |
|
Get integer location, slice or boolean mask for requested label. |
|
Calculate slice bound that corresponds to given label. |
|
Return a boolean array where the index values are in values. |
String Operations#
Vectorized string functions for Series and Index. |
Numeric Index#
|
Immutable Index implementing a monotonic integer range. |
The value of the start parameter (0 if this was not supplied). |
|
The value of the stop parameter. |
|
The value of the step parameter. |
|
Convert to a numpy array. |
|
Convert to a suitable Arrow object. |
CategoricalIndex#
|
A categorical of orderable values that represent the indices of another Column |
Categorical components#
The category codes of this categorical. |
|
The categories of this categorical. |
Modifying and computations#
|
Test whether two objects contain the same elements. |
IntervalIndex#
|
Immutable index of intervals that are closed on the same side. |
IntervalIndex components#
|
Construct an IntervalIndex from an array of splits. |
Return a CuPy representation of the DataFrame. |
|
|
Compute indexer and mask for new index given the current index. |
Get integer location, slice or boolean mask for requested label. |
MultiIndex#
|
A multi-level or hierarchical index. |
MultiIndex constructors#
|
Convert arrays to MultiIndex. |
|
Convert list of tuples to MultiIndex. |
|
Make a MultiIndex from the cartesian product of multiple iterables. |
|
Make a MultiIndex from a DataFrame. |
|
Convert from PyArrow Table to Frame |
MultiIndex properties#
Returns a FrozenList containing the name of the Index. |
|
Returns list of levels in the MultiIndex |
|
Returns the codes of the underlying MultiIndex. |
|
Integer number of levels in this MultiIndex. |
MultiIndex components#
|
Create a DataFrame with the levels of the MultiIndex as columns. |
|
Removes the specified levels from the MultiIndex. |
|
Swap level i with level j. |
MultiIndex selecting#
|
Compute indexer and mask for new index given the current index. |
|
Get integer location, slice or boolean mask for requested label. |
|
Return the values at the requested level |
DatetimeIndex#
|
Immutable , ordered and sliceable sequence of datetime64 data, represented internally as int64. |
Time/date components#
The year of the datetime. |
|
The month as January=1, December=12. |
|
The day of the datetime. |
|
The hours of the datetime. |
|
The minutes of the datetime. |
|
The seconds of the datetime. |
|
The microseconds of the datetime. |
|
The nanoseconds of the datetime. |
|
The day of the year, from 1-365 in non-leap years and from 1-366 in leap years. |
|
The day of the year, from 1-365 in non-leap years and from 1-366 in leap years. |
|
The day of the week with Monday=0, Sunday=6. |
|
The day of the week with Monday=0, Sunday=6. |
|
Integer indicator for which quarter of the year the date belongs in. |
|
Boolean indicator if the date belongs to a leap year. |
|
Returns a DataFrame with the year, week, and day calculated according to the ISO 8601 standard. |
Time-specific operations#
|
Perform round operation on the data to the specified freq. |
|
Perform ceil operation on the data to the specified freq. |
|
Perform floor operation on the data to the specified freq. |
Convert tz-aware datetimes from one time zone to another. |
|
|
Localize timezone-naive data to timezone-aware data. |
Conversion#
|
Create a Series with both index and values equal to the index keys. |
|
Create a DataFrame with a column containing this Index |
TimedeltaIndex#
|
Immutable, ordered and sliceable sequence of timedelta64 data, represented internally as int64. |
Components#
Number of days for each element. |
|
Number of seconds (>= 0 and less than 1 day) for each element. |
|
Number of microseconds (>= 0 and less than 1 second) for each element. |
|
Number of nanoseconds (>= 0 and less than 1 microsecond) for each element. |
|
Return a dataframe of the components (days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds) of the Timedeltas. |
|
Infers frequency of TimedeltaIndex. |
Conversion#
|
Create a Series with both index and values equal to the index keys. |
|
Create a DataFrame with a column containing this Index |