w3resource

Pandas DataFrame property: size

DataFrame - size property

The size property is used to get 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.

Syntax:

DataFrame.size

Example:


Download the above Notebook from here.

Previous: DataFrame - ndim property
Next: DataFrame - shape property