Skip to content

Narwhals v2.27.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Oct 11:15
· 1 commit to main since this release

Changes

  • test: cover concat_str single expression and null inputs (#3978)
  • test: cover corr and cov constant, stability and group_by cases (#3917)
  • fix(tests): PySpark tests fixup (#3940)
  • test: test cover quantile boundaries, invalid raises, median over (#3919)

✨ Enhancements

  • feat: Add {DataFrame, LazyFrame}.cast (#3815)
  • feat: support list.contains for PyArrow, pandas and Dask (#4001)
  • feat: accept file-like objects in {read,scan}_* (#3956)
  • feat: hint at narwhals-datafusion plugin for datafusion.DataFrame (#3937)

🐞 Bug fixes

  • fix: avoid LazyFrame.cast from resolving the full schema to check column names (#4016)
  • fix: return null for floor division by zero on pandas-like backends (#4011)
  • fix: upcast {Int8,Int16,UInt8,UInt16} to Int64 in pyarrow cum_sum (#3995)
  • fix: align scalar operands before fill_null and horizontal reductions in Dask (#3972)
  • fix: use relations' own connection for concat(how="diagonal") on DuckDB (#3998)
  • fix: align list.contains null handling with Polars on lazy backends (#3996)
  • fix: cum_count(reverse=True) counts non-null values on pandas-like backends (#3991)
  • fix: align pandas-like and Dask concat_str boolean rendering (#3979)
  • fix: match Polars in str.slice for negative offset, raise on negative length (#3969)
  • fix: correct str.zfill for +-prefixed strings on polars<=1.30 and support polars 0.20.4 (#3958)
  • fix: align concat_str behavior for polars<0.20.6 (#3981)
  • fix: broadcast scalar-only concat_str for sql-like backends (#3980)
  • fix: avoid DIVIDE_BY_ZERO in PySpark corr on constant columns (#3960)
  • fix: preserve all-null rows in concat_str for pyarrow backend (#3966)
  • fix: align series before fillna and isna in dask mean_horizontal (#3968)
  • fix: drop trailing separator in concat_str(..., ignore_nulls=True) for pandas-like and Dask backends (#3967)
  • fix: broadcast literals in pandas-like and PyArrow horizontal functions (#3941)
  • fix: preserve nulls when casting to String on pandas pre v3.0.0 (#3939)
  • fix: reject a negative width in str.zfill consistently across backends (#3770)
  • fix: align __mod__ and __rmod__ behavior with negative operands across backends (#3929)
  • fix: raise DuplicateError on duplicate struct field names; cover nested struct schema round trip in tests (#3918)
  • fix: reject invalid str.{pad_start,pad_end} arguments consistently; cover pad length-zero and unicode edge cases in tests (#3910)
  • fix: str.replace(n=0) on pandas-like backends; cover replace regex and n edge cases in tests (#3911)
  • fix(pyarrow): use native {starts,ends}_with kernels, fixing empty-suffix ends_with; cover empty-pattern and null expr-pattern search in tests (#3912)
  • fix: avoid name collision in {max,min}_horizontal for pandas-like (#3935)
  • fix: str.zfill(0) on pyarrow-backed data; cover zfill sign-only and width-1 edge cases in tests (#3909)

📖 Documentation

  • docs: add pyreadr to packages using narwhals (#4002)
  • typing: Use IntoDataFrameT | IntoLazyFrameT instead of IntoFrameT (#3949)
  • docs: mention narwhals-datafusion plugin in supported backends (#3936)

Thank you to all our contributors for making this release possible!
@00200200, @Aniket-a14, @ddy314, @FBruzzesi, @jonasdedden, @lucaluo925, @MarcoGorelli, @mkzung, @ofajardo, @ptimizeroracle, @s5dsn-eqee, @Vinayak19112003, @winklemad, @github-actions[bot] and Luca Luo