Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: warn for pl$DataFrame(<data.frame>) #1275

Merged
merged 6 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

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

### Deprecations

- Passing a single data.frame to `pl$DataFrame()` to convert a data.frame to a polars DataFrame is deprecated and a warning will be shown (#1275).
Use `as_polars_df()` instead.
etiennebacher marked this conversation as resolved.
Show resolved Hide resolved

### 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