Skip to content

tidypolars 0.17.0

Choose a tag to compare

@etiennebacher etiennebacher released this 12 Feb 11:03

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(), use summary() instead.
    • describe_plan() and describe_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() and partition_by_max_size() (both already deprecated
    in 0.16.0), the argument per_partition_sort_by has 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 dplyr 1.2.0:

    • filter_out() (#280)
    • recode_values() (#308)
    • replace_values() (#308)
    • replace_when() (#307)
    • when_any() (#306)
    • when_all() (#306)
  • separate() now supports regex in the sep argument (#320).

Other changes

  • Several changes to make tidypolars more aligned with the tidyverse output
    in general (#316):

    • in count(), if sort = TRUE and there are some ties, then other variables
      are sorted in increasing order.
    • coalesce() no longer has a default argument. This was an implementation
      mistake since dplyr::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 if replacement
      is not a list.
    • slice_*() functions on grouped data return columns in the same order as in
      the input.
    • summarize() with only NULL expressions 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
      sep in the output if some values are NA.

Bug fixes

  • bind_rows_polars() now uses input names in .id if not all inputs are named,
    for example bind_rows_polars(x1 = x1, x2, .id = "id") (#317).