Skip to content

narwhals 2.18.0

Version history | Download JSON

  • PyPI https://pypi.org/project/narwhals/
    Repository https://github.com/narwhals-dev/narwhals

  • py.typed

  • Coverage


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "Typed" : 1717
        "Any" : 153
        "Untyped" : 3
    • 99.8% coverage
    • 91.7% coverage (strict)
    • 1873 typable
      • 1717 typed
      • 3 untyped
      • 153 Any
  • Typables


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "functions" : 482
        "classes" : 1343
        "other" : 25
    • 170 functions (+57 overloads)
      • 312 parameters
    • 100 classes
      • 624 methods (+21 overloads)
        • 676 parameters
      • 43 properties
    • 46 modules
      • 25 attrs

Modules

Module Coverage Coverage (strict) Typables Ignores
narwhals._compliant.any_namespace 0.0% 0.0% 0 0
narwhals._compliant.dataframe 0.0% 0.0% 0 1
narwhals._compliant.expr 0.0% 0.0% 0 10
narwhals._compliant.group_by 0.0% 0.0% 0 0
narwhals._compliant.namespace 0.0% 0.0% 0 0
narwhals._compliant.selectors 0.0% 0.0% 0 3
narwhals._compliant.series 0.0% 0.0% 0 5
narwhals._expression_parsing 100.0% 50.0% 2 0
narwhals._native 100.0% 100.0% 4 0
narwhals._typing 100.0% 100.0% 4 0
narwhals._utils 100.0% 100.0% 50 0
narwhals.dataframe 100.0% 94.9% 332 0
narwhals.dependencies 100.0% 54.9% 51 0
narwhals.dtypes 100.0% 98.9% 88 9
narwhals.exceptions 82.4% 82.4% 17 0
narwhals.expr 100.0% 88.1% 201 2
narwhals.expr_cat 100.0% 100.0% 3 0
narwhals.expr_dt 100.0% 100.0% 31 0
narwhals.expr_list 100.0% 100.0% 16 0
narwhals.expr_name 100.0% 100.0% 11 0
narwhals.expr_str 100.0% 100.0% 45 0
narwhals.expr_struct 100.0% 100.0% 4 0
narwhals.functions 100.0% 94.8% 97 0
narwhals.group_by 100.0% 100.0% 15 0
narwhals.plugins 100.0% 66.7% 3 0
narwhals.schema 100.0% 100.0% 23 0
narwhals.selectors 100.0% 100.0% 12 3
narwhals.series 100.0% 91.8% 267 2
narwhals.series_cat 100.0% 100.0% 3 0
narwhals.series_dt 100.0% 100.0% 31 0
narwhals.series_list 100.0% 100.0% 16 0
narwhals.series_str 100.0% 95.7% 47 0
narwhals.series_struct 100.0% 100.0% 4 0
narwhals.sql 100.0% 100.0% 3 0
narwhals.stable.v1 100.0% 93.5% 214 5
narwhals.stable.v1._dtypes 100.0% 100.0% 12 1
narwhals.stable.v1.dependencies 100.0% 50.0% 30 0
narwhals.stable.v1.typing 100.0% 100.0% 4 0
narwhals.stable.v2 100.0% 91.0% 166 3
narwhals.stable.v2.typing 100.0% 100.0% 2 0
narwhals.testing.asserts.frame 100.0% 100.0% 11 0
narwhals.testing.asserts.series 100.0% 100.0% 11 0
narwhals.testing.asserts.utils 100.0% 71.4% 21 0
narwhals.this 0.0% 0.0% 0 0
narwhals.translate 100.0% 65.0% 20 0
narwhals.typing 100.0% 100.0% 2 0

Incomplete Annotations

narwhals._expression_parsing (0 missing, 1 any)

Symbol Typable Typed Any
func is_expr 2 2 1

narwhals.dataframe (0 missing, 17 any)

Symbol Typable Typed Any
meth LazyFrame.init 3 3 1
meth LazyFrame.collect 3 3 1
meth LazyFrame.filter 3 3 1
meth DataFrame.init 3 3 1
meth DataFrame.array 3 3 1
meth DataFrame.getitem 2 2 1
meth DataFrame.filter 3 3 1
meth DataFrame.item 3 3 1
meth BaseFrame.narwhals_namespace 1 1 1
meth BaseFrame._with_compliant 2 2 1
meth BaseFrame._extract_compliant_frame 2 2 1
meth BaseFrame.filter 3 3 1
meth BaseFrame.join 7 7 1
meth BaseFrame.join_asof 10 10 1
prop BaseFrame._compliant 1 1 1
attr BaseFrame._compliant_frame 1 1 1
attr Incomplete 1 1 1

narwhals.dependencies (0 missing, 23 any)

Symbol Typable Typed Any
func get_polars 1 1 1
func is_polars_lazyframe 2 2 1
func is_cudf_dataframe 2 2 1
func get_modin 1 1 1
func is_pandas_index 2 2 1
func is_cudf_series 2 2 1
func get_pyarrow 1 1 1
func get_numpy 1 1 1
func get_cudf 1 1 1
func get_ibis 1 1 1
func is_polars_series 2 2 1
func is_pyarrow_chunked_array 2 2 1
func get_pandas 1 1 1
func is_dask_dataframe 2 2 1
func is_pandas_dataframe 2 2 1
func is_polars_dataframe 2 2 1
func is_pandas_like_series 2 2 1
func is_ibis_table 2 2 1
func is_modin_dataframe 2 2 1
func is_pyarrow_table 2 2 1
func is_modin_series 2 2 1
func is_pandas_like_dataframe 2 2 1
func is_pandas_series 2 2 1

