O'Reilly logo

Learning pandas - Second Edition by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The size and shape of a Series

The number of items in a Series object can be determined by several techniques, the first of which is by using the Python len() function:

The same result can be obtained by using the .size property:

An alternate form for getting the size of a Series is to use the .shape property. This returns a two-value tuple, but with only the first value specified and representing the size:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required