keywords arguments of same length as series get grouped
This commit is contained in:
parent
c76855698e
commit
9529246bfb
@ -854,7 +854,7 @@ end
|
||||
# expecting a mapping of "group label" to "group indices"
|
||||
function extractGroupArgs{T, V<:AVec{Int}}(idxmap::Dict{T,V}, args...)
|
||||
groupLabels = sortedkeys(idxmap)
|
||||
groupIds = VecI[collect(idxmap[k]) for k in groupLabels]
|
||||
groupIds = Vector{Int}[collect(idxmap[k]) for k in groupLabels]
|
||||
GroupBy(groupLabels, groupIds)
|
||||
end
|
||||
|
||||
|
||||
@ -515,6 +515,13 @@ end
|
||||
@series begin
|
||||
label --> string(glab)
|
||||
idxfilter --> groupby.groupIds[i]
|
||||
for (key,val) in d
|
||||
length(args) == 0 && break
|
||||
if key != :group && isa(val, AbstractArray) && size(val,1) == size(args[1],1)
|
||||
n = ndims(val)
|
||||
:($key) := val[groupby.groupIds[i], fill(Colon(), n-1)...]
|
||||
end
|
||||
end
|
||||
args
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user