pandas.Series.struct.dtypes#

Series.struct.dtypes[source]#

Return the dtype object of each child field of the struct.

The returned Series is indexed by the field names of the struct and contains the corresponding ArrowDtype for each field.

Returns:
pandas.Series

The data type of each child field.

See also

Series.dtype

Return the dtype object of the underlying data.

Examples

>>> import pyarrow as pa
>>> s = pd.Series(
...     [
...         {"version": 1, "project": "pandas"},
...         {"version": 2, "project": "pandas"},
...         {"version": 1, "project": "numpy"},
...     ],
...     dtype=pd.ArrowDtype(
...         pa.struct([("version", pa.int64()), ("project", pa.string())])
...     ),
... )
>>> s.struct.dtypes
version     int64[pyarrow]
project    string[pyarrow]
dtype: object