Skip to content

Commit

Permalink
docs(python): Add warning to count methods on null (#8698)
Browse files Browse the repository at this point in the history
  • Loading branch information
zundertj authored May 7, 2023
1 parent 726cc99 commit eac6696
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions py-polars/polars/dataframe/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@ def count(self) -> DF:
"""
Count the number of values in each group.
.. warning::
`null` is deemed a value in this context.
Examples
--------
>>> df = pl.DataFrame(
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 @@ -1124,6 +1124,9 @@ def count(self) -> Self:
"""
Count the number of values in this expression.
.. warning::
`null` is deemed a value in this context.
Examples
--------
>>> df = pl.DataFrame({"a": [8, 9, 10], "b": [None, 4, 4]})
Expand Down
3 changes: 3 additions & 0 deletions py-polars/polars/functions/lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ def count(column: str | Series | None = None) -> Expr | int:
"""
Count the number of values in this column/context.
.. warning::
`null` is deemed a value in this context.
Parameters
----------
column
Expand Down
3 changes: 3 additions & 0 deletions py-polars/polars/lazyframe/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ def count(self) -> LDF:
"""
Count the number of values in each group.
.. warning::
`null` is deemed a value in this context.
Examples
--------
>>> ldf = pl.DataFrame(
Expand Down

0 comments on commit eac6696

Please sign in to comment.