Skip to content

Commit

Permalink
docs(python): Update filter description to clarify that null evaluati…
Browse files Browse the repository at this point in the history
…ons are removed (#16632)
  • Loading branch information
mcrumiller authored Jun 1, 2024
1 parent 8710274 commit a9badd6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4181,6 +4181,8 @@ def filter(
The original order of the remaining rows is preserved.
Rows where the filter does not evaluate to True are discarded, including nulls.
Parameters
----------
predicates
Expand Down
3 changes: 3 additions & 0 deletions py-polars/polars/expr/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4560,6 +4560,9 @@ def filter(
The original order of the remaining elements is preserved.
Elements where the filter does not evaluate to True are discarded, including
nulls.
Mostly useful in an aggregation context. If you want to filter on a DataFrame
level, use `LazyFrame.filter`.
Expand Down
2 changes: 2 additions & 0 deletions py-polars/polars/lazyframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2865,6 +2865,8 @@ def filter(
The original order of the remaining rows is preserved.
Rows where the filter does not evaluate to True are discarded, including nulls.
Parameters
----------
predicates
Expand Down
3 changes: 3 additions & 0 deletions py-polars/polars/series/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3177,6 +3177,9 @@ def filter(self, predicate: Series | list[bool]) -> Self:
The original order of the remaining elements is preserved.
Elements where the filter does not evaluate to True are discarded, including
nulls.
Parameters
----------
predicate
Expand Down

0 comments on commit a9badd6

Please sign in to comment.