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 "returns" documentation to functions.py #1331

Merged
merged 2 commits into from
Nov 7, 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
9 changes: 9 additions & 0 deletions narwhals/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ def new_series(
may auto-infer it from `values`.
native_namespace: The native library to use for DataFrame creation.
Returns:
A new Series
Examples:
>>> import pandas as pd
>>> import polars as pl
Expand Down Expand Up @@ -291,6 +294,9 @@ def from_dict(
native_namespace: The native library to use for DataFrame creation. Only
necessary if inputs are not Narwhals Series.
Returns:
A new DataFrame
Examples:
>>> import pandas as pd
>>> import polars as pl
Expand Down Expand Up @@ -431,6 +437,9 @@ def from_arrow(
native_frame: Object which implements `__arrow_c_stream__`.
native_namespace: The native library to use for DataFrame creation.
Returns:
A new DataFrame
Examples:
>>> import pandas as pd
>>> import polars as pl
Expand Down
9 changes: 9 additions & 0 deletions narwhals/stable/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2323,6 +2323,9 @@ def new_series(
may auto-infer it from `values`.
native_namespace: The native library to use for DataFrame creation.
Returns:
A new Series
Examples:
>>> import pandas as pd
>>> import polars as pl
Expand Down Expand Up @@ -2376,6 +2379,9 @@ def from_arrow(
native_frame: Object which implements `__arrow_c_stream__`.
native_namespace: The native library to use for DataFrame creation.
Returns:
A new DataFrame
Examples:
>>> import pandas as pd
>>> import polars as pl
Expand Down Expand Up @@ -2431,6 +2437,9 @@ def from_dict(
native_namespace: The native library to use for DataFrame creation. Only
necessary if inputs are not Narwhals Series.
Returns:
A new DataFrame
Examples:
>>> import pandas as pd
>>> import polars as pl
Expand Down
Loading