Closed harryscholes closed 5 years ago
julia> using MLDataUtils, DataFrames julia> df = DataFrame(x1 = rand(4), x2 = rand(4)) 4×2 DataFrame │ Row │ x1 │ x2 │ │ │ Float64 │ Float64 │ ├─────┼──────────┼──────────┤ │ 1 │ 0.37981 │ 0.228025 │ │ 2 │ 0.634218 │ 0.653241 │ │ 3 │ 0.132821 │ 0.21506 │ │ 4 │ 0.445011 │ 0.606587 │ julia> train, test = splitobs(df) ERROR: BoundsError: attempt to access "invalid columns 1:3 selected" Stacktrace: [1] Type at /Users/harry/.julia/packages/DataFrames/IKMvt/src/other/index.jl:280 [inlined] [2] Type at /Users/harry/.julia/packages/DataFrames/IKMvt/src/subdataframe/subdataframe.jl:41 [inlined] [3] Type at /Users/harry/.julia/packages/DataFrames/IKMvt/src/subdataframe/subdataframe.jl:43 [inlined] [4] view at /Users/harry/.julia/packages/DataFrames/IKMvt/src/subdataframe/subdataframe.jl:87 [inlined] [5] view at /Users/harry/.julia/packages/DataFrames/IKMvt/src/subdataframe/subdataframe.jl:82 [inlined] [6] datasubset(::DataFrame, ::UnitRange{Int64}, ::LearnBase.ObsDim.Undefined) at /Users/harry/.julia/packages/MLDataUtils/Onazx/src/datapattern.jl:10 [7] splitobs at /Users/harry/.julia/packages/MLDataPattern/mX21p/src/splitobs.jl:121 [inlined] [8] #splitobs#59 at /Users/harry/.julia/packages/MLDataPattern/mX21p/src/splitobs.jl:113 [inlined] [9] splitobs(::DataFrame) at /Users/harry/.julia/packages/MLDataPattern/mX21p/src/splitobs.jl:113 [10] top-level scope at none:0
This just caught me too.
It also does not work for batchview. I suspect it is fully broken.
batchview
Migth as well change to Tables #46 while fixing it