ibis.expr.api.NumericColumn.bucket

NumericColumn.bucket(arg, buckets, closed='left', close_extreme=True, include_under=False, include_over=False)

Compute a discrete binning of a numeric array

Parameters
argnumeric array expression
bucketslist
closed{‘left’, ‘right’}, default ‘left’

Which side of each interval is closed. For example buckets = [0, 100, 200] closed = ‘left’: 100 falls in 2nd bucket closed = ‘right’: 100 falls in 1st bucket

close_extremeboolean, default True
Returns
bucketedcoded value expression