Narwhals

Latest version: v1.33.0

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 26

1.33.0

Changes

🚀 Performance improvements

- perf: Avoid unnecessary calls in `Expr.clip` method (2303)

✨ Enhancements

- fix: change rank ExprKind to transform (2316)
- feat: add `rank` for Lazy backends (2310)
- feat: disallow `.over(order_by=...)` for non-order-dependent operations (as it signals a user error) (2314)
- feat: add `rolling_var` and `rolling_std` for lazy backends (2299)
- feat: Allow spark-like backends in `scan_csv` function (2300)
- feat: Add `DuckDBExpr.is_unique()` method (2301)
- feat: add `rolling mean` for lazy backends (2297)
- feat(sqlframe): Allow options in `scan_parquet` function (2295)
- feat: Add `DataFrame.clone` for `pyarrow` (2288)
- feat: add `cum_count` and `cum_prod` to PySpark and DuckDB (2286)
- feat: Add `cum max` and `cum_min` for DuckDB (2278)

🐞 Bug fixes

- fix: Expr.mode broadcasting (2280)
- ci: Remove `sqlframe` pin from `--group typing` (2298)
- fix: use specialised duckdb functions for std_pop/std_samp/var_pop/var_samp (2289)
- fix: fixup polars join version check throwing unnecessary deprecation warning for outer join (2287)

📖 Documentation

- docs: Expand contributing guidelines (2309)

🛠️ Other improvements

- test: add test for shift->cum_sum (2317)
- ci: fixup cudf test failures, support rolling_std/rolling_var/rolling_mean for pandas in grouped context (2322)
- chore: Make `duckdb` quack more like `polars` (2321)
- chore: use Python API more in DuckDB (2318)
- refactor: Add `CompliantDataFrame.from_arrow` (2306)
- chore(typing): Resolve `_polars.utils` dtype ignores (2312)
- chore: Tidy up `PolarsExpr` (2313)
- refactor: Add `LazyExprNameNamespace` (2311)
- refactor: Add `CompliantDataFrame.from_dict` (2304)
- refactor: Use `._with_*` for internal API methods (2305)
- chore: Add `EagerSeries*Namespace` protocols (2294)
- refactor: Use `.from_iterable()` in `new_series` (2302)
- refactor: `*(Namespace|DataFrame).from_numpy` (2283)
- chore: Update `._native_series` refs (2293)
- test: ensure `expected` data has every column of the`result` data (2296)
- ci: fixup for duckdb pre 1.3 (2292)
- chore: Update `._native_frame` refs (2290)
- chore: always set `CompliantExpr._metadata` (2282)

Thank you to all our contributors for making this release possible!
EdAbati, FBruzzesi, MarcoGorelli, dangotbanned and raisadz

1.32.0

Changes

💥 Breaking changes

- feat!: remove `maintain_order` from `LazyFrame.unique`, as it was never supported (2247)

✨ Enhancements

- feat: add `cum_min` to PySpark (2267)
- feat: make `order_by` in Expr.over public (2271)
- feat: Add support for full join (2126)
- enh: Support `diff`, `shift`, `is_first_distinct`, `is_last_distinct` for PySpark, SQLFrame, and DuckDB (2270)
- feat: add `cum_max` for PySpark (2265)
- feat: support window operations for DuckDB (2263)
- feat: track whether expressions are multi-output, unify error messages (2246)
- feat: Enable spark-like backends in `scan_parquet` (2235)
- feat: `Binary` dtype support (2243)
- feat!: remove `maintain_order` from `LazyFrame.unique`, as it was never supported (2247)

🐞 Bug fixes

- fix: safety assertion was being thrown for Expr.is_last_distinct with over and _order_by by pandas and pyarrow (2269)
- chore(typing): add missing `_FullContext` to `CompliantDataFrame` (2251)

📖 Documentation

- feat: make `order_by` in Expr.over public (2271)
- doc: fix docs CI (2259)
- docs: fix docs CI dependencies (2260)

🛠️ Other improvements

