Skip to content

Commit

Permalink
docs(python): Fix some links, and make map_batches warning more evi…
Browse files Browse the repository at this point in the history
…dent (pola-rs#13081)
  • Loading branch information
MarcoGorelli authored Dec 16, 2023
1 parent 511e3a4 commit d3bd70d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 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 @@ -4319,8 +4319,8 @@ def describe(
-----
The median is included by default as the 50% percentile.
Warning
-------
Warnings
--------
We will never guarantee the output of describe to be stable.
It will show statistics that we deem informative and may
be updated in the future.
Expand Down
12 changes: 5 additions & 7 deletions py-polars/polars/expr/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3984,8 +3984,11 @@ def map_batches(
A reasonable use case for `map` functions is transforming the values
represented by an expression using a third-party library.

Read more in `the book
<https://pola-rs.github.io/polars/user-guide/expressions/user-defined-functions>`_.
.. warning::
If you are looking to map a function over a window function or group_by
context, refer to :func:`map_elements` instead.
Read more in `the book
<https://pola-rs.github.io/polars/user-guide/expressions/user-defined-functions>`_.

Parameters
----------
Expand All @@ -3996,11 +3999,6 @@ def map_batches(
agg_list
Aggregate list.

Notes
-----
If you are looking to map a function over a window function or group_by context,
refer to func:`map_elements` instead.
Warnings
--------
If `return_dtype` is not provided, this may lead to unexpected results.
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/expr/name.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def keep(self) -> Expr:
See Also
--------
alias
Expr.alias
map
Examples
Expand Down

0 comments on commit d3bd70d

Please sign in to comment.