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
2-d NDSparse with 10 values (2 field named tuples):
A B │ C data
───────────┼───────────
"a1" "b3" │ "c1" 2
"a2" "b1" │ "c1" 2
"a3" "b2" │ "c3" 4
"a3" "b2" │ "c2" 3
I would like to index the table like the following
mytable["a1","b3"]
Which works fine, however, when I try to index on one of the keys pairs that is not unique I get the following error. Have I missed something, is this not allowed for non-unique keys, or is this a bug?
mytable["a3","b2"]
ERROR: KeyError: key ("a3", "b2") not found
Stacktrace:
[1] _getindex_scalar(::IndexedTables.NDSparse{NamedTuples._NT_T_data{String,Int64},Tuple{String,String},IndexedTables.Columns{Name
dTuples._NT_R_S{String,String},NamedTuples._NT_R_S{PooledArrays.PooledArray{String,UInt8,1,Array{UInt8,1}},PooledArrays.PooledArray
{String,UInt8,1,Array{UInt8,1}}}},IndexedTables.Columns{NamedTuples._NT_T_data{String,Int64},NamedTuples._NT_T_data{PooledArrays.Po
oledArray{String,UInt8,1,Array{UInt8,1}},Array{Int64,1}}}}, ::Tuple{String,String}) at C:\Users\y66534.julia\v0.6\IndexedTables\sr
c\indexing.jl:10
[2] getindex(::IndexedTables.NDSparse{NamedTuples._NT_T_data{String,Int64},Tuple{String,String},IndexedTables.Columns{NamedTuples.
_NT_R_S{String,String},NamedTuples._NT_R_S{PooledArrays.PooledArray{String,UInt8,1,Array{UInt8,1}},PooledArrays.PooledArray{String,
UInt8,1,Array{UInt8,1}}}},IndexedTables.Columns{NamedTuples._NT_T_data{String,Int64},NamedTuples._NT_T_data{PooledArrays.PooledArra
y{String,UInt8,1,Array{UInt8,1}},Array{Int64,1}}}}, ::String, ::String) at C:\Users\userid.julia\v0.6\IndexedTables\src\indexing.j
l:3
[3] eval(::Module, ::Any) at .\boot.jl:235
[4] eval(::Any) at .\boot.jl:234
[5] macro expansion at C:\Users\userid.julia\v0.6\Atom\src\repl.jl:118 [inlined]
[6] anonymous at .<missing>:?
The text was updated successfully, but these errors were encountered:
I have a table like the following
I would like to index the table like the following
Which works fine, however, when I try to index on one of the keys pairs that is not unique I get the following error. Have I missed something, is this not allowed for non-unique keys, or is this a bug?
The text was updated successfully, but these errors were encountered: