From e3c4f300734239aa41b2ee8e45930cd1876477d4 Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Mon, 27 May 2024 20:56:20 +0200 Subject: [PATCH] Update doctests --- py-polars/polars/dataframe/frame.py | 2 +- py-polars/polars/expr/expr.py | 2 +- py-polars/polars/lazyframe/frame.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/py-polars/polars/dataframe/frame.py b/py-polars/polars/dataframe/frame.py index cbb3c5ed23df..21d3b6e8281a 100644 --- a/py-polars/polars/dataframe/frame.py +++ b/py-polars/polars/dataframe/frame.py @@ -6496,7 +6496,7 @@ def join( │ 3 ┆ 8.0 ┆ c ┆ null ┆ null │ └──────┴──────┴──────┴───────┴───────────┘ - >>> df.join(other_df, on="ham", how="left") + >>> df.join(other_df, on="ham", how="left", coalesce=True) shape: (3, 4) ┌─────┬─────┬─────┬───────┐ │ foo ┆ bar ┆ ham ┆ apple │ diff --git a/py-polars/polars/expr/expr.py b/py-polars/polars/expr/expr.py index debc5e3ac886..ddb3702118b0 100644 --- a/py-polars/polars/expr/expr.py +++ b/py-polars/polars/expr/expr.py @@ -6245,7 +6245,7 @@ def interpolate(self, method: InterpolationMethod = "linear") -> Self: ... ) # Interpolate from this to the new grid >>> df_new_grid = pl.DataFrame({"grid_points": range(1, 11)}) >>> df_new_grid.join( - ... df_original_grid, on="grid_points", how="left" + ... df_original_grid, on="grid_points", how="left", coalesce=True ... ).with_columns(pl.col("values").interpolate()) shape: (10, 2) ┌─────────────┬────────┐ diff --git a/py-polars/polars/lazyframe/frame.py b/py-polars/polars/lazyframe/frame.py index e272115cd92f..b93436971218 100644 --- a/py-polars/polars/lazyframe/frame.py +++ b/py-polars/polars/lazyframe/frame.py @@ -3980,7 +3980,7 @@ def join( │ null ┆ null ┆ null ┆ z ┆ d │ │ 3 ┆ 8.0 ┆ c ┆ null ┆ null │ └──────┴──────┴──────┴───────┴───────────┘ - >>> lf.join(other_lf, on="ham", how="left").collect() + >>> lf.join(other_lf, on="ham", how="left", coalesce=True).collect() shape: (3, 4) ┌─────┬─────┬─────┬───────┐ │ foo ┆ bar ┆ ham ┆ apple │