Skip to content

Commit

Permalink
feat: add easy type hints to GroupBy
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCrews authored and cpcloud committed Jun 3, 2023
1 parent 20faac4 commit da330b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ibis/expr/types/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _column_wrapper(self, attr):
else:
return GroupedArray(col, self)

def aggregate(self, metrics=None, **kwds):
def aggregate(self, metrics=None, **kwds) -> ir.Table:
"""Compute aggregates over a group by."""
return self.table.aggregate(metrics, by=self.by, having=self._having, **kwds)

Expand Down Expand Up @@ -159,7 +159,7 @@ def order_by(self, expr: ir.Value | Iterable[ir.Value]) -> GroupedTable:
window=self._window,
)

def mutate(self, *exprs: ir.Value | Sequence[ir.Value], **kwexprs: ir.Value):
def mutate(self, *exprs: ir.Value | Sequence[ir.Value], **kwexprs: ir.Value) -> ir.Table:
"""Return a table projection with window functions applied.
Any arguments can be functions.
Expand Down Expand Up @@ -207,7 +207,7 @@ def mutate(self, *exprs: ir.Value | Sequence[ir.Value], **kwexprs: ir.Value):
exprs = self._selectables(*exprs, **kwexprs)
return self.table.mutate(exprs)

def select(self, *exprs, **kwexprs):
def select(self, *exprs, **kwexprs) -> ir.Table:
"""Project new columns out of the grouped table.
See Also
Expand Down

0 comments on commit da330b1

Please sign in to comment.