- ci: skip test_join_duplicate_column_names on old polars (2277)
- ci: Get CI green for cuDF tests (2276)
- chore: Clean up `_arrow` (2275)
- chore(typing): Move `DepthTracking*` typing (2272)
- chore: Track `ExpansionKind` in `ExprMetadata` (2266)
- feat: Adds `Compliant(When|Then)` (2261)
- chore: Add `CompliantExpr._with_metadata` (2262)
- feat: Adds `CompliantGroupBy` (2252)
- ci: skip Polars nightly if notebook is still running (2257)
- chore: Spec `CompliantSeries` (2236)
- chore: downstream CI cleanup (`validoopsie` and `pointblank`) and re-order dependency groups (2255)
- chore: Add `CompliantDataFrame.native` (2249)
- chore: Spec `CompliantLazyFrame` (2232)
- test: Scope dataframe library imports to fixtures in `conftest.py` (2241)
- chore: use is_scalar_like in apply_n_ary_operation (2242)
- chore: move dev dependencies to `dependency-groups` (2238)
- test: Fix yet more tests to work without polars (pandas, pyarrow) (2250)
- test: Fix more tests to work without polars (and pandas, pyarrow) (2245)
- Fix `noxfile.py` syntax for nox-2025.2.9 (2240)


Thank you to all our contributors for making this release possible!
EdAbati, FBruzzesi, MarcoGorelli, dangotbanned, marvinl803, mgorny, raisadz and tylerriccio33

1.31.0

Changes

💥 Breaking changes

- feat!: require at least one expression be passed to lazyframe select and lazyframe.with_columns, remove lazyframe.clone (2206)

⚠️ Deprecations

- docs: replace remaining `native_namespace` refs (2221)
- chore: Deprecate `native_namespace` in favour of `backend` in `from_arrow` (2219)
- chore: Deprecate `native_namespace` in favour of `backend` in `scan_csv` (2218)
- chore: Deprecate `native_namespace` in favour of `backend` in `scan_parquet` (2217)
- chore: Deprecate `native_namespace` in favour of `backend` in `read_parquet` (2216)
- chore: Deprecate `native_namespace` in favour of `backend` in `from_numpy` (2215)
- chore: Deprecate `native_namespace` in favour of `backend` in `new_series` (2212)

✨ Enhancements

- feat: Raise uniform error when passing Series of different lengths to `with_columns` (2224)
- enh: Adds support for `Time` datatype (2113)
- Implement `fill_null` for spark-like (2220)
- feat!: remove require at least one expression be passed to lazyframe select and lazyframe.with_columns, remove lazyframe.clone (2206)

🐞 Bug fixes

- patch: xfail `cast_test.py::test_cast_time` for cudf (2231)
- fix(typing): Match lazy `overload` in `nw.from_native(...)` (2211)
- fix: don't downcast `large_string` to `string` unnecessarily in `concat_str` for PyArrow (2176)
- refactor: adds `_compliant` sub-package (2149)

📖 Documentation

- docs: replace remaining `native_namespace` refs (2221)
- docs: add metalearners to used by/ecosystem (2208)
- docs: add Bokeh to "used by" (2198)

🛠️ Other improvements

- test: unify tests in `dtypes_tests.py` (2144)
- chore(typing): Resolve `sqlframe>=3.24.0` errors (2187)
- chore: pin typing dependnecies (2233)
- test: Run TPCH with SQLFrame (2228)
- chore: Spec `CompliantDataFrame` (2223)
- refactor: Add `CompliantSeries.from_numpy` (2196)
- chore(typing): Fill out `CompliantNamespace` protocol (2202)
- chore: minor duckdb cleanup (2204)
- test: track and enforce sqlframe test coverage (2200)
- chore(ruff): add `format` to `builtins-ignorelist` (2199)
- chore(typing): Use SQLFrame instead of PySpark for `_spark_like` internally (2190)
- refactor: adds `_compliant` sub-package (2149)
- ci: unxfail sqlframe (2186)
- ci: update bump_version.py so it correctly pushes to stable branch (2183)

Thank you to all our contributors for making this release possible!
DeaMariaLeon, FBruzzesi, MarcoGorelli, dangotbanned, lucas-nelson-uiuc, luke396 and marvinl803

1.30.0

Changes

💥 Breaking changes

- fix!: align `Series.filter` param name with Polars (2164)

🚀 Performance improvements

- perf: simplify pandas scatter (2154)

✨ Enhancements

- feat: support passing multiple arguments positionally to get_native_namespace (2178)
- feat: Added `struct` namespace with `field` method. (2146)
- feat: add `rolling_sum` for sqlframe and pyspark (2168)
- feat: support `cum_sum` for lazy backends (2132)

🐞 Bug fixes

- fix: parse timezone-aware datetime strings as UTC consistently across backends (2166)
- fix!: align `Series.filter` param name with Polars (2164)
- fix(typing): Narrow `NativeSeries` Protocol (2159)

📖 Documentation

- docs(ruff): Improve config docs (2173)
- docs: even more concise docstrings (2068) (2163)

