Skip to content

Commit

Permalink
docs(python): Fix inadvertent swap of new and old parameters in `…
Browse files Browse the repository at this point in the history
…replace` description (#15019)
  • Loading branch information
mcrumiller committed Mar 12, 2024
1 parent 1829468 commit b957d53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion py-polars/polars/expr/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9263,7 +9263,7 @@ def replace(
Accepts expression input. Sequences are parsed as Series,
other non-expression inputs are parsed as literals.
Also accepts a mapping of values to their replacement as syntactic sugar for
`replace(new=Series(mapping.keys()), old=Series(mapping.values()))`.
`replace(old=Series(mapping.keys()), new=Series(mapping.values()))`.
new
Value or sequence of values to replace by.
Accepts expression input. Sequences are parsed as Series,
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/series/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -6584,7 +6584,7 @@ def replace(
old
Value or sequence of values to replace.
Also accepts a mapping of values to their replacement as syntactic sugar for
`replace(new=Series(mapping.keys()), old=Series(mapping.values()))`.
`replace(old=Series(mapping.keys()), new=Series(mapping.values()))`.
new
Value or sequence of values to replace by.
Length must match the length of `old` or have length 1.
Expand Down

0 comments on commit b957d53

Please sign in to comment.