Skip to content

Releases: narwhals-dev/narwhals

Narhwals v1.22.0

13 Jan 12:11
Compare
Choose a tag to compare

Changes

✨ Enhancements

  • feat: improve error message on check_columns_exist (#1799)
  • feat: DuckDB date (#1798)
  • feat: DuckDB dt.to_string (#1794)
  • feat: DuckDB dt.ordinal_day (#1796)
  • feat: DuckDB dt.weekday (#1795)
  • feat: add extra overload for concat for when it is not known statically whether inputs are eager or lazy (#1783)
  • feat: duckdb replace_all with regex (#1784)
  • feat: implement anti-join, str.len_chars, and null_count for DuckDB (#1777)
  • feat: SparkLikeNamespace methods (#1779)
  • feat: add SparkLikeStrNamespace methods (#1781)
  • feat: add all, any and null_count Spark Expressions (#1724)
  • feat: add missing dunder methods in SparkLikeExpr and SparkLikeNamespace.lit (#1708)
  • feat: implement cross-join for duckdb (#1773)
  • feat: semi-join for duckdb (#1767)
  • feat: implement n_unique for DuckDB (#1762)
  • feat: implement when/then/otherwise for DuckDB (#1759)
  • feat: add few missing SparkLikeExpr methods (#1721)

🐞 Bug fixes

  • fix: to_py_scalar was raising for decimals (#1800)
  • fix: fix skew for duckdb with fewer than 3 elements (#1785)
  • fix: duckdb join was failing if column names contained spaces (#1775)
  • fix: parse_version was not parsing duckdb pre-preleases correctly (#1763)
  • fix: update Spark min version in utils.py (#1760)

📖 Documentation

  • docs: remove docstring examples from narwhals/stable/v1 (#1797)
  • docs: Restore API complentess page (#1788)
  • docs: Increased width for content (#1769)
  • docs: fix is_between type hint in signature (#1766)

🛠️ Other improvements

  • chore: factor out check_columns_exist (#1792)
  • chore: split namespaces out from expr and series (#1782)
  • chore: move pyspark tests into main test suite (#1761)
  • chore: dask nightly (#1768)
  • chore: Remove some unnecessary trailing commas (#1757)
  • chore: validate predicates in nw.when one level higher (#1756)
  • chore: remove some expr._kwargs defaults (#1747)
  • chore: Filter left join warning (#1753)

Thank you to all our contributors for making this release possible!
@DeaMariaLeon, @Dhanunjaya-Elluri, @EdAbati, @FBruzzesi, @MarcoGorelli, @camriddell, @lucas-nelson-uiuc, @marvinl803 and @raisadz

Narhwals v1.21.1

07 Jan 11:45
Compare
Choose a tag to compare

Changes

✨ Enhancements

  • feat: add Series|Expr.rank (#1342)

🐞 Bug fixes

  • fix: fix license classifier (#1751)

📖 Documentation

  • docs: update api-completeness with duckdb (#1740)

🛠️ Other improvements

  • test: remove cudf from tests/expr_and_series/replace_time_zone_test.py::test_replace_time_zone_none[cudf] (#1748)
  • chore: filter old pyarrow/pandas warnings we cant do anything about (#1746)
  • [pre-commit.ci] pre-commit autoupdate (#1741)

Thank you to all our contributors for making this release possible!
@AlessandroMiola, @Dhanunjaya-Elluri, @EdAbati, @FBruzzesi, @MarcoGorelli, @anopsy

Narwhals v1.21.0

06 Jan 12:02
Compare
Choose a tag to compare

Changes

  • fix: always pass Column to pandas.spark.functions (#1712)
  • tests: add 'core' to nox dependencies (#1713)
  • feat: add weekday to Pandas, Dask and Arrow dt namespaces (#1680)
  • Link to Avoiding the UserWarning error while using Pandas group_by page when warning is thrown (#1683)

✨ Enhancements

  • feat: Implement partial "lazy" support for DuckDB (even with this PR, DuckDB support is work-in-progress!) (#1725)
  • feat: validate library minimum version in compliant objects (#1727)
  • feat: enable to cast to Struct dtype (#1717)
  • feat: Expressify clip arguments (#1709)
  • feat: add is_nan expression & series method (#1625)
  • feat: show native object (if possible) in repr (#1702)
  • feat: add sum and sum_horizontal for SparkLike (#1693)
  • feat: add some SparkLikeLazyFrame methods (#1633)

🐞 Bug fixes

  • fix: fix broken link from warning (#1732)
  • fix: nw.lit(date, dtype=nw.Date), loosen Dask minimum back to 2024.8 (#1730)
  • chore: simplify definitions of rhs expressions, bump dask minimum to 2024.10 (#1720)
  • fix: dask group by with kwargs (#1676)
  • fix: DaskLazyFrame and ArrowDataFrame .with_row_index column order (#1706)
  • fix: scalar reductions on empty inputs (#1715)
  • fix: remove maintain_order from LazyFrame.unique (#1687)
  • fix: modin dtype interoperability (#1692)
  • fix: Dask was raising for scalar vs Series binary operations (#1684)
  • fix: casting to List for cudf (#1686)

📖 Documentation

  • docs: Expr method' docstrings (#1733)
  • docs: let nw.LazyFrame docstrings examples run on Polars and Dask only (#1700)
  • docs: update null handling page with is_nan reference (#1716)
  • docs: add spark-like in backend completeness (#1710)
  • docs: Series method' docstrings (#1699)
  • docs: DataFrame method' docstrings (#1688)

🛠️ Other improvements

  • test: catch some cudf failures (#1735)
  • chore: refactor root_names and output_names tracking (#1731)
  • tests: remove unnecessary pytest filterwarnings (#1691)
  • chore: remove some lazy tests (#1719)
  • fix: Catch cuDF warning for concat with empty elements, and ComputeError for non-float is_nan (#1718)
  • chore: use None instead of float('nan') to check for null values in tests (#1697)
  • test: allow to run tests for Polars[gpu] (#1698)
  • test: Make constructors configurable when running tests (#1694)

Thank you to all our contributors for making this release possible!
@AlessandroMiola, @DeaMariaLeon, @EdAbati, @FBruzzesi, @MarcoGorelli, @camriddell, @dependabot, @dependabot[bot], @lucas-nelson-uiuc and @lucianosrp

Narhwals v1.20.1

30 Dec 09:58
Compare
Choose a tag to compare

Changes

🐞 Bug fixes

  • fix: is_duplicated was returning wrong-length result for PyArrow and Dask (#1679)

Thank you to all our contributors for making this release possible!
@DeaMariaLeon and @MarcoGorelli

Narhwals v1.20.0

30 Dec 09:16
Compare
Choose a tag to compare

Changes

🚀 Performance improvements

  • chore, perf: arrow cat namespace (#1663)

✨ Enhancements

  • feat: raise informative error message when grouping by expressions (#1677)
  • feat: expressify lower_bound and upper_bound in is_between (#1672)
  • feat: Relax cuDF minimum version to 24.10.0 (#1649)
  • Feat/add collect schema to interchange dfs (#1646)
  • feat: Add support for .shift(n).over('col') for pandas-like DataFrames (#1627)

🐞 Bug fixes

  • fix: pyspark group by with kwargs (#1665)

📖 Documentation

  • docs: use IntoDataFrameT/IntoFrameT in docs (#1664)
  • docs: Add return type description for more series namespace (#1675)
  • docs: Add more return type descriptions for Series (#1674)
  • docs: add return type descriptions for cum_count, cum_max, cum_min, cum_prod, cum_sum in Series (#1673)
  • docs: add return type descriptions to Series arg_true, cast, clip, count (#1667)
  • docs: Add return descriptions to Series's abs, alias, all, any methods for clarity (#1653)

🛠️ Other improvements

  • chore: pyarrow do not combine chunks (#1662)
  • chore: flatten subset in unique one level up (#1671)
  • test: add test for nw.Expr|Series.str.contains with literal=True (#1670)
  • test: check keys are in the same order in assert_equal_data (#1668)
  • ci: improve publish ci to use env vars (#1652)
  • chore: use __narwhals_namespace__ more (#1658)
  • ci: split dev from extra (#1655)

Thank you to all our contributors for making this release possible!
@AlessandroMiola, @ClaudioSalvatoreArcidiacono, @Dhanunjaya-Elluri, @FBruzzesi, @MarcoGorelli and @luke396

Narwhals v1.19.1

23 Dec 08:31
Compare
Choose a tag to compare

Changes

🚀 Performance improvements

  • perf: avoid merge in pandas groupby (#1638)

✨ Enhancements

  • feat: add collect schema to interchange dfs (#1646)
  • feat: support std and var with ddof !=1 in pandas-like group by (#1645)
  • feat: add DataFrame and LazyFrame explode method (#1542)

🐞 Bug fixes

  • fix: Make compatible with latest cuDF release (#1640)

📖 Documentation

  • docs: Note that maintains_order has no effect (but keep around for backwards-compatibility) (#1643)
  • docs: fix typing example (#1637)
  • docs: Use relative paths (#1636)
  • docs: Remove warnings when building docs (#1631)
  • docs: returns and arguments documentation for lazyframe class (#1630)
  • docs: null handling (#1624)

🛠️ Other improvements

  • chore: Update pyproject.toml (#1642)
  • chore: register kwargs for CompliantExpr (#1614)
  • fix: exclude protocols in api completeness script (#1635)
  • test: not-so-old-versions, pretty-old-versions, nightlies (#1626)

Thank you to all our contributors for making this release possible!
@AlessandroMiola, @DeaMariaLeon, @Dhanunjaya-Elluri, @FBruzzesi, @MarcoGorelli, @marenwestermann and @marvinl803

Narwhals v1.19.0

19 Dec 14:18
Compare
Choose a tag to compare

Changes

🚀 Performance improvements

  • perf: streamline pyarrow and pandas group by agg (#1621)

✨ Enhancements

  • feat: add Series|Expr.rolling_var and Series|Expr.rolling_std (#1451)
  • fix: Add support for pandas cumulative operations with over (#1565)
  • feat: add var to Expr and Series (#1603)

🐞 Bug fixes

  • fix: nw.col('a').is_in(df['b']) was raising (#1616)
  • fix: pandas and pyarrow were raising for repeated aggregations involving the same root name and the same aggregation function (#1613)

📖 Documentation

  • docs: more args and returns documentation in DataFrame class (#1600)
  • docs: make docstring examples function names more descriptive in functions.py (#1602)
  • docs: improve DataFrame, LazyFrame and Series docstrings (#1622)

🛠️ Other improvements

  • ci: unpin scikit-learn in scikit-lego test (#1611)
  • ci: Speed up tests in local development (#1608)
  • test: downstream test for tea-tasting (#1605)
  • test: minimum versions (#1617)

Thank you to all our contributors for making this release possible!
@ClaudioSalvatoreArcidiacono, @DeaMariaLeon, @Dhanunjaya-Elluri, @FBruzzesi, @Machele-codez, @MarcoGorelli, @e10v, @marenwestermann and @skritsotalakis

Narwhals v1.18.4

15 Dec 17:27
Compare
Choose a tag to compare

Changes

✨ Enhancements

  • feat: add Series and Expr arg_min & arg_max (#1529)

🐞 Bug fixes

  • fix: allow np.scalar to be used in Series.getitem (#1515)
  • fix: fix pyarrow len aggregation behaviour for depth-1 exprs (#1589)

📖 Documentation

  • docs: document arguments and returns in DataFrame class (#1594)
  • docs: add tea-tasting to ecosystem (#1593)
  • docs: Correct small error in IntoDataFrameT and IntoSeriesT (#1591)
  • docs: add docstring example for Array in narwhals.dtypes (#1576)

🛠️ Other improvements

  • test: xfail cudf argmin / argmax (#1599)
  • chore: use set_axis in maybe_set_index (#1598)
  • test: fixup more cuDF xfails (#1596)
  • test: xfail test_group_by_shift_raises for cudf (#1595)
  • chore: Add some Compliant Protocols (#1522)

Thank you to all our contributors for making this release possible!
@AlessandroMiola, @DeaMariaLeon, @Dhanunjaya-Elluri, @MarcoGorelli, @Nathan-Bransby-NMT, @e10v, @marenwestermann and @thevro

Narwhals v1.18.3

13 Dec 18:56
Compare
Choose a tag to compare

Changes

  • release: Bump version to 1.18.2 (#1582)

✨ Enhancements

  • feat/fix: Improve error message when trying to do unsupported group-by aggregation, and raise instead of giving inconsistent results (#1584)

🛠️ Other improvements

  • refactor: PandasLikeExpr repr and init (#1585)

Thank you to all our contributors for making this release possible!
@MarcoGorelli, @anopsy and @camriddell

Narwhals v1.18.2

13 Dec 13:29
Compare
Choose a tag to compare

Changes

🚀 Performance improvements

  • perf: use lru_cache for native_to_narwhals_dtype (#1564)

✨ Enhancements

  • feat: add Decimal dtype (#1571)
  • feat: Preserve null values in old Polars versions for ewm_mean (#1574)
  • enh: add read_parquet / scan_parquet (#1577)
  • feat: add nw.Int128, nw.UInt128 (#1570)
  • feat: add **kwargs to read_csv and scan_csv (#1560)
  • feat: scan_csv (#1555)

📖 Documentation

  • docs:add docstring series getitem (#1559)
  • docs: Restore image in docs (#1573)
  • docs: add security page to docs, try removing some temporary CI pins (#1568)
  • docs: add nw.Expr.list, nw.Series.list to api-reference (#1558)

🛠️ Other improvements

  • ci: fixup release process (#1580)
  • refactor: use nw.scan_parquet in tpch benchmarks (#1578)
  • ci: remove pull_request_target, sanitise github.ref_name (#1567)

Thank you to all our contributors for making this release possible!
@AlessandroMiola, @DeaMariaLeon, @MarcoGorelli, @TimOsahenru, @anopsy and @raisadz