From 07cd7221cc871c1e540bb3e43815af7cca026fd4 Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Sun, 24 Mar 2024 14:30:53 +0000 Subject: [PATCH] api reference --- docs/api-reference/expressions.md | 23 +++++++++++++++++++++++ docs/api-reference/narwhals.md | 7 +++++++ docs/api-reference/series.md | 28 ++++++++++++++++++++++++++++ mkdocs.yml | 2 ++ narwhals/__init__.py | 2 ++ 5 files changed, 62 insertions(+) diff --git a/docs/api-reference/expressions.md b/docs/api-reference/expressions.md index e69de29bb..49e12ab23 100644 --- a/docs/api-reference/expressions.md +++ b/docs/api-reference/expressions.md @@ -0,0 +1,23 @@ +# `narwhals.Expr` + +::: narwhals.Expr + handler: python + options: + members: + - alias + - cast + - mean + - sum + - min + - max + - n_unique + - unique + - is_between + - is_in + - is_null + - drop_nulls + - sample + - str + show_root_heading: false + show_source: false + show_bases: false diff --git a/docs/api-reference/narwhals.md b/docs/api-reference/narwhals.md index b23b39fb0..1e086cf54 100644 --- a/docs/api-reference/narwhals.md +++ b/docs/api-reference/narwhals.md @@ -8,5 +8,12 @@ Here are the top-level functions available in Narwhals. members: - from_native - to_native + - col + - min + - max + - mean + - sum + - len + - sum_horizontal #show_root_heading: false show_source: false diff --git a/docs/api-reference/series.md b/docs/api-reference/series.md index e69de29bb..08d6047c0 100644 --- a/docs/api-reference/series.md +++ b/docs/api-reference/series.md @@ -0,0 +1,28 @@ +# `narwhals.Series` + +::: narwhals.series.Series + handler: python + options: + members: + - alias + - name + - dtype + - shape + - rename + - cast + - item + - is_between + - is_in + - is_null + - drop_nulls + - n_unique + - unique + - zip_with + - sample + - to_numpy + - to_pandas + - mean + - std + show_root_heading: false + show_source: false + show_bases: false diff --git a/mkdocs.yml b/mkdocs.yml index 994cb76cc..7b390636c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -14,6 +14,8 @@ nav: - api-reference/narwhals.md - api-reference/dataframe.md - api-reference/lazyframe.md + - api-reference/series.md + - api-reference/expressions.md theme: name: material font: false diff --git a/narwhals/__init__.py b/narwhals/__init__.py index fc7ae2564..5d226a90a 100644 --- a/narwhals/__init__.py +++ b/narwhals/__init__.py @@ -6,6 +6,7 @@ from narwhals.dataframe import DataFrame from narwhals.dataframe import LazyFrame from narwhals.dtypes import * # noqa: F403 +from narwhals.expression import Expr from narwhals.expression import all from narwhals.expression import col from narwhals.expression import len @@ -39,4 +40,5 @@ "DataFrame", "LazyFrame", "Series", + "Expr", ]