Changes
- test: cover
concat_strsingle expression and null inputs (#3978) - test: cover
corrandcovconstant, 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.containsfor PyArrow, pandas and Dask (#4001) - feat: accept file-like objects in
{read,scan}_*(#3956) - feat: hint at
narwhals-datafusionplugin fordatafusion.DataFrame(#3937)
🐞 Bug fixes
- fix: avoid
LazyFrame.castfrom 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}toInt64in pyarrowcum_sum(#3995) - fix: align scalar operands before
fill_nulland horizontal reductions in Dask (#3972) - fix: use relations' own connection for
concat(how="diagonal")on DuckDB (#3998) - fix: align
list.containsnull 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_strboolean rendering (#3979) - fix: match Polars in
str.slicefor negativeoffset, raise on negativelength(#3969) - fix: correct
str.zfillfor+-prefixed strings on polars<=1.30 and support polars 0.20.4 (#3958) - fix: align
concat_strbehavior for polars<0.20.6 (#3981) - fix: broadcast scalar-only
concat_strfor sql-like backends (#3980) - fix: avoid
DIVIDE_BY_ZEROin PySparkcorron constant columns (#3960) - fix: preserve all-null rows in
concat_strfor pyarrow backend (#3966) - fix: align series before
fillnaandisnain daskmean_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
Stringon pandas pre v3.0.0 (#3939) - fix: reject a negative
widthinstr.zfillconsistently across backends (#3770) - fix: align
__mod__and__rmod__behavior with negative operands across backends (#3929) - fix: raise
DuplicateErroron duplicatestructfield 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 andnedge cases in tests (#3911) - fix(pyarrow): use native
{starts,ends}_withkernels, fixing empty-suffixends_with; cover empty-pattern and null expr-pattern search in tests (#3912) - fix: avoid name collision in
{max,min}_horizontalfor 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 | IntoLazyFrameTinstead ofIntoFrameT(#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