A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pandas.pydata.org/docs/reference/api/pandas.api.extensions.ExtensionArray._explode.html below:

pandas.api.extensions.ExtensionArray._explode — pandas 2.3.1 documentation

pandas.api.extensions.ExtensionArray._explode#
ExtensionArray._explode()[source]#

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).

Returns:
ExtensionArray

Array with the exploded values.

np.ndarray[uint64]

The original lengths of each list-like for determining the resulting index.

See also

Series.explode

The 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))

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4