pandas.Series.shape

Return a tuple of the shape of the underlying data.

Examples

Return a tuple of the shape of the underlying data.
import numpy as np
import pandas as pd
from numba import njit


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

    return series.shape  # Expect (10,)


print(series_shape())
$ python ./series/series_shape.py
(10,)