Transform each element of list-like to a row.
For arrays that do not contain list-like elements the default implementation of this method just returns a copy and an array of ones (unchanged index).
Array with the exploded values.
The original lengths of each list-like for determining the resulting index.
See also
Series.explodeThe method on the Series object that this extension array method is meant to support.
Examples
>>> import pyarrow as pa
>>> a = pd.array([[1, 2, 3], [4], [5, 6]],
... dtype=pd.ArrowDtype(pa.list_(pa.int64())))
>>> a._explode()
(<ArrowExtensionArray>
[1, 2, 3, 4, 5, 6]
Length: 6, dtype: int64[pyarrow], array([3, 1, 2], dtype=int32))
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.api.extensions.ExtensionArray._explode.html