Skip to content

Commit

Permalink
docstring lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed Feb 1, 2023
1 parent bf8ae19 commit 32a606a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions py-polars/polars/internals/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5636,10 +5636,11 @@ def select(
>>> from polars.datatypes import INTEGER_DTYPES
>>> with pl.Config() as cfg:
... cfg.set_auto_structify(True)
... cfg.set_auto_structify(True) # doctest: +IGNORE_RESULT
... df.select(
... is_odd=(pl.col(INTEGER_DTYPES) % 2).suffix("_is_odd"),
... )
...
shape: (3, 1)
┌───────────┐
│ is_odd │
Expand Down Expand Up @@ -5760,10 +5761,11 @@ def with_columns(
by enabling the experimental setting ``Config.set_auto_structify(True)``:
>>> with pl.Config() as cfg:
... cfg.set_auto_structify(True)
... cfg.set_auto_structify(True) # doctest: +IGNORE_RESULT
... df.drop("c").with_columns(
... diffs=pl.col(["a", "b"]).diff().suffix("_diff"),
... )
...
shape: (4, 3)
┌─────┬──────┬─────────────┐
│ a ┆ b ┆ diffs │
Expand Down
6 changes: 4 additions & 2 deletions py-polars/polars/internals/lazyframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1649,10 +1649,11 @@ def select(
>>> from polars.datatypes import INTEGER_DTYPES
>>> with pl.Config() as cfg:
... cfg.set_auto_structify(True)
... cfg.set_auto_structify(True) # doctest: +IGNORE_RESULT
... ldf.select(
... is_odd=(pl.col(INTEGER_DTYPES) % 2).suffix("_is_odd"),
... ).collect()
...
shape: (3, 1)
┌───────────┐
│ is_odd │
Expand Down Expand Up @@ -2559,10 +2560,11 @@ def with_columns(
by enabling the experimental setting ``Config.set_auto_structify(True)``:
>>> with pl.Config() as cfg:
... cfg.set_auto_structify(True)
... cfg.set_auto_structify(True) # doctest: +IGNORE_RESULT
... ldf.drop("c").with_columns(
... diffs=pl.col(["a", "b"]).diff().suffix("_diff"),
... ).collect()
...
shape: (4, 3)
┌─────┬──────┬─────────────┐
│ a ┆ b ┆ diffs │
Expand Down

0 comments on commit 32a606a

Please sign in to comment.