Skip to content

Commit

Permalink
docs(python): Update leftover references of by parameter to `group_…
Browse files Browse the repository at this point in the history
…by` in `DataFrame/LazyFrame.upsample/group_by_dynamic/rolling` (#15527)

Co-authored-by: Henry Harbeck <[email protected]>
  • Loading branch information
henryharbeck and Henry Harbeck authored Apr 7, 2024
1 parent 1d4880f commit 63ad8af
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5464,8 +5464,8 @@ def rolling(
index_column
Column used to group based on the time window.
Often of type Date/Datetime.
This column must be sorted in ascending order (or, if `by` is specified,
then it must be sorted in ascending order within each group).
This column must be sorted in ascending order (or, if `group_by` is
specified, then it must be sorted in ascending order within each group).
In case of a rolling operation on indices, dtype needs to be one of
{UInt32, UInt64, Int32, Int64}. Note that the first three get temporarily
Expand All @@ -5491,8 +5491,8 @@ def rolling(
-------
RollingGroupBy
Object you can call `.agg` on to aggregate by groups, the result
of which will be sorted by `index_column` (but note that if `by` columns are
passed, it will only be sorted within each `by` group).
of which will be sorted by `index_column` (but note that if `group_by`
columns are passed, it will only be sorted within each group).
See Also
--------
Expand Down Expand Up @@ -5580,15 +5580,15 @@ def group_by_dynamic(
datapoint. See the `start_by` argument description for details.
.. warning::
The index column must be sorted in ascending order. If `by` is passed, then
The index column must be sorted in ascending order. If `group_by` is passed, then
the index column must be sorted in ascending order within each group.
Parameters
----------
index_column
Column used to group based on the time window.
Often of type Date/Datetime.
This column must be sorted in ascending order (or, if `by` is specified,
This column must be sorted in ascending order (or, if `group_by` is specified,
then it must be sorted in ascending order within each group).
In case of a dynamic group by on indices, dtype needs to be one of
Expand Down Expand Up @@ -5651,8 +5651,8 @@ def group_by_dynamic(
-------
DynamicGroupBy
Object you can call `.agg` on to aggregate by groups, the result
of which will be sorted by `index_column` (but note that if `by` columns are
passed, it will only be sorted within each `by` group).
of which will be sorted by `index_column` (but note that if `group_by` columns are
passed, it will only be sorted within each group).
See Also
--------
Expand Down Expand Up @@ -5942,8 +5942,8 @@ def upsample(
Returns
-------
DataFrame
Result will be sorted by `time_column` (but note that if `by` columns are
passed, it will only be sorted within each `by` group).
Result will be sorted by `time_column` (but note that if `group_by` columns
are passed, it will only be sorted within each group).
Examples
--------
Expand Down
18 changes: 9 additions & 9 deletions py-polars/polars/lazyframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -3242,7 +3242,7 @@ def rolling(
"""
Create rolling groups based on a temporal or integer column.
Different from a `dynamic_group_by` the windows are now determined by the
Different from a `group_by_dynamic` the windows are now determined by the
individual values and are not of constant intervals. For constant intervals
use :func:`LazyFrame.group_by_dynamic`.
Expand Down Expand Up @@ -3289,8 +3289,8 @@ def rolling(
index_column
Column used to group based on the time window.
Often of type Date/Datetime.
This column must be sorted in ascending order (or, if `by` is specified,
then it must be sorted in ascending order within each group).
This column must be sorted in ascending order (or, if `group_by` is
specified, then it must be sorted in ascending order within each group).
In case of a rolling group by on indices, dtype needs to be one of
{UInt32, UInt64, Int32, Int64}. Note that the first three get temporarily
Expand All @@ -3316,8 +3316,8 @@ def rolling(
-------
LazyGroupBy
Object you can call `.agg` on to aggregate by groups, the result
of which will be sorted by `index_column` (but note that if `by` columns are
passed, it will only be sorted within each `by` group).
of which will be sorted by `index_column` (but note that if `group_by`
columns are passed, it will only be sorted within each group).
See Also
--------
Expand Down Expand Up @@ -3409,15 +3409,15 @@ def group_by_dynamic(
datapoint. See the `start_by` argument description for details.
.. warning::
The index column must be sorted in ascending order. If `by` is passed, then
The index column must be sorted in ascending order. If `group_by` is passed, then
the index column must be sorted in ascending order within each group.
Parameters
----------
index_column
Column used to group based on the time window.
Often of type Date/Datetime.
This column must be sorted in ascending order (or, if `by` is specified,
This column must be sorted in ascending order (or, if `group_by` is specified,
then it must be sorted in ascending order within each group).
In case of a dynamic group by on indices, dtype needs to be one of
Expand Down Expand Up @@ -3480,8 +3480,8 @@ def group_by_dynamic(
-------
LazyGroupBy
Object you can call `.agg` on to aggregate by groups, the result
of which will be sorted by `index_column` (but note that if `by` columns are
passed, it will only be sorted within each `by` group).
of which will be sorted by `index_column` (but note that if `group_by` columns are
passed, it will only be sorted within each group).
See Also
--------
Expand Down

0 comments on commit 63ad8af

Please sign in to comment.