pandas.Index.shape — pandas 3.0.0rc0+33.g1fd184de2a documentation (original) (raw)
Return a tuple of the shape of the underlying data.
See also
Return the number of elements in the underlying data.
Number of dimensions of the underlying data, by definition 1.
Return the dtype object of the underlying data.
Return an array representing the data in the Index.
Examples
idx = pd.Index([1, 2, 3]) idx Index([1, 2, 3], dtype='int64') idx.shape (3,)