Improve Series.cut
/ Expr.cut
: Add number of bins as an alternative
#16947
Labels
enhancement
New feature or an improvement of an existing feature
Description
Pandas
cut
andqcut
both allow to specify the "number of bins" (e.g. 4) as alternative to the actual bins as list (e.g. [2, 5, 10])Idea
cut
with number of binsN
:N
bins of equal widthqcut
with number of binsN
:N
bins of equal probabilityPandas
Pandas
qcut
Pandas
cut
Polars
Polars
qcut
(almost equal except that polars uses "inf" bounds at the edges)Polars
cut
💥The text was updated successfully, but these errors were encountered: