ibis.expr.api.NumericColumn.bucket

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

Compute a discrete binning of a numeric array

Parameters
  • arg (numeric array expression) –

  • buckets (list) –

  • 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_extreme (boolean, default True) –

Returns

bucketed

Return type

coded value expression