pyspark.pandas.MultiIndex.size

property MultiIndex.size

Return an int representing the number of elements in this object.

Examples

>>> df = ps.DataFrame([(.2, .3), (.0, .6), (.6, .0), (.2, .1)],
...                   columns=['dogs', 'cats'],
...                   index=list('abcd'))
>>> df.index.size
4
>>> df.set_index('dogs', append=True).index.size
4