v0.18.0
Breaking changes
- Updated rust-polars to 0.41.3 (#1147, #1156).
- In
$n_chunks()
, the default value ofstrategy
now is"first"
(#1137). $sample()
for Expr and DataFrame (#1136):- the argument
frac
is renamedfraction
; - all the arguments except
n
must be named; - for the Expr method only, the first argument is now
n
(it was already the
case for the DataFrame method); - for the Expr method only, the default value for
with_replacement
is now
FALSE
(it was already the case for the DataFrame method).
- the argument
$melt()
had several changes (#1147):melt()
is renamed$unpivot()
.- Some arguments were renamed:
id_vars
is nowindex
,value_vars
is now
on
. - The order of arguments has changed:
on
is now first, thenindex
. The
order of the other arguments hasn't changed. Note thaton
can be unnamed
but all the other arguments must be named.
pivot()
had several changes (#1147):- The argument
columns
is renamedon
. - The order of arguments has changed:
on
is now first, thenindex
and
values
. The order of the other arguments hasn't changed. Note thaton
can be unnamed but all the other arguments must be named.
- The argument
- In
$write_parquet()
and$sink_parquet()
, the default value of argument
statistics
is nowTRUE
and can take other values thanTRUE/FALSE
(#1147). - In
$dt$truncate()
and$dt$round()
, the argumentoffset
has been removed.
Use$dt$offset_by()
after those functions instead (#1147). - In
$top_k()
and$bottom_k()
forExpr
, the argumentsnulls_last
,
maintain_order
andmultithreaded
have been removed. If anynull
values
are in the top/bottomk
values, they will always be positioned last (#1147). $replace()
has been split in two functions depending on the desired
behaviour (#1147):$replace()
recodes some values in the column, leaving all other values
unchanged. Compared to the previous version, it doesn't use the arguments
default
andreturn_dtype
anymore.$replace_strict()
replaces all values by different values. If a value
doesn't have a specific mapping, it is replaced by thedefault
value.
$str$concat()
is deprecated, use$str$join()
(with the same arguments)
instead (#1147).- In
pl$date_range()
andpl$date_ranges()
, the argumentstime_unit
and
time_zone
have been removed. They were deprecated in previous versions
(#1147). - In
$join()
, whenhow = "cross"
,on
,left_on
andright_on
must be
NULL
(#1147).
New features
- New method
$has_nulls()
(#1133). - New method
$list$explode()
(#1139). $over()
gains a new argumentorder_by
to specify the order of values
within each group. This is useful when the operation depends on the order of
values, such as$shift()
(#1147).$value_counts()
gains an argumentnormalize
to give relative frequencies
of unique values instead of their count (#1147).
New Contributors
- @ju6ge made their first contribution in #1135
- @shikokuchuo made their first contribution in #1160
Full Changelog: v0.17.0...v0.18.0