Skip to content

v0.18.0

Compare
Choose a tag to compare
@eitsupi eitsupi released this 05 Jul 15:02

Breaking changes

  • Updated rust-polars to 0.41.3 (#1147, #1156).
  • In $n_chunks(), the default value of strategy now is "first" (#1137).
  • $sample() for Expr and DataFrame (#1136):
    • the argument frac is renamed fraction;
    • 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).
  • $melt() had several changes (#1147):
    • melt() is renamed $unpivot().
    • Some arguments were renamed: id_vars is now index, value_vars is now
      on.
    • The order of arguments has changed: on is now first, then index. The
      order of the other arguments hasn't changed. Note that on can be unnamed
      but all the other arguments must be named.
  • pivot() had several changes (#1147):
    • The argument columns is renamed on.
    • The order of arguments has changed: on is now first, then index and
      values. The order of the other arguments hasn't changed. Note that on
      can be unnamed but all the other arguments must be named.
  • In $write_parquet() and $sink_parquet(), the default value of argument
    statistics is now TRUE and can take other values than TRUE/FALSE (#1147).
  • In $dt$truncate() and $dt$round(), the argument offset has been removed.
    Use $dt$offset_by() after those functions instead (#1147).
  • In $top_k() and $bottom_k() for Expr, the arguments nulls_last,
    maintain_order and multithreaded have been removed. If any null values
    are in the top/bottom k 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 and return_dtype anymore.
    • $replace_strict() replaces all values by different values. If a value
      doesn't have a specific mapping, it is replaced by the default value.
  • $str$concat() is deprecated, use $str$join() (with the same arguments)
    instead (#1147).
  • In pl$date_range() and pl$date_ranges(), the arguments time_unit and
    time_zone have been removed. They were deprecated in previous versions
    (#1147).
  • In $join(), when how = "cross", on, left_on and right_on must be
    NULL (#1147).

New features

  • New method $has_nulls() (#1133).
  • New method $list$explode() (#1139).
  • $over() gains a new argument order_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 argument normalize to give relative frequencies
    of unique values instead of their count (#1147).

New Contributors

Full Changelog: v0.17.0...v0.18.0