uncount

Expand rows by weight

Repeats each row according to a count column or weight expression.

Parameters

Returns

A DataFrame with rows expanded according to the weights.

Examples

uncount(df, $count)
uncount(df, $n, .remove = false)