- API reference
- Series
- pandas.Serie...
pandas.Series.struct.explode#
- Series.struct.explode()[source]#
Extract all child fields of a struct as a DataFrame.
- Returns:
- pandas.DataFrame
The data corresponding to all child fields.
See also
Series.struct.field
Return a single child field as a Series.
Examples
>>>importpyarrowaspa>>>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.explode() version project0 1 pandas1 2 pandas2 1 numpy
On this page