Skip to content

Commit

Permalink
docs(python): Correct typos and grammar in Python docstrings (pola-rs…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin-Patyk authored and anath2 committed Mar 5, 2025
1 parent 43169c2 commit 50b0883
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion py-polars/polars/dataframe/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/expr/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/expr/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/functions/eager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/functions/escape_regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/functions/lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/interchange/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/ml/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions py-polars/polars/testing/asserts/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions py-polars/polars/testing/asserts/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 50b0883

Please sign in to comment.