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: use from_native / to_native in series.py #1406

Merged
merged 13 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
hooks:
- id: flake8
additional_dependencies: [darglint==1.8.1, Flake8-pyproject]
entry: flake8 --select DAR --ignore DAR402,DAR401
entry: flake8 --select DAR --ignore DAR101,DAR402,DAR401
exclude: |
(?x)^(
tests/.*|
Expand All @@ -38,10 +38,6 @@ repos:
narwhals/dataframe\.py$|
# TODO: gradually enable
narwhals/dependencies\.py$|
# some false positives in this one
narwhals/translate\.py$|
# some false positives in this one
narwhals/stable/v1/__init__\.py$|
# private, so less urgent to document too well
narwhals/_.*
)$
Expand Down
12 changes: 12 additions & 0 deletions narwhals/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ def lazy(self) -> LazyFrame[Any]:

If a library does not support lazy execution, then this is a no-op.

Returns:
A new LazyFrame.

Examples:
Construct pandas, Polars and PyArrow DataFrames:

Expand Down Expand Up @@ -873,6 +876,9 @@ def to_dict(
as_series: If set to true ``True``, then the values are Narwhals Series,
otherwise the values are Any.

Returns:
A mapping from column name to values / Series.

Examples:
>>> import pandas as pd
>>> import polars as pl
Expand Down Expand Up @@ -2244,6 +2250,9 @@ def join_asof(
def is_duplicated(self: Self) -> Series:
r"""Get a mask of all duplicated rows in this DataFrame.

Returns:
A new Series.

Examples:
>>> import narwhals as nw
>>> import pandas as pd
Expand Down Expand Up @@ -2323,6 +2332,9 @@ def is_empty(self: Self) -> bool:
def is_unique(self: Self) -> Series:
r"""Get a mask of all unique rows in this DataFrame.

Returns:
A new Series.

Examples:
>>> import narwhals as nw
>>> import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions narwhals/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ def ewm_mean(
half_life: Specify decay in terms of half-life, $\tau$, with <br> $\alpha = 1 - \exp \left\{ \frac{ -\ln(2) }{ \tau } \right\} \forall \tau > 0$
alpha: Specify smoothing factor alpha directly, $0 < \alpha \leq 1$.
adjust: Divide by decaying adjustment factor in beginning periods to account for imbalance in relative weightings

- When `adjust=True` (the default) the EW function is calculated
using weights $w_i = (1 - \alpha)^i$
- When `adjust=False` the EW function is calculated recursively by
Expand Down
Loading
Loading