pandas.Index.shape#
- property Index.shape[source]#
Return a tuple of the shape of the underlying data.
See also
Index.sizeReturn the number of elements in the underlying data.
Index.ndimNumber of dimensions of the underlying data, by definition 1.
Index.dtypeReturn the dtype object of the underlying data.
Index.valuesReturn 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,)