Releases: narwhals-dev/narwhals
Narwhals v1.23.0
Changes
- ci: downstream test for formulaic (#1817)
- docs: Removed class, added polars to the table, str.head and str.tail are a… (#1801)
✨ Enhancements
- feat: deprecate
maintain_order
inExpr.unique
andLazyFrame.tail
(but keep around instable.v1
) (#1839) - feat: track whether expressions change length but don't aggregate, and only allow length-changing expressions if they're followed by aggregations in the lazy API (#1828)
- feat: add DuckDB: nw.nth, nw.sum_horizontal, nw.concat_str, group_by with drop_null_keys (#1832)
- feat: remove
eager_or_interchange
fromfrom_native
in main namespace, switch Ibis' support from interchange to lazy in main namespace (but preserve status-quo in stable.v1) (#1829) - feat: add
is_nan
andis_finite
for duckdb,is_nan
for pyspark (#1825) - chore: rename time zone tests (#1830)
- feat: Deprecate Expr.arg_true (but keep Series.arg_true, and keep both available in stable.v1) (#1827)
- feat: add
Expr.dt
methods toPySpark
(#1835) - feat: add pyspark str namespace
to_datetime
(#1826) - feat: add total duration methods for DuckDB (#1831)
- feat: add
.over
method forSparkLikeExpr
(#1808) - feat: pyspark group by
n_unique
and no aggregation (#1819) - feat: Disallow order-dependent expressions from being passed to nw.LazyFrame (#1806)
- feat: add
SparkExpr.cast
for basic types (#1812) - feat: pyspark and duckdb
Expr.name
namespace (#1809) - feat: add
AnonymousExprError
(#1816) - feat: deprecate Expr.head, Expr.tail, Expr.sort, Expr.gather_every, Expr.sample (but keep them in stable.v1) (#1791)
- feat: add duckdb dataframe
drop_nulls
(#1811) - feat: add
DataFrame
andSeries
to_polars
(#1803) - feat: add support for
SparkLikeNamespace.when
(#1805)
🐞 Bug fixes
- fix: when/then/otherwise output name was not consistent across backends (#1833)
- fix: raise on shape mismatch in filter (#1814)
- patch: fix when-then double lit case (#1810)
🛠️ Other improvements
- chore: simplify imports (#1838)
- test: fixup test suite for cudf.pandas (#1837)
- test: decouple pyspark constructor from pandas (#1834)
- chore: refactor pandas-like
narwhals_to_native_dtype
(#1824) - chore: refactor
isinstance_or_issubclass
to allow tuples (#1820)
Thank you to all our contributors for making this release possible!
@Dhanunjaya-Elluri, @EdAbati, @FBruzzesi, @MarcoGorelli, @luke396, @marvinl803 and @raisadz
Narwhals v1.22.0
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
andnull_count
Spark Expressions (#1724) - feat: add missing dunder methods in
SparkLikeExpr
andSparkLikeNamespace.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
Narwhals v1.21.1
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
fromtests/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
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
andsum_horizontal
forSparkLike
(#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
andArrowDataFrame
.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 offloat('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
Narwhals v1.20.1
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
Narwhals v1.20.0
Changes
🚀 Performance improvements
- chore, perf: arrow cat namespace (#1663)
✨ Enhancements
- feat: raise informative error message when grouping by expressions (#1677)
- feat: expressify
lower_bound
andupper_bound
inis_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
inunique
one level up (#1671) - test: add test for
nw.Expr|Series.str.contains
withliteral=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
fromextra
(#1655)
Thank you to all our contributors for making this release possible!
@AlessandroMiola, @ClaudioSalvatoreArcidiacono, @Dhanunjaya-Elluri, @FBruzzesi, @MarcoGorelli and @luke396
Narwhals v1.19.1
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
andLazyFrame
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
Changes
🚀 Performance improvements
- perf: streamline pyarrow and pandas group by agg (#1621)
✨ Enhancements
- feat: add
Series|Expr.rolling_var
andSeries|Expr.rolling_std
(#1451) - fix: Add support for pandas cumulative operations with over (#1565)
- feat: add
var
toExpr
andSeries
(#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
andSeries
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
Changes
✨ Enhancements
- feat: add
Series
andExpr
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
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