pandas.Series.size

Return the number of elements in the underlying data.

Examples

Return the number of elements in the underlying data.
import numpy as np
import pandas as pd
from numba import njit


@njit
def series_size():
    series = pd.Series(np.arange(10))

    return series.size  # Expect value: 10


print(series_size())
$ python ./series/series_size.py
10