diff --git a/narwhals/functions.py b/narwhals/functions.py index 20efa7b45..3fd2025a6 100644 --- a/narwhals/functions.py +++ b/narwhals/functions.py @@ -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 @@ -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 @@ -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 diff --git a/narwhals/stable/v1/__init__.py b/narwhals/stable/v1/__init__.py index e11cc6870..8e217f08b 100644 --- a/narwhals/stable/v1/__init__.py +++ b/narwhals/stable/v1/__init__.py @@ -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 @@ -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 @@ -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