pypi narwhals 2.28.0
Narwhals v2.28.0

3 days ago

Changes

🚀 Performance improvements

  • perf: drop_nulls before unique in Polars cat.get_categories (#4082)

✨ Enhancements

  • feat: Extend plugin support for IO and from_* methods/functions (#3753)
  • feat: support list.{len,get,min,max,mean,median,sum,sort} for Dask (#4017)

🐞 Bug fixes

  • fix null-handling in mode for sql like (#4111)
  • fix: ignore modules that are still being imported (#4068)
  • fix: handle eager plugin native objects in is_into_lazyframe, get_native_namespace and Series.__getitem__ (#4098)
  • fix: Consistently raise DuplicateError in rename (#4104)
  • fix: support DuckDB 2.0 in joins, time zone lookup and from_native typing (#4099)
  • ci: fix lightgbm, patch tea-tasting (#4100)
  • fix: var/std on Dask return null for N <= ddof, and zero instead of null for constant group_by groups (#4081)
  • fix: don't raise unhashable type for cuDF categorical columns (#4090)
  • fix: treat non-ASCII letters as word characters in str.to_titlecase on DuckDB, Spark-like and old polars (#4085)
  • fix: restore set difference between selectors (#4087)
  • fix: return selector union columns in schema order (#4032)
  • fix: correct var/std with ddof > 1 on SQL backends, including over and null for N <= ddof (#4022)
  • fix: stop using DuckDBPyRelation.fetchone, removed in DuckDB 2.0 (#4078)
  • test: fix Implementation typing tests for pyrefly 1.4 (#4077)
  • fix: floor // on DuckDB for negative operands and floats (#3994)
  • fix: keep the dtype of scalar reduction results on the PyArrow backend (#4043)
  • fix: raise InvalidOperationError for mismatched list.contains items on pyarrow-backed backends (#3915)
  • fix: raise consistent errors for invalid descending/reverse in sort and top_k (#4038)
  • fix: do not drop nulls in mode on pandas-like and dask (#4061)
  • fix: avoid copying numpy arrays in pandas Series.from_numpy on pandas 3 (#4096)
  • fix: DuckDB dt.total_* wrong for durations of one hour or more (#4106)
  • fix: return null from arg_min and arg_max when no valid values exist (#4079)

📖 Documentation

  • docs: mention forward_fill / ffill in fill_null docs (#4057)
  • docs: document that null values are ignored in aggregations (#4050)
  • docs: document unicode case mapping differences in str.{to_uppercase,to_lowercase} (#3986)

🛠️ Other improvements

  • test: avoid tied sort keys in first/last group-by test (#4112)
  • chore: make bump_version.py fail-safe and stop it from churning uv.lock (#4052)
  • test: use packaging.version.Version for backend version checks (#4066)
  • chore(deps): lock file maintenance (#4075)
  • chore: prek autoupdate (#4069)
  • test: cover str.to_datetime date-only, all-null and trailing cases (#3913)
  • test: cover str.to_time custom formats, schema and invalid raises (#3914)
  • ci: Temporary pin beartype in tubular downstream job to get CI green (#4053)
  • test: only xfail test_truediv_same_dims on Polars < 2.1 (#4109)
  • chore: prek autoupdate (#4093)

Thank you to all our contributors for making this release possible!
@555aaditya, @AbdulAliMamnun, @DeviousCardi, @FBruzzesi, @InessaPawson, @ioseba, @JoeyTan21, @jonasdedden, @lucaluo925, @MarcoGorelli, @ptimizeroracle, @ReguiguiMohamed, @SAY-5, @swethakommuri, @Xyrro, @github-actions[bot], @renovate[bot], @dangotbanned and Luca Luo

Don't miss a new narwhals release

NewReleases is sending notifications on new releases.