diff --git a/py-polars/polars/dataframe/plotting.py b/py-polars/polars/dataframe/plotting.py index b452e50bfe66..d3d22306abd2 100644 --- a/py-polars/polars/dataframe/plotting.py +++ b/py-polars/polars/dataframe/plotting.py @@ -53,7 +53,7 @@ def bar( `df.plot.bar(**kwargs)` is shorthand for `alt.Chart(df).mark_bar().encode(**kwargs).interactive()`, - and is provided for convenience - for full customisatibility, use a plotting + and is provided for convenience - for full customisability, use a plotting library directly. .. versionchanged:: 1.6.0 diff --git a/py-polars/polars/expr/datetime.py b/py-polars/polars/expr/datetime.py index 62fe84d98137..2705a452bdd9 100644 --- a/py-polars/polars/expr/datetime.py +++ b/py-polars/polars/expr/datetime.py @@ -172,7 +172,7 @@ def truncate(self, every: str | dt.timedelta | Expr) -> Expr: Notes ----- - The `every` argument is created with the + The `every` argument is created with the following string language: - 1ns (1 nanosecond) @@ -306,7 +306,7 @@ def round(self, every: str | dt.timedelta | IntoExprColumn) -> Expr: Notes ----- - The `every` argument is created with the + The `every` argument is created with the following small string formatting language: - 1ns (1 nanosecond) diff --git a/py-polars/polars/expr/expr.py b/py-polars/polars/expr/expr.py index 5c4d294a45c7..fd066efafe8f 100644 --- a/py-polars/polars/expr/expr.py +++ b/py-polars/polars/expr/expr.py @@ -1290,7 +1290,7 @@ def rechunk(self) -> Expr: -------- >>> df = pl.DataFrame({"a": [1, 1, 2]}) - Create a Series with 3 nulls, append column a then rechunk + Create a Series with 3 nulls, append column `a`, then rechunk. >>> df.select(pl.repeat(None, 3).append(pl.col("a")).rechunk()) shape: (6, 1) diff --git a/py-polars/polars/functions/eager.py b/py-polars/polars/functions/eager.py index 72e898250c7b..b06f18f67158 100644 --- a/py-polars/polars/functions/eager.py +++ b/py-polars/polars/functions/eager.py @@ -311,7 +311,7 @@ def _alignment_join( descending: bool | Sequence[bool] = False, ) -> LazyFrame: """Create a single master frame with all rows aligned on the common key values.""" - # note: can stackoverflow if the join becomes too large, so we + # note: can stack overflow if the join becomes too large, so we # collect eagerly when hitting a large enough number of frames post_align_collect = len(idx_frames) >= 250 diff --git a/py-polars/polars/functions/escape_regex.py b/py-polars/polars/functions/escape_regex.py index 1c038347e8af..f2f4b7ca9ae3 100644 --- a/py-polars/polars/functions/escape_regex.py +++ b/py-polars/polars/functions/escape_regex.py @@ -14,7 +14,7 @@ def escape_regex(s: str) -> str: Parameters ---------- s - The string that all of its meta characters will be escaped. + The string whose meta characters will be escaped. """ if isinstance(s, pl.Expr): diff --git a/py-polars/polars/functions/lazy.py b/py-polars/polars/functions/lazy.py index b405b63d5dde..365580b54f3b 100644 --- a/py-polars/polars/functions/lazy.py +++ b/py-polars/polars/functions/lazy.py @@ -789,7 +789,7 @@ def corr( propagate_nans: bool = False, ) -> Expr: """ - Compute the Pearson's or Spearman rank correlation correlation between two columns. + Compute the Pearson's or Spearman rank correlation between two columns. Parameters ---------- diff --git a/py-polars/polars/interchange/dataframe.py b/py-polars/polars/interchange/dataframe.py index c63af632c816..094f22634615 100644 --- a/py-polars/polars/interchange/dataframe.py +++ b/py-polars/polars/interchange/dataframe.py @@ -21,7 +21,7 @@ class PolarsDataFrame(InterchangeDataFrame): Parameters ---------- - column + df The Polars DataFrame backing the dataframe object. allow_copy Allow data to be copied during operations on this column. If set to `False`, diff --git a/py-polars/polars/ml/torch.py b/py-polars/polars/ml/torch.py index f92f2ab30fe9..e913989f332f 100644 --- a/py-polars/polars/ml/torch.py +++ b/py-polars/polars/ml/torch.py @@ -74,7 +74,7 @@ class PolarsDataset(TensorDataset): # type: ignore[misc] ... ) Create a Dataset from a Polars DataFrame, standardising the dtype and - distinguishing the label/feature columns. + separating the label/feature columns. >>> ds = df.to_torch("dataset", label="lbl", dtype=pl.Float32) >>> ds # doctest: +IGNORE_RESULT diff --git a/py-polars/polars/testing/asserts/frame.py b/py-polars/polars/testing/asserts/frame.py index 4ac770368d8f..572f2999d4a8 100644 --- a/py-polars/polars/testing/asserts/frame.py +++ b/py-polars/polars/testing/asserts/frame.py @@ -36,13 +36,13 @@ def assert_frame_equal( right The second DataFrame or LazyFrame to compare. check_row_order - Require row order to match. + Requires row order to match. check_column_order - Require column order to match. + Requires column order to match. check_dtypes - Require data types to match. + Requires data types to match. check_exact - Require float values to match exactly. If set to `False`, values are considered + Requires float values to match exactly. If set to `False`, values are considered equal when within tolerance of each other (see `rtol` and `atol`). Only affects columns with a Float data type. rtol @@ -218,13 +218,13 @@ def assert_frame_not_equal( right The second DataFrame or LazyFrame to compare. check_row_order - Require row order to match. + Requires row order to match. check_column_order - Require column order to match. + Requires column order to match. check_dtypes - Require data types to match. + Requires data types to match. check_exact - Require float values to match exactly. If set to `False`, values are considered + Requires float values to match exactly. If set to `False`, values are considered equal when within tolerance of each other (see `rtol` and `atol`). Only affects columns with a Float data type. rtol diff --git a/py-polars/polars/testing/asserts/series.py b/py-polars/polars/testing/asserts/series.py index e73e1b60697e..4c9f72831bfe 100644 --- a/py-polars/polars/testing/asserts/series.py +++ b/py-polars/polars/testing/asserts/series.py @@ -59,13 +59,13 @@ def assert_series_equal( right The second Series to compare. check_dtypes - Require data types to match. + Requires data types to match. check_names - Require names to match. + Requires names to match. check_order - Require elements to appear in the same order. + Requires elements to appear in the same order. check_exact - Require float values to match exactly. If set to `False`, values are considered + Requires float values to match exactly. If set to `False`, values are considered equal when within tolerance of each other (see `rtol` and `atol`). Only affects columns with a Float data type. rtol @@ -386,13 +386,13 @@ def assert_series_not_equal( right The second Series to compare. check_dtypes - Require data types to match. + Requires data types to match. check_names - Require names to match. + Requires names to match. check_order - Require elements to appear in the same order. + Requires elements to appear in the same order. check_exact - Require float values to match exactly. If set to `False`, values are considered + Requires float values to match exactly. If set to `False`, values are considered equal when within tolerance of each other (see `rtol` and `atol`). Only affects columns with a Float data type. rtol