modin.pandas.DataFrame.index

property DataFrame.index[source]

Get the index for this Series/DataFrame.

Returns:

The index for this Series/DataFrame.

Return type:

Index

Note

When setting DataFrame.index or Series.index where the length of the Series/DataFrame object does not match with the new index’s length, pandas raises a ValueError. Snowpark pandas does not raise this error; this operation is valid. When the Series/DataFrame object is longer than the new index, the Series/DataFrame’s new index is filled with NaN values for the “extra” elements. When the Series/DataFrame object is shorter than the new index, the extra values in the new index are ignored—Series and DataFrame stay the same length n, and use only the first n values of the new index.