# dask.dataframe.Series.explode

#### Series.explode()

Transform each element of a list-like to a row.

This docstring was copied from pandas.Series.explode.

Some inconsistencies with the Dask version may exist.

This method expands list-like elements so that each item in the list
gets its own row, while non-list-like elements remain unchanged.
The index is duplicated for the expanded rows.

* **Parameters:**
  **ignore_index**
  : If True, the resulting index will be labeled 0, 1, …, n - 1.
* **Returns:**
  Series
  : Exploded lists to rows; index will be duplicated for these rows.

#### SEE ALSO
[`Series.str.split`](dask.dataframe.Series.str.split.html.md#dask.dataframe.Series.str.split)
: Split string values on specified separator.

`Series.unstack`
: Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame.

[`DataFrame.melt`](dask.dataframe.DataFrame.melt.html.md#dask.dataframe.DataFrame.melt)
: Unpivot a DataFrame from wide format to long format.

[`DataFrame.explode`](dask.dataframe.DataFrame.explode.html.md#dask.dataframe.DataFrame.explode)
: Explode a DataFrame from list-like columns to long format.

### Notes

This routine will explode list-likes including lists, tuples, sets,
Series, and np.ndarray. The result dtype of the subset rows will
be object. Scalars will be returned unchanged, and empty list-likes will
result in an np.nan for that row. In addition, the ordering of elements in
the output will be non-deterministic when exploding sets.

Reference [the user guide](https://pandas.pydata.org/pandas-docs/stable/user_guide/reshaping.html#reshaping-explode) for more examples.

### Examples

```pycon
>>> s = pd.Series([[1, 2, 3], "foo", [], [3, 4]])
>>> s
0    [1, 2, 3]
1          foo
2           []
3       [3, 4]
dtype: object
```

```pycon
>>> s.explode()
0      1
0      2
0      3
1    foo
2    NaN
3      3
3      4
dtype: object
```

<!-- !! processed by numpydoc !! -->
