Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add return type descriptions for cum_count, cum_max, cum_min, cum_prod, cum_sum in Series #1673

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions narwhals/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,9 @@ def cum_sum(self: Self, *, reverse: bool = False) -> Self:
Arguments:
reverse: reverse the operation

Returns:
A new Series with the cumulative sum of the values.

Examples:
>>> import pandas as pd
>>> import polars as pl
Expand Down Expand Up @@ -3211,6 +3214,9 @@ def cum_count(self: Self, *, reverse: bool = False) -> Self:
Arguments:
reverse: reverse the operation

Returns:
A new Series with the cumulative count of non-null values.

Examples:
>>> import narwhals as nw
>>> from narwhals.typing import IntoSeriesT
Expand Down Expand Up @@ -3264,6 +3270,9 @@ def cum_min(self: Self, *, reverse: bool = False) -> Self:
Arguments:
reverse: reverse the operation

Returns:
A new Series with the cumulative min of non-null values.

Examples:
>>> import narwhals as nw
>>> from narwhals.typing import IntoSeriesT
Expand Down Expand Up @@ -3317,6 +3326,9 @@ def cum_max(self: Self, *, reverse: bool = False) -> Self:
Arguments:
reverse: reverse the operation

Returns:
A new Series with the cumulative max of non-null values.

Examples:
>>> import narwhals as nw
>>> from narwhals.typing import IntoSeriesT
Expand Down Expand Up @@ -3370,6 +3382,9 @@ def cum_prod(self: Self, *, reverse: bool = False) -> Self:
Arguments:
reverse: reverse the operation

Returns:
A new Series with the cumulative product of non-null values.

Examples:
>>> import narwhals as nw
>>> from narwhals.typing import IntoSeriesT
Expand Down
Loading