Skip to content

Commit

Permalink
docs(python): Fix bullet points not rendering correctly in `DataFrame…
Browse files Browse the repository at this point in the history
….join` docstring (#16576)

Co-authored-by: Stijn de Gooijer <[email protected]>
  • Loading branch information
MarcoGorelli and stinodego authored May 29, 2024
1 parent a3e116e commit ef1c0c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/src/python/user-guide/expressions/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# --8<-- [start:sort]
out = filtered.with_columns(
pl.col(["Name", "Speed"]).sort_by("Speed", descending=True).over("Type 1"),
pl.col("Name", "Speed").sort_by("Speed", descending=True).over("Type 1"),
)
print(out)
# --8<-- [end:sort]
Expand Down
1 change: 1 addition & 0 deletions py-polars/docs/source/reference/series/computation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Computation
Series.cos
Series.cosh
Series.cot
Series.cum_count
Series.cum_max
Series.cum_min
Series.cum_prod
Expand Down
7 changes: 4 additions & 3 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6563,12 +6563,13 @@ def join(
“m:1”: check if join keys are unique in right dataset
.. note::
This is currently not supported by the streaming engine.
- This is currently not supported the streaming engine.
join_nulls
Join on null values. By default null values will never produce matches.
coalesce
Coalescing behavior (merging of join columns).
- None: -> join specific.
- True: -> Always coalesce join columns.
- False: -> Never coalesce join columns.
Expand Down Expand Up @@ -9447,7 +9448,7 @@ def n_unique(self, subset: str | Expr | Sequence[str | Expr] | None = None) -> i
This method operates at the `DataFrame` level; to operate on subsets at the
expression level you can make use of struct-packing instead, for example:
>>> expr_unique_subset = pl.struct(["a", "b"]).n_unique()
>>> expr_unique_subset = pl.struct("a", "b").n_unique()
If instead you want to count the number of unique values per-column, you can
also use expression-level syntax to return a new frame containing that result:
Expand All @@ -9458,7 +9459,7 @@ def n_unique(self, subset: str | Expr | Sequence[str | Expr] | None = None) -> i
In aggregate context there is also an equivalent method for returning the
unique values per-group:
>>> df_agg_nunique = df.group_by(["a"]).n_unique()
>>> df_agg_nunique = df.group_by("a").n_unique()
Examples
--------
Expand Down
3 changes: 2 additions & 1 deletion py-polars/polars/lazyframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -3930,12 +3930,13 @@ def join(
“m:1”: check if join keys are unique in right dataset
.. note::
This is currently not supported by the streaming engine.
- This is currently not supported the streaming engine.
join_nulls
Join on null values. By default null values will never produce matches.
coalesce
Coalescing behavior (merging of join columns).
- None: -> join specific.
- True: -> Always coalesce join columns.
- False: -> Never coalesce join columns.
Expand Down

0 comments on commit ef1c0c8

Please sign in to comment.