You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not to a be a thorn in your side but looks like I uncovered another issue. I was playing around some more with DataFrames and converted a few fields to the Categorical Type and then piped it into Voyager and got a similar error as this one. Its pretty much the same problem as issue #9 . I don't think its a super high priority issue but something to be aware of.
using Queryverse
macro __str(x)
:(Symbol($x))
end
# load some data into a dataframe
df = load("/home/mcamp/JuliaProjects/eeg-brain-wave-for-confusion/EEG_data.csv") |> DataFrame
cols = names(df)
cols[15] = _"UserDefinedLabel"
cols[14] = _"PreDefinedLabel"
names!(df, cols)
categorical!(df,:SubjectID)
categorical!(df,:UserDefinedLabel)
categorical!(df,:PreDefinedLabel)
categorical!(df,:VideoID)
df |> Voyager()
Retruns:
MethodError: Cannot `convert` an object of type Float64 to an object of type CategoricalValue{Float64,UInt32}
Closest candidates are:
convert(::Type{T<:(Union{CategoricalString{R}, CategoricalValue{T,R} where T} where R)}, !Matched::T<:(Union{CategoricalString{R}, CategoricalValue{T,R} where T} where R)) where T<:(Union{CategoricalString{R}, CategoricalValue{T,R} where T} where R) at /home/mcamp/.julia/packages/CategoricalArrays/04bks/src/value.jl:65
convert(::Type{S}, !Matched::T<:(Union{CategoricalString{R}, CategoricalValue{T,R} where T} where R)) where {S, T<:(Union{CategoricalString{R}, CategoricalValue{T,R} where T} where R)} at /home/mcamp/.julia/packages/CategoricalArrays/04bks/src/value.jl:66
convert(::Type{T}, !Matched::T) where T at essentials.jl:154
...
Stacktrace:
[1] setindex!(::Dict{Symbol,CategoricalValue{Float64,UInt32}}, ::Float64, ::Symbol) at ./dict.jl:381
[2] Dict{Symbol,CategoricalValue{Float64,UInt32}}(::Base.Generator{Base.Iterators.Zip2{NTuple{15,Symbol},Tuple{CategoricalValue{Float64,UInt32},CategoricalValue{Float64,UInt32},Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,CategoricalValue{Float64,UInt32},CategoricalValue{Float64,UInt32}}},getfield(DataVoyager, Symbol("##2#4"))}) at ./dict.jl:104
[3] dict_with_eltype at ./abstractdict.jl:541 [inlined]
[4] macro expansion at ./array.jl:591 [inlined]
[5] dict_with_eltype at ./abstractdict.jl:546 [inlined]
[6] Dict(::Base.Generator{Base.Iterators.Zip2{NTuple{15,Symbol},Tuple{CategoricalValue{Float64,UInt32},CategoricalValue{Float64,UInt32},Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,CategoricalValue{Float64,UInt32},CategoricalValue{Float64,UInt32}}},getfield(DataVoyager, Symbol("##2#4"))}) at ./dict.jl:129
[7] #1 at ./none:0 [inlined]
[8] iterate at ./generator.jl:47 [inlined]
[9] collect(::Base.Generator{TableTraitsUtils.TableIterator{NamedTuple{(:SubjectID, :VideoID, :Attention, :Mediation, :Raw, :Delta, :Theta, :Alpha1, :Alpha2, :Beta1, :Beta2, :Gamma1, :Gamma2, :PreDefinedLabel, :UserDefinedLabel),Tuple{CategoricalValue{Float64,UInt32},CategoricalValue{Float64,UInt32},Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,Float64,CategoricalValue{Float64,UInt32},CategoricalValue{Float64,UInt32}}},Tuple{CategoricalArray{Float64,1,UInt32,Float64,CategoricalValue{Float64,UInt32},Union{}},CategoricalArray{Float64,1,UInt32,Float64,CategoricalValue{Float64,UInt32},Union{}},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},Array{Float64,1},CategoricalArray{Float64,1,UInt32,Float64,CategoricalValue{Float64,UInt32},Union{}},CategoricalArray{Float64,1,UInt32,Float64,CategoricalValue{Float64,UInt32},Union{}}}},getfield(DataVoyager, Symbol("##1#3"))}) at ./array.jl:619
[10] (::Voyager)(::DataFrame) at /home/mcamp/.julia/packages/DataVoyager/h5fKO/src/DataVoyager.jl:36
[11] |>(::DataFrame, ::Voyager) at ./operators.jl:813
[12] top-level scope at In[18]:20
The text was updated successfully, but these errors were encountered:
Not to a be a thorn in your side but looks like I uncovered another issue. I was playing around some more with DataFrames and converted a few fields to the Categorical Type and then piped it into Voyager and got a similar error as this one. Its pretty much the same problem as issue #9 . I don't think its a super high priority issue but something to be aware of.
data: eeg-brain-wave-for-confusion
Retruns:
The text was updated successfully, but these errors were encountered: