From d3ed01d4f8fbf86c172980b778e75106f7e7a89f Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 25 Apr 2024 22:17:55 +0100 Subject: [PATCH] docs --- narwhals/translate.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/narwhals/translate.py b/narwhals/translate.py index aa8c5a61a..652b1403b 100644 --- a/narwhals/translate.py +++ b/narwhals/translate.py @@ -103,19 +103,23 @@ def from_native( Arguments: native_dataframe: Raw dataframe from user. - Input object can be: + Depending on the other arguments, input object can be: - pandas.DataFrame - polars.DataFrame - polars.LazyFrame - - modin.DataFrame - - cudf.DataFrame - anything with a `__narwhals_dataframe__` or `__narwhals_lazyframe__` method + - pandas.Series + - polars.Series + - anything with a `__narwhals_series__` method strict: Whether to raise if object can't be converted (default) or to just leave it as-is. + eager_only: Whether to only allow eager objects. + series_only: Whether to only allow series. + allow_series: Whether to allow series (default is only dataframe / lazyframe). Returns: - narwhals.DataFrame or narwhals.LazyFrame + narwhals.DataFrame or narwhals.LazyFrame or narwhals.Series """ from narwhals.dataframe import DataFrame from narwhals.dataframe import LazyFrame