cudf.Series.explode#

Series.explode(ignore_index=False)#

Transform each element of a list-like to a row, replicating index values.

Parameters
ignore_indexbool, default False

If True, the resulting index will be labeled 0, 1, …, n - 1.

Returns
Series

Examples

>>> import cudf
>>> s = cudf.Series([[1, 2, 3], [], None, [4, 5]])
>>> s
0    [1, 2, 3]
1           []
2         None
3       [4, 5]
dtype: list
>>> s.explode()
0       1
0       2
0       3
1    <NA>
2    <NA>
3       4
3       5
dtype: int64