let mut df = df! (
"start" => &[6, 3, 1],
"end" => &[7, 4, 2],
"repeats" => &[1, 0, 2],
)?.sort(["start", "end"], false)?;
How do I repeat each row by the number given in the repeats column?
Here is an example attempt:
df.with_column(
all().repeat_by(col("repeats")).explode()
);
It leads to the error
the trait `AsRef<str>` is not implemented for `Expr`