[//]: # (title: explode) Splits list-like values in given columns and spreads them vertically. Values in other columns are duplicated. ```text explode(dropEmpty = true) [ { columns } ] ``` **Reverse operation:** [`implode`](implode.md) See [column selectors](ColumnSelectors.md) for how to select the columns for this operation. **Parameters:** * `dropEmpty` — if `true`, removes rows with empty lists or [`DataFrame`](DataFrame.md) objects. Otherwise, they will be exploded into `null`. **Available for:** * [`DataFrame`](DataFrame.md) * [`FrameColumn`](DataColumn.md#framecolumn) * `DataColumn` Exploded columns will change their types: * `List` to `T` * [`DataFrame`](DataFrame.md) to [`DataRow`](DataRow.md) Exploded [`FrameColumn`](DataColumn.md#framecolumn) will be converted into [`ColumnGroup`](DataColumn.md#columngroup). Explode [`DataFrame`](DataFrame.md): ```kotlin val df = dataFrameOf("a", "b")( 1, listOf(1, 2), 2, listOf(3, 4), ) df.explode("b") ``` When several columns are exploded in one operation, lists in different columns will be aligned. ```kotlin val a by columnOf(listOf(1, 2), listOf(3, 4, 5)) val b by columnOf(listOf(1, 2, 3), listOf(4, 5)) val df = dataFrameOf(a, b) df.explode { a and b } ``` Explode [`DataColumn`](DataColumn.md): ```kotlin val col by columnOf(listOf(1, 2), listOf(3, 4)) col.explode() ``` Explode [`FrameColumn`](DataColumn.md#framecolumn): ```kotlin val col by columnOf( dataFrameOf("a", "b")(1, 2, 3, 4), dataFrameOf("a", "b")(5, 6, 7, 8), ) col.explode() ```