🛠️ Other improvements

- test: fixup cudf failures (2181)
- chore(typing): remove unused `pandas-stubs` ignores (2172)
- chore: remove unnecessary testing logic for pyspark (2170)
- refactor: adds `_Stores(Native|Compliant)` (2130)
- chore(typing): `SparkLikeExpr` properties (2152)
- ci: Add darts to downstream tests (2118)
- ci: fix plotly requirement files in downstream tests (2161)

Thank you to all our contributors for making this release possible!
FBruzzesi, MarcoGorelli, dangotbanned, osoucy, skritsotalakis and DeaMariaLeon

1.29.1

Changes

- feat: Spec'd-out `CompliantExpr` (2119)
- [pre-commit.ci] pre-commit autoupdate (2139)

✨ Enhancements

- feat: support reversed cumulative expressions in `over` for pandas-like (2141)
- feat: support anonymous expressions in `over` context for pandas-like, support `over` for multi-partitioned dask (2138)

🐞 Bug fixes

- fix: pyarrow scatter was returning incorrect results when indices were not sorted (2156)
- ci: fix doc build for `win32` (2147)
- fix: pass ddof down in std().over() for pandas-like (2143)

📖 Documentation

- docs: Add info in `nw.when` regarding chained statements (2151)
- ci: fix doc build for `win32` (2147)

📦 Build system

- ci: fix doc build for `win32` (2147)

🛠️ Other improvements

- docs: remove non-existent "args" (2153)
- ci: get cuDF test suite green again (2145)
- refactor: Use `chain.from_iterable` more (2140)
- refactor: allow callable in `CompliantExpr.from_column_names` to reuse for `CompliantNamespace.<all|col|exclude>` (2134)

Thank you to all our contributors for making this release possible!
FBruzzesi, MarcoGorelli, dangotbanned, pre-commit-ci[bot] and [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci)

1.29.0

Changes

- test: enhance xfail markers with specific reasons in timestamp_test.py (2065)
- refactor: Generic `CompliantSelector` (2064)
- docs: more concise docstrings(2068) (2117)
- chore: deprecate `LazyFrame.gather_every` in main namespace (but maintain it in stable.v1) (2103)
- test(typing): fix `DataFrame.sort_values` overload match (2109)

🚀 Performance improvements

- perf: Avoid redefining `lambda` in `*Namespace.all` (2102)
- perf: avoid full broadcast for otherwise_value in when/then/otherwise (2098)
- perf: use cached property for schema/columns lazy frames (2093)
- perf: only validate duplicate column names when collecting for duckdb/pyspark/dask (2092)

✨ Enhancements

- feat: Adds `nw.exclude` (2122)
- feat: Add support for pandas-like `.diff().over(group)` (2128)
- fill_null with expression (2106)
- feat: Adds `DataFrame.iter_columns` (2104)
- feat: str.split (1932) (2054)
- feat(typing): Backport generic `Series` to `v1` (2110)
- feat: align `over` signature with Polars (2096)
- chore: Finalize support for SQLFrame (2038)

🐞 Bug fixes

- fix(typing): Include `Expr` in `fill_null` signature (2129)
- fix: Allow exprs in `.filter` constraints (2114)
- fix: `pyspark` unpivot with index `None` (2090)

📖 Documentation

- docs: Add API example docs for Field dtype (2131)
- docs: add `Implementation` page (2107)
- docs: concise_docstrings (2068) (2086)

🛠️ Other improvements

- refactor: Simplify `ArrowGroupBy.__iter__` (2133)
- chore: simplify pandas-like over (2127)
- chore(typing): Generic `CompliantDataFrame` (2115)
- chore(typing): enable typing checks for `pyspark` (2051)
- chore(typing): remove unused, ignored `TypeVar` (2108)
- chore(typing): fix `group_by` (2105)
- perf: Avoid redefining `lambda` in `*Namespace.all` (2102)
- chore: rename changes_length to filtration (2094)
- chore: add `has_open_windows` to `ExprMetadata` instead of `is_order_dependent` (2078)
- chore(typing): Resolve `_dask` errors (2087)
- refactor(typing): Use a forward ref for `IntoCompliantExpr` (2088)
- chore(typing): Fix `(Pandas|Arrow)(When|Then)` (2089)
- refactor(ruff): enable some preview rules (2042)

Thank you to all our contributors for making this release possible!
EdAbati, FBruzzesi, MarcoGorelli, dangotbanned, janpipek, luke396, skritsotalakis and thomasjpfan

Page 1 of 26

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.