Open
Description
Would it be possible, within a @by block, to make the grouped by columns available as single values rather then vectors?
In the below, I'd like to create a column of myCurve
structs, but because the :name
column comes through as a vector, it only works for the myCurve_name_vec
structs. I could convert it, it just wouldn't be so clean.
More generally, if you are grouping by a column, any related calculations would likely use that column as a single value.
@with_kw struct myCurve
name::Symbol
curve::Vector{Int64}
end
@with_kw struct myCurve_name_vec
name::Vector{Symbol}
curve::Vector{Int64}
end
d = DataFrame( name=[:a,:a,:a,:b,:b,:b], curve =[1,2,3,11,12,13] )
@by d :name :x = myCurve_with_vec( AsTable(:)... ) #works
@by d :name :x = myCurve( AsTable(:)... ) #doesn't work
Metadata
Metadata
Assignees
Labels
No labels