Skip to content

Returns a column with a separate row for every string character

Source code

Description

Returns a column with a separate row for every string character

Usage

<Expr>$str$explode()

Value

Expr: Series of dtype String.

Examples

library(polars)

df = pl$DataFrame(a = c("foo", "bar"))
df$select(pl$col("a")$str$explode())
#> shape: (6, 1)
#> ┌─────┐
#> │ a   │
#> │ --- │
#> │ str │
#> ╞═════╡
#> │ f   │
#> │ o   │
#> │ o   │
#> │ b   │
#> │ a   │
#> │ r   │
#> └─────┘