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

refactor!: updated some functions to be equivalent to Python Polars #852

Merged
merged 15 commits into from
Feb 26, 2024

Conversation

eitsupi
Copy link
Collaborator

@eitsupi eitsupi commented Feb 25, 2024

No description provided.

@eitsupi eitsupi marked this pull request as ready for review February 25, 2024 10:09
@eitsupi eitsupi marked this pull request as draft February 25, 2024 10:12
@eitsupi eitsupi marked this pull request as ready for review February 25, 2024 10:28
@eitsupi
Copy link
Collaborator Author

eitsupi commented Feb 25, 2024

Oops, I didn't realize that pl$col() takes variable length arguments. Perhaps columns are to be changed to ....

@eitsupi eitsupi marked this pull request as draft February 25, 2024 10:33
@eitsupi eitsupi marked this pull request as ready for review February 25, 2024 10:47
@eitsupi
Copy link
Collaborator Author

eitsupi commented Feb 25, 2024

Oops, I didn't realize that pl$col() takes variable length arguments. Perhaps columns are to be changed to ....

I thought this for a moment, but then I realized that enforcing a character vector is not a bad thing.
When variable-length arguments are employed, the names of additional arguments are required. Which is better?

Copy link
Collaborator

@etiennebacher etiennebacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice refactor again

NEWS.md Outdated Show resolved Hide resolved
R/functions__lazy.R Outdated Show resolved Hide resolved
R/functions__lazy.R Outdated Show resolved Hide resolved
R/functions__lazy.R Outdated Show resolved Hide resolved
tests/testthat/test-context.R Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
@@ -232,7 +232,7 @@ ExprStr_len_chars = function() {
#'
#' # Series list of strings to Series of concatenated strings
#' df = pl$DataFrame(list(bar = list(c("a", "b", "c"), c("1", "2", NA))))
#' df$select(pl$col("bar")$list$eval(pl$col()$str$concat())$list$first())
#' df$select(pl$col("bar")$list$eval(pl$col("")$str$concat("-"))$list$first())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python will raise a warning if the concat() argument is missing. I will update that with another PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #853

NEWS.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@etiennebacher etiennebacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @eitsupi

@etiennebacher etiennebacher merged commit 663528e into main Feb 26, 2024
18 checks passed
@etiennebacher etiennebacher deleted the fix-some-funtions branch February 26, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants