Skip to content

Commit

Permalink
Fix the preprocess docstrings copied from pandas
Browse files Browse the repository at this point in the history
Signed-off-by: Deepyaman Datta <deepyaman.datta@utexas.edu>
  • Loading branch information
deepyaman committed Jan 6, 2025
1 parent c1f5eb6 commit e0f868d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pandera/backends/ibis/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def aggregate(self, check_obj: ir.Table):

def preprocess(self, check_obj: Union[ir.Column, ir.Table], key: Optional[str]):
"""Preprocesses a check object before applying the check function."""
# This handles the case of Series validation, which has no other context except
# for the index to groupby on. Right now grouping by the index is not allowed.
# This handles the case of Column validation by promoting it to
# a Table with a single column. Table inputs are unaffected.
return check_obj.as_table()

def apply(self, check_obj: IbisData):
Expand Down
2 changes: 0 additions & 2 deletions pandera/backends/polars/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def aggregate(self, check_obj: pl.LazyFrame):

def preprocess(self, check_obj: pl.LazyFrame, key: Optional[str]):
"""Preprocesses a check object before applying the check function."""
# This handles the case of Series validation, which has no other context except
# for the index to groupby on. Right now grouping by the index is not allowed.
return check_obj

def apply(self, check_obj: PolarsData):
Expand Down

0 comments on commit e0f868d

Please sign in to comment.