Skip to content

Commit

Permalink
docs: Fix flaky doctests (#20516)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemanley authored Jan 1, 2025
1 parent 25fab78 commit 1ebd039
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py-polars/polars/expr/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -10561,15 +10561,15 @@ def bitwise_and(self) -> Expr:
>>> df = pl.DataFrame(
... {"grouper": ["a", "a", "a", "b", "b"], "n": [-1, 0, 1, -1, 1]}
... )
>>> df.group_by("grouper").agg(pl.col("n").bitwise_and())
>>> df.group_by("grouper", maintain_order=True).agg(pl.col("n").bitwise_and())
shape: (2, 2)
┌─────────┬─────┐
│ grouper ┆ n │
│ --- ┆ --- │
│ str ┆ i64 │
╞═════════╪═════╡
│ b ┆ 1 │
│ a ┆ 0 │
│ b ┆ 1 │
└─────────┴─────┘
"""
return self._from_pyexpr(self._pyexpr.bitwise_and())
Expand All @@ -10592,7 +10592,7 @@ def bitwise_or(self) -> Expr:
>>> df = pl.DataFrame(
... {"grouper": ["a", "a", "a", "b", "b"], "n": [-1, 0, 1, -1, 1]}
... )
>>> df.group_by("grouper").agg(pl.col("n").bitwise_or())
>>> df.group_by("grouper", maintain_order=True).agg(pl.col("n").bitwise_or())
shape: (2, 2)
┌─────────┬─────┐
│ grouper ┆ n │
Expand Down Expand Up @@ -10623,7 +10623,7 @@ def bitwise_xor(self) -> Expr:
>>> df = pl.DataFrame(
... {"grouper": ["a", "a", "a", "b", "b"], "n": [-1, 0, 1, -1, 1]}
... )
>>> df.group_by("grouper").agg(pl.col("n").bitwise_xor())
>>> df.group_by("grouper", maintain_order=True).agg(pl.col("n").bitwise_xor())
shape: (2, 2)
┌─────────┬─────┐
│ grouper ┆ n │
Expand Down

0 comments on commit 1ebd039

Please sign in to comment.