NEWS


polars 1.16.0

This is the last release before R Polars 2.0. It doesn't remove any existing API and keeps the behaviour of Polars 1.x, except where noted below. However, it comes with a number of deprecation warnings and suggestions that can be applied before moving to R Polars 2.0, which will break code or silently produce wrong results otherwise.

Note that some changes described below cannot warn, meaning that you should manually check your code when upgrading.

Polars 2.0 changes that cannot warn

The streaming engine becomes the default

engine = "auto" used to select the in-memory engine for most queries in Polars 1.x, but it will select the streaming engine in Polars 2.0.

The streaming engine may change the row order of the output, so if you rely on it you should make this row order explicit with $sort() or an operation-specific ordering option (e.g. with the argument .maintain_order in some functions).

Pass engine = "in-memory" to keep the behavior from Polars 1.x.

CSV reading

Type coercion and casting become stricter

Other behavior changes

Deprecations

Unless noted otherwise, the deprecated forms below retain their Polars 1.x behavior in R Polars 1.16 but no longer retain that behavior in R Polars 2.0.

Column selection and selectors

Aggregation helpers

String patterns and struct fields

Readers and writers

Other methods and arguments

Migration notes for deprecations from earlier releases

The following APIs were already deprecated before R Polars 1.16. They are repeated here because their Polars 2.0 migration path was previously incomplete, incorrect, or easy to miss.

Bug fixes

polars 1.15.0

This is an update that corresponds to Python Polars 1.44.1.

Deprecations

New features

Bug fixes

polars 1.14.0

This is an update that corresponds to Python Polars 1.43.2.

Deprecations

New features

polars 1.13.0

This is an update that corresponds to Python Polars 1.42.1.

Deprecations

New features

polars 1.12.0

This is an update that corresponds to Python Polars 1.41.2.

New features

polars 1.11.0

This is an update that corresponds to Python Polars 1.40.1.

New features

Other changes

polars 1.10.0

This is an update that corresponds to Python Polars 1.39.3.

New features

Bug fixes

polars 1.9.0

This is an update that corresponds to Python Polars 1.38.1.

Deprecations

New features

Bug fixes

Other changes

polars 1.8.0

This is an update that corresponds to Python Polars 1.37.1.

Deprecations

New features

polars 1.7.0

This is an update that corresponds to Python Polars 1.36.1, which includes significant internal changes.

Deprecations

New features

Bug fixes

Other changes

polars 1.6.0

This is an update that corresponds to Python Polars 1.35.2.

As of this version, this package depends on {S7}. The newly added QueryOptFlags object is an S7 object.

Deprecations

New features

Bug fixes

polars 1.5.0

This is an update that corresponds to Python Polars 1.35.1.

New features

Bug fixes

polars 1.4.0

This is an update that corresponds to Python Polars 1.34.0.

Deprecations

New features

Bug fixes

polars 1.3.1

This is an update that corresponds to Python Polars 1.33.1.

Only updates Rust dependencies (#1540, #1542).

polars 1.3.0

This is an update that corresponds to Python Polars 1.33.0, which includes significant internal changes.

Deprecations

Some entire expr methods or arguments of expr methods have been deprecated. They still work the same way on series (pola-rs/polars#24027, #1507, #1531, #1534).

As a workaround of these deprecations, the new <dataframe>$map_columns() function can be used to apply functions for Series to each column (#1533).

df <- pl$DataFrame(n = list(c(0, 1), c(0, 1, 2)))

# `df$with_columns(pl$col("n")$list$to_struct(n_field_strategy = "max_width"))` no longer works identically.
df$map_columns("n", \(s) s$list$to_struct(n_field_strategy = "max_width"))
#> shape: (2, 1)
#> ┌────────────────┐
#> │ n              │
#> │ ---            │
#> │ struct[3]      │
#> ╞════════════════╡
#> │ {0.0,1.0,null} │
#> │ {0.0,1.0,2.0}  │
#> └────────────────┘

Entire expr method deprecations

Arguments of expr method deprecations

New features

polars 1.2.1

This is an update that corresponds to Python Polars 1.32.3.

Only updates Rust dependencies (#1502).

polars 1.2.0

This is an update that corresponds to Python Polars 1.32.2.

New features

New top-level functions

New methods of expr

Performance

polars 1.1.0

This is an update that corresponds to Python Polars 1.32.0, which includes significant internal changes.

Deprecations

New features

polars 1.0.1

This is a small patch release that includes minor improvements discovered right after the 1.0.0 release.

Performance

Other improvements

polars 1.0.0

This is a completely rewritten new version of the polars R package. It improves the internal structure of the package and catches up with Python Polars' API. This version of R Polars matches Python Polars 1.31.0.

Therefore it contains many breaking changes compared to the previous R Polars implementation. Some of those breaking changes are explained below, but many others are due to modifications of function names, argument names, or argument positions. There are too many to list here, so you should refer to the Python Polars API docs.

For compatibility, the old version (polars 0.22.4) is now available as a separate package named "polars0". We can install both polars and polars0 at the same time. See the polars0 documentation for details.

Breaking changes

Other changes