ibis.trailing_window

ibis.trailing_window(preceding, group_by=None, order_by=None)

Create a trailing window for use with aggregate window functions.

Parameters
  • preceding (int, float or expression of intervals, i.e.) – ibis.interval(days=1) + ibis.interval(hours=5) Int indicates number of trailing rows to include; 0 includes only the current row, 1 includes the current row and one preceding row. Interval indicates a trailing range window.

  • group_by (expressions, default None) – Either specify here or with TableExpr.group_by

  • order_by (expressions, default None) – For analytic functions requiring an ordering, specify here, or let Ibis determine the default ordering (for functions like rank)

Returns

Return type

Window