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

Allow for scalars in a grouped @transform #99

Closed
wants to merge 1 commit into from

Conversation

pdeffebach
Copy link
Collaborator

Resolves issue #98 with a one-liner.

This way we can spread grouped vector-to-scalar operations across groups easily. This behavior is already feasible, but it threw an error with strings because eltype(String) is Char. Now it will allocate a vector of type String.

Next step is to automatically expand the type of the vector if a group is entirely missing. Note that this would have thrown an error before this PR as well.

@bkamins
Copy link
Member

bkamins commented Aug 2, 2018

Actually given https://discourse.julialang.org/t/best-way-to-append-vectors-of-various-types/12837 maybe we should fix also this in one shot?

This would require precomputing all results and finding their common type. DataFrames.jl uses internal promote_col_type to achieve it.

@pdeffebach pdeffebach closed this Aug 2, 2018
@pdeffebach
Copy link
Collaborator Author

Closed in favor of #101 This has that implementation.

@pdeffebach pdeffebach deleted the grouped_eltypes branch September 17, 2018 21:34
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