From 9424bd9bdf226872a12d7f8ce704ab7d2c0e6001 Mon Sep 17 00:00:00 2001 From: Alexander Beedie Date: Wed, 1 Feb 2023 10:52:57 +0000 Subject: [PATCH] docstring lint --- py-polars/polars/internals/dataframe/frame.py | 6 ++++-- py-polars/polars/internals/lazyframe/frame.py | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/py-polars/polars/internals/dataframe/frame.py b/py-polars/polars/internals/dataframe/frame.py index 907eaedb75da3..38dc8df9e436a 100644 --- a/py-polars/polars/internals/dataframe/frame.py +++ b/py-polars/polars/internals/dataframe/frame.py @@ -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 │ @@ -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 │ diff --git a/py-polars/polars/internals/lazyframe/frame.py b/py-polars/polars/internals/lazyframe/frame.py index c8444a1d90da2..614e92ca92ab3 100644 --- a/py-polars/polars/internals/lazyframe/frame.py +++ b/py-polars/polars/internals/lazyframe/frame.py @@ -1583,7 +1583,7 @@ def select( ... "ham": ["a", "b", "c"], ... } ... ).lazy() - >>> df.select("foo").collect() + >>> ldf.select("foo").collect() shape: (3, 1) ┌─────┐ │ foo │ @@ -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 │ @@ -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 │