narwhals.dtypes (0 missing, 1 any)

Symbol Typable Typed Any
meth DTypeClass.new 5 5 1

narwhals.exceptions (3 missing, 0 any)

Symbol Typable Typed Any
attr ColumnNotFoundError.message 1 0 0
attr InvalidIntoExprError.message 1 0 0
attr FormattedKeyError.message 1 0 0

narwhals.expr (0 missing, 24 any)

Symbol Typable Typed Any
meth Expr.and 2 2 1
meth Expr.rand 2 2 1
meth Expr.or 2 2 1
meth Expr.ror 2 2 1
meth Expr.add 2 2 1
meth Expr.radd 2 2 1
meth Expr.sub 2 2 1
meth Expr.rsub 2 2 1
meth Expr.truediv 2 2 1
meth Expr.rtruediv 2 2 1
meth Expr.mul 2 2 1
meth Expr.rmul 2 2 1
meth Expr.le 2 2 1
meth Expr.lt 2 2 1
meth Expr.gt 2 2 1
meth Expr.ge 2 2 1
meth Expr.pow 2 2 1
meth Expr.rpow 2 2 1
meth Expr.floordiv 2 2 1
meth Expr.rfloordiv 2 2 1
meth Expr.mod 2 2 1
meth Expr.rmod 2 2 1
meth Expr.is_in 2 2 1
meth Expr.filter 2 2 1

narwhals.functions (0 missing, 5 any)

Symbol Typable Typed Any
func read_parquet 4 4 1
func new_series 5 5 1
func scan_csv 5 5 1
func read_csv 5 5 1
func scan_parquet 4 4 1

narwhals.plugins (0 missing, 1 any)

Symbol Typable Typed Any
func from_native 3 3 1

narwhals.series (0 missing, 22 any)

Symbol Typable Typed Any
meth Series.init 3 3 1
meth Series.array 3 3 1
meth Series.getitem 2 2 1
meth Series._extract_native 2 2 2
meth Series._with_compliant 2 2 1
meth Series.pipe 4 4 2
meth Series.min 1 1 1
meth Series.max 1 1 1
meth Series.is_in 2 2 1
meth Series.gt 2 2 1
meth Series.ge 2 2 1
meth Series.lt 2 2 1
meth Series.le 2 2 1
meth Series.and 2 2 1
meth Series.rand 2 2 1
meth Series.or 2 2 1
meth Series.ror 2 2 1
meth Series.filter 2 2 1
meth Series.item 2 2 1
meth Series.contains 2 2 1

narwhals.series_str (0 missing, 2 any)

Symbol Typable Typed Any
meth SeriesStringNamespace._extract_compliant 2 2 2

narwhals.stable.v1 (0 missing, 14 any)

Symbol Typable Typed Any
func read_parquet 5 5 1
func new_series 6 6 1
func scan_csv 5 5 1
func to_native 4 4 2
func from_native 8 8 2
func read_csv 5 5 1
func scan_parquet 5 5 1
meth Series.init 3 3 1
meth LazyFrame.init 3 3 1
meth LazyFrame.collect 3 3 1
meth DataFrame.init 3 3 1
meth DataFrame.getitem 2 2 1

narwhals.stable.v1.dependencies (0 missing, 15 any)

Symbol Typable Typed Any
func is_polars_lazyframe 2 2 1
func is_cudf_dataframe 2 2 1
func is_cudf_series 2 2 1
func is_polars_series 2 2 1
func is_pyarrow_chunked_array 2 2 1
func is_dask_dataframe 2 2 1
func is_pandas_dataframe 2 2 1
func is_polars_dataframe 2 2 1
func is_pandas_like_series 2 2 1
func is_ibis_table 2 2 1
func is_modin_dataframe 2 2 1
func is_pyarrow_table 2 2 1
func is_modin_series 2 2 1
func is_pandas_like_dataframe 2 2 1
func is_pandas_series 2 2 1

narwhals.stable.v2 (0 missing, 15 any)

Symbol Typable Typed Any
func read_parquet 4 4 1
func new_series 5 5 1
func scan_csv 5 5 1
func to_native 3 3 2
func from_native 7 7 2
func read_csv 5 5 1
func scan_parquet 4 4 1
meth Series.init 3 3 1
attr Series.hist 1 1 1
meth LazyFrame.init 3 3 1
meth LazyFrame.collect 3 3 1
meth DataFrame.init 3 3 1
meth DataFrame.getitem 2 2 1

narwhals.testing.asserts.utils (0 missing, 6 any)

Symbol Typable Typed Any
func raise_frame_assertion_error 7 7 2
func raise_series_assertion_error 5 5 2
func raise_assertion_error 6 6 2

narwhals.translate (0 missing, 7 any)

Symbol Typable Typed Any
func to_py_scalar 2 2 2
func to_native 3 3 2
func from_native 7 7 2
func get_native_namespace 2 2 1

Type-Ignore Comments

Flavor Count
type: ignore[override] 30
type: ignore[misc] 9
type: ignore[type-var] 2
pyright: ignore[reportIncompatibleMethodOverride] 1
pyright: ignore[reportInvalidTypeVarUse] 1
type: ignore[assignment] 1