pyspark.pandas.Series.size#
- property Series.size#
- Return an int representing the number of elements in this object. - Return the number of rows if Series. Otherwise return the number of rows times number of columns if DataFrame. - Examples - >>> s = ps.Series({'a': 1, 'b': 2, 'c': None}) >>> s.size 3 - >>> df = ps.DataFrame({'col1': [1, 2, None], 'col2': [3, 4, None]}) >>> df.size 6 - >>> df = ps.DataFrame(index=[1, 2, None]) >>> df.size 0