v0.19.0
Breaking changes
- Updated rust-polars to unreleased 2024-08-20, after 0.42.0 (#1183).
$describe_plan()
and$describe_optimized_plan()
are removed. Use
respectively$explain(optimized = FALSE)
and$explain()
instead (#1182).- The parameter
inherit_optimization
is removed from all functions that had it
(#1183). - In
$write_parquet()
and$sink_parquet()
, the parameterdata_pagesize_limit
is renameddata_page_size
(#1183). - The LazyFrame method
$get_optimization_toggle()
is removed, and
$set_optimization_toggle()
is renamed$optimization_toggle()
(#1183). - In
$unpivot()
, the parameterstreamable
is removed (#1183). - Some functions have a parameter
future
that determines the compatibility level
when exporting Polars' internal data structures. This parameter is renamed
compat_level
, which takesFALSE
for the oldest flavor (more compatible)
andTRUE
for the newest one (less compatible). It can also take an integer
determining a specific compatibility level when more are added in the future.
For now,future = FALSE
can be replaced bycompat_level = FALSE
(#1183). - In
$scan_parquet()
and$read_parquet()
, the default value of
hive_partitioning
is nowNULL
(#1189). - In
$dt$epoch()
, the argumenttu
is renamed totime_unit
(#1196). - In
$fill_nan()
forDataFrame
,LazyFrame
andExpr
, the argument is
renamedvalue
(#1198). $shift_and_fill()
is removed and replaced by a new argumentfill_value
in
$shift()
.$shift_and_fill(fill_value, periods)
can be replaced by
$shift(n, fill_value)
(#1201).- In
$shift()
for variousExpr
, the argumentperiods
is renamedn
(#1201). - In
$clip()
, argumentsmin
andmax
are renamedlower_bound
and
upper_bound
(#1203). $clip_min()
and$clip_max()
are removed. Use$clip()
with only
lower_bound
orupper_bound
instead (#1203).- In
$write_csv
and$sink_csv()
, the argumentquote
is renamed
quote_char
(#1206).
New features
- New method
$str$extract_many()
(#1163). - Converting a
nanoarrow_array
with zero rows to anRPolarsDataFrame
via
as_polars_df()
now keeps the original schema (#1177). $write_parquet()
has two new argumentspartition_by
and
partition_chunk_size_bytes
to write aDataFrame
to a hive-partitioned
directory (#1183).- New method
$bin$size()
(#1183). - In
$scan_parquet()
and$read_parquet()
, theparallel
argument can take
the new value"prefiltered"
(#1183). $scan_parquet()
,$scan_ipc()
and$read_parquet()
have a new argument
include_file_paths
to automatically add a column containing the path to the
source file(s) (#1183).$scan_ipc()
can read a hive-partitioned directory with its new arguments
hive_partitioning
,hive_schema
, andtry_parse_hive_dates
(#1183).$scan_parquet()
and$read_parquet()
gain two new arguments for more control
on importing hive partitions:hive_schema
andtry_parse_hive_dates
(#1189).- New method
$gather_every()
forLazyFrame
andDataFrame
(#1199). $glimpse()
forDataFrame
has two new argumentsmax_items_per_column
and
max_colname_length
(#1200).- New method
$list$sample()
(#1204). - New argument
coalesce
in$join_asof()
(#1205). - New argument
maintain_order
in$list$unique()
(#1207).
Other changes
- In
$unnest()
forDataFrame
andLazyFrame
, thenames
argument is removed
and replaced by...
. This doesn't change the previous behavior, e.g.
df$unnest(names = c("a", "b"))
still works (#1170).
Full Changelog: v0.18.0...v0.19.0