Releases: narwhals-dev/narwhals
Narwhals v1.27.1
Changes
🐞 Bug fixes
- fix: PySpark was raising during
collect
when it contained no rows and a void dtype column (#2032) - fix:
is_in
was raising when used with empty list (#2031)
🛠️ Other improvements
- chore: fix pandas-stubs issues (#2008)
- fix(typing): Resolve all
mypy
&pyright
errors for_arrow
(#2007)
Thank you to all our contributors for making this release possible!
@EdAbati, @MarcoGorelli and @dangotbanned
Narwhals v1.27.0
Changes
🚀 Performance improvements
- perf: Avoid evaluating expr twice in mean_horizontal (#2028)
- perf: avoid try/except in _hasattr_static (#2014)
- perf: fast path for pandas-like group by with single expression and avoid resetting index if not necessary (#2010)
✨ Enhancements
- feat: support casting to and from spark-like structs (#1991)
- feat: Add support for
series[other_series]
(#2013)
🐞 Bug fixes
- fix: adjust duckdb population skewness by correction factor to get sample skewness (#2021)
- fix: sqlframe false positives in compliance checks (#2011)
🛠️ Other improvements
- chore(typing): Upgrade
TypeGuard
->TypeIs
(#2027) - refactor: remove
Array
shape default (#2026) - refactor: reuse
Schema.to_<backend>()
infrom_numpy
(#2024) - chore(typing): relax
from_numpy
to useMapping
,Sequence
(#2023) - chore(typing): relax
from_dict
to useMapping
(#2022) - tests: Allow to run pytest narwhals --doctest-modules without ibis (#2019)
- ci(typing): use
tool.mypy.pretty = true
(#2018) - fix: various typos (#2016)
- ci: update pointblank deps to test downstream in ci (#2015)
- chore(typing): resolve time unit/zone
set
invariance (#2012) - test: add test for
sum_horizontal
with column transformation (#2009) - chore: simplify when implementation (#2003)
- ci: remove
pyspark
from Windows CI (#1998) - chore(typing): add overloads to
isinstance_or_issubclass
(#1997) - chore: parse series and ndarrays as expressions (#1994)
- chore(typing): remove unused ignores (#1979)
- fix: use
mypy
pre-commit in local environment (#1966) - chore: clean up flatten and extract (#1995)
- chore: determine whether to use compliant_frame.aggregate at narwhals level (#1993)
- chore: Refactor filter (#1992)
- chore: alias named expressions at narwhals level (#1990)
- chore: Expr metadata refactor (#1986)
- chore: use toArrow in PySpark 4.0+ (#1987)
- tests: skip cudf hist tests (#1988)
Thank you to all our contributors for making this release possible!
@DeaMariaLeon, @EdAbati, @FBruzzesi, @MarcoGorelli, @anopsy, @camriddell, @dangotbanned and @raisadz
Narwhals v1.26.0
Changes
- ci: validate tpch query results (#1971)
- ci: add pointblank in downstream test (#1956)
- ci: add Validoopsie to downstream tests (#1973)
- chore(typing): fix
_from_compliant_dataframe
type ignore (#1969) - fix(typing): resolve remaining
utils.py
warnings (#1968) - test: Add new_streaming (#1898)
- fix(typing): add missing
Series._level
annotation (#1967) - ci: fix plotly tests location (#1965)
✨ Enhancements
- feat: Series.hist (#1859)
- feat: catch Polars exceptions, unify exception raising more (#1918)
- feat: improving array casting (#1865)
- feat: add
datetime
selector (#1822) - feat: add
Schema.to_(arrow|pandas|polars)
(#1924)
🐞 Bug fixes
- fix: implement casting to Int128 (#1984)
- fix: fix type
__get_item__
(#1958) - fix(typing): Backport
from_native
overload fixes tov1
(#1953) - fix(typing): Backport use
IntoDataFrameT
into_native
tov1
(#1954)
📖 Documentation
- docs: add
Schema.to_(arrow|pandas|polars)
(#1980) - RFC, chore: shrink
series
module docstrings (#1976) - chore: shrink
functions
module docstrings (#1974) - docs: add docstring guidelines to CONTRIBUTING.md (#1957)
🛠️ Other improvements
- chore: minor series.py fixes, dedupe a little (#1982)
- chore(typing): resolve
_arrow.dataframe
warnings (#1983) - chore(typing): add
np.ndarray
aliases (#1977) - chore: widen
parse_version
to accept packages (#1975) - RFC, chore: shrink
series
module docstrings (#1976) - chore: shrink
functions
module docstrings (#1974) - chore(typing): fix remaining
functions
,series
warnings (#1970) - fix: missing
__getitem__
type fixes (#1963) - chore(typing): add guards
is_compliant_*
(+ friends) (#1955) - chore: reduce duplication, implement more methods at the Narwhals level rather than at the compliant level, fix CI from Ibis release (#1960)
Thank you to all our contributors for making this release possible!
@EdAbati, @FBruzzesi, @IsaiasGutierrezCruz, @MarcoGorelli, @akmalsoliev, @camriddell, @dangotbanned and @luke396
Narwhals v1.25.2
Changes
✨ Enhancements
- feat: restore support of
is_duplicated
for pyarrow (#1951)
🐞 Bug fixes
- fix: cuDF to_numpy tests were failing (#1949)
- fix: raise NotImplementedError for DataFramte.is_duplicated for PyArrow when there is more than one column (#1948)
- fix: wrong argument name suggested in
from_dict
deprecation (#1946)
Thank you to all our contributors for making this release possible!
@FBruzzesi and @MarcoGorelli
Narwhals v1.25.1
Changes
🚀 Performance improvements
- perf: use fastpath in
DataFrame.to_numpy
for pandas, improve performance forDataFrame.schema
for pandas, use fewer values to sniff dtype for pandas objects (#1929)
✨ Enhancements
- enh: Deprecate
native_namespace
in favour ofbackend
infrom_dict
(#1931) - feat: validate duplicate column names in pyarrow and duckdb (#1815)
🐞 Bug fixes
- fix: Always collect
Iterator[IntoExpr]
inutils.flatten
(#1934)
📖 Documentation
- docs: Make DataFrame and LazyFrame docstrings shorter and more concise (#1939)
- chore: fix a couple of typos 🙃 (#1921)
🛠️ Other improvements
- ci: fix plotly downstream test (#1938)
- fix(typing): Use
IntoDataFrameT
into_native
(#1936) - fix(typing): Use correct
TypeVar
/Union
pairs infrom_native
(#1935) - fix(typing): Ensure
LazyFrame
has a uniqueTypeVar
(#1930) - refactor: refactoring following refurb and perflint suggestions (#1925)
Thank you to all our contributors for making this release possible!
@DeaMariaLeon, @FBruzzesi, @IsaiasGutierrezCruz, @MarcoGorelli, @dangotbanned, and @raisadz
Narwhals v1.25.0
Changes
✨ Enhancements
- feat: add
LazyFrame.explode
for duckdb (#1891) - feat: add duckdb
.str.to_datetime
(#1916) - feat: enable
ModuleType
andstr
for backend in.lazy()
method (#1914) - feat: add
LazyFrame.unpivot
for spark and duckdb (#1890) - feat:
LazyFrame.collect
with backend and **kwargs (#1734) - feat: spark date and datetimedata types, allow for
dtype
innw.lit
for pyspark (#1913)
📖 Documentation
- docs: Minor rendering fixups, inherit all exceptions from NarwhalsError (#1919)
- docs: shorten docstring examples in narwhals/expr.py (#1915)
🛠️ Other improvements
- chore: simplify duckdb group-by (#1911)
Thank you to all our contributors for making this release possible!
@FBruzzesi, @osoucy , and @MarcoGorelli
Narwhals v1.24.2
Changes
✨ Enhancements
- feat: Add
backend
argument tolazy
(#1895) - feat: add
dtype.is_<x>
methods (#1906) - feat: spark like
.list
namespace and lazyframe.explode
(#1887)
🐞 Bug fixes
- fix: pandas was raising when index name and column names overlapped in groupby (#1908)
- docs: update selectors docstrings (#1905)
📖 Documentation
- docs: improve search in docs (#1909)
- docs: update selectors docstrings (#1905)
- docs(ecosystem.md): add
pointblank
to Used By section (#1904) - docs(README.md): add mention of pointblank project (#1903)
Thank you to all our contributors for making this release possible!
@DeaMariaLeon, @FBruzzesi, @MarcoGorelli, @raisadz and @rich-iannone
Narwhals v1.24.1
Changes
- chore: fix pyspark/sqlframe typo (#1884)
✨ Enhancements
- feat: start (silently) adding support for SQLFrame (#1883)
- feat: move robust literal handling for PySpark (#1880)
- feat: add
selectors.matches
(#1882) - feat: support more scalar operations for duckdb, Increase width for ipython (#1877)
🛠️ Other improvements
- chore: add "typing :: typed" classifier to pyproject.toml (#1881)
- chore: use positional-only arg in evaluate_into_exprs (#1879)
- chore: remove unused
_depth
fromDuckDBExpr
andSparkLikeExpr
(#1878) - chore: refactor
name
namespaces to lower code duplication (#1876)
Thank you to all our contributors for making this release possible!
@FBruzzesi, @MarcoGorelli and @raisadz
Narwhals v1.24.0
Changes
- docs: fix api completness generation in CI (#1863)
✨ Enhancements
- feat: pyspark and duckdb selectors (#1853)
- feat: completely refactor alias tracking and support
nw.all
,nw.nth
, and selectors across the API (#1866) - feat: raise if expression changes length in
.over()
(#1867) - feat: add DuckDB
join_asof
(#1860) - feat: allow any ddof value for duckdb
var
andstd
(#1858) - feat: add DuckDB
Struct
dtype (#1851) - feat: add DuckDB
list.len
method (#1850) - feat: enforce that group-by aggregations actually aggregate (#1844)
- feat: add
mean_horizontal
for DuckDB (#1846)
🐞 Bug fixes
- fix: support various reductions in pyspark (#1870)
- fix: address
&
/|
operator errors for PySpark / chore: use F.lit in maybe_evaluate for pyspark, like we do for duckdb (#1872) - fix: allow any name in expression parsing (#1871)
- fix:
nw.selectors.by_dtype(nw.Datetime)
was excluding tz-aware for Polars (#1869) - patch: fix duckdb
narwhals_to_native_dtype
forInt32
andUInt32
(#1857) - fix: raise on selectors addition (#1854)
- fix: rename ewm and rolling
min_periods
tomin_samples
for polars 1.21 compatibility (#1864) - fix: address
&
/|
operator errors for PySpark / chore: use F.lit in maybe_evaluate for pyspark, like we do for duckdb (#1872)
🛠️ Other improvements
- test: skip Ibis tests if deps aren't installed, set defaults in
PandasLikeSeries.__array__
to fix cuDF is_in (#1862) - chore: parse strings as columns names at narwhals-level (#1856)
- chore: some typing and default removal (#1852)
- chore: validate expressions shape at narwhals/expr.py level (#1845)
- chore: simplify internal renaming in _pandas_like/series.py (#1847)
Thank you to all our contributors for making this release possible!
@FBruzzesi, @MarcoGorelli and @raisadz
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