Skip to content

Commit

Permalink
docs(python): Minor tweak in code example in section Expressions/Aggr…
Browse files Browse the repository at this point in the history
…egation (pola-rs#12033)

Co-authored-by: Stijn de Gooijer <[email protected]>
  • Loading branch information
jrycw and stinodego authored Oct 29, 2023
1 parent 11f94ea commit 29ccd8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/src/python/user-guide/expressions/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ def get_person() -> pl.Expr:
get_person().first().alias("youngest"),
get_person().last().alias("oldest"),
get_person().sort().first().alias("alphabetical_first"),
pl.col("gender").sort_by("first_name").first().alias("gender"),
pl.col("gender")
.sort_by(pl.col("first_name").cat.set_ordering("lexical"))
.first(),
)
.sort("state")
.limit(5)
Expand Down

0 comments on commit 29ccd8c

Please sign in to comment.