Skip to content

Commit

Permalink
Update reference to apply
Browse files Browse the repository at this point in the history
Removed the reference to `apply` as indicated in pola-rs#15945 and replaced with `map_rows` or `map_elements` as appropriate.
  • Loading branch information
avimallu committed May 1, 2024
1 parent c9e786b commit 43a62af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6199,10 +6199,10 @@ def map_rows(
Notes
-----
* The frame-level `apply` cannot track column names (as the UDF is a black-box
* The frame-level `map_rows` cannot track column names (as the UDF is a black-box
that may arbitrarily drop, rearrange, transform, or add new columns); if you
want to apply a UDF such that column names are preserved, you should use the
expression-level `apply` syntax instead.
expression-level `map_elements` syntax instead.
* If your function is expensive and you don't want it to be called more than
once for a given input, consider applying an `@lru_cache` decorator to it.
Expand Down

0 comments on commit 43a62af

Please sign in to comment.