tidypolars 0.17.0
tidypolars requires polars >= 1.9.0 and dplyr >= 1.2.0.
Breaking changes and deprecations
-
The following functions (deprecated since 0.10.0, August 2024) are now removed
(#303):describe(), usesummary()instead.describe_plan()anddescribe_optimized_plan(), use
explain(optimized = TRUE/FALSE)instead.
-
make_unique_id()is deprecated and will be removed in a future version. This
is because the underlying Polars function isn't guaranteed to give the same
results across different versions. This function doesn't have a replacement in
tidypolars(#304). -
In
partition_by_key()andpartition_by_max_size()(both already deprecated
in 0.16.0), the argumentper_partition_sort_byhas been removed (#322).
New features
-
Added support for
dplyr::near()(#311). -
pivot_wider()now works with Polars LazyFrames (#318). -
Added support for several functions implemented in
dplyr1.2.0: -
separate()now supports regex in thesepargument (#320).
Other changes
-
Several changes to make
tidypolarsmore aligned with thetidyverseoutput
in general (#316):- in
count(), ifsort = TRUEand there are some ties, then other variables
are sorted in increasing order. coalesce()no longer has adefaultargument. This was an implementation
mistake sincedplyr::coalesce()never had this argument.ungroup()used to remove the group-specific attributes in the original
grouped data, even if the result of the operation was not assigned. This is
fixed.replace_na()on a Polars DataFrame or LazyFrame now errors ifreplacement
is not a list.slice_*()functions on grouped data return columns in the same order as in
the input.summarize()with onlyNULLexpressions now returns one row per unique
group instead of the entire data.unite()now returns columns in the correct order, and doesn't duplicate the
sepin the output if some values areNA.
- in
Bug fixes
bind_rows_polars()now uses input names in.idif not all inputs are named,
for examplebind_rows_polars(x1 = x1, x2, .id = "id")(#317).