datatable.cut()

New in version 0.11

Cut all the columns from cols by binning their values into equal-width discrete intervals.

Parameters

cols
FExpr

Input data for equal-width interval binning.

nbins
int | List[int]

When a single number is specified, this number of bins will be used to bin each column from cols. When a list or a tuple is provided, each column will be binned by using its own number of bins. In the latter case, the list/tuple length must be equal to the number of columns in cols.

right_closed
bool

Each binning interval is half-open. This flag indicates which side of the interval is closed.

return
FExpr

f-expression that converts input columns into the columns filled with the respective bin ids.

See also

qcut() – function for equal-population binning.