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

Implement <DataFrame>$flags and improve <Series>$flags #809

Merged
merged 10 commits into from
Feb 16, 2024

Conversation

etiennebacher
Copy link
Collaborator

One issue here is that I'm actually not sure what the "FAST_EXPLODE" actually means (which is why I didn't explain in the docs)

NEWS.md Outdated Show resolved Hide resolved
R/dataframe__frame.R Outdated Show resolved Hide resolved
@eitsupi eitsupi self-assigned this Feb 16, 2024
@eitsupi
Copy link
Collaborator

eitsupi commented Feb 16, 2024

Sorry, it is the Python world that calls such things "attributes", and here (in R) "active bindings" was appropriate.

#' - `SORTED_DESC` is similar but applies to sort in decreasing order.
#'
#' @details Check out the source code in
#' [R/dataframe_frame.R](https://github.com/pola-rs/r-polars/blob/main/R/dataframe__frame.R)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think such things should be placed here (they should be in the developer's documentation), but since they are irrelevant to this PR, I'll leave them alone.

@@ -74,6 +94,15 @@
NULL


DataFrame_flags = method_as_property(function() {
out = lapply(self$columns, \(x) {
self[x]$to_series()$flags
Copy link
Collaborator

Choose a reason for hiding this comment

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

to_series() is needed here?
How about self[, x]?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How about self[, x]?

Yes that's simpler, good catch

@etiennebacher etiennebacher merged commit 9cf0768 into main Feb 16, 2024
24 checks passed
@etiennebacher etiennebacher deleted the dataframe-flags branch February 16, 2024 19:54
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