- Learning pandas(Second Edition)
- Michael Heydt
- 75字
- 2021-07-02 20:37:10
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: