Skip to content

Commit

Permalink
fix!: warn for pl$DataFrame(<data.frame>) (#1275)
Browse files Browse the repository at this point in the history
Co-authored-by: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com>
  • Loading branch information
eitsupi and etiennebacher authored Nov 4, 2024
1 parent 95e22a5 commit 2a66f27
Show file tree
Hide file tree
Showing 149 changed files with 545 additions and 570 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

- `<Series>$compare()` is removed. (#1272)

### Deprecations

- Passing a single data.frame to `pl$DataFrame()` or `pl$LazyFrame()` to convert a
data.frame to a polars DataFrame or LazyFrame is deprecated and a warning will
be shown. Use `as_polars_df()` or `as_polars_lf()` instead (#1275).

### Bug fixes

- Maintain level order when converting Enums to factors (#1252, @andyquinterom).
Expand Down
6 changes: 3 additions & 3 deletions R/after-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ extendr_method_to_pure_functions = function(env, class_name = NULL) {
#' @export
#' @examples
#' # .pr$DataFrame$print() is an external function where self is passed as arg
#' .pr$DataFrame$print(self = pl$DataFrame(iris))
#' .pr$DataFrame$print(self = as_polars_df(iris))
#'
#' # show all content of .pr
#' .pr$print_env(.pr, ".pr the collection of private method calls to rust-polars")
Expand Down Expand Up @@ -332,12 +332,12 @@ pl_mem_address = function(robj) {
#' @return not applicable
#' @examples
#' # all a polars object is only made of:
#' some_polars_object = pl$DataFrame(iris)
#' some_polars_object = as_polars_df(iris)
#' str(some_polars_object) # External Pointer tagged with a class attribute.
#'
#' # All state is stored on rust side.
#'
#' # The single exception from the rule is class "GroupBy", where objects also have
#' # two private attributes "groupby_input" and "maintain_order".
#' str(pl$DataFrame(iris)$group_by("Species"))
#' str(as_polars_df(iris)$group_by("Species"))
NULL
Loading

0 comments on commit 2a66f27

Please sign in to comment.