Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

splitobs(df) docs example does not work #44

Closed
harryscholes opened this issue Feb 27, 2019 · 2 comments
Closed

splitobs(df) docs example does not work #44

harryscholes opened this issue Feb 27, 2019 · 2 comments
Assignees

Comments

@harryscholes
Copy link

julia> using MLDataUtils, DataFrames

julia> df = DataFrame(x1 = rand(4), x2 = rand(4))
4×2 DataFrame
│ Row │ x1       │ x2       │
│     │ Float64  │ Float64  │
├─────┼──────────┼──────────┤
│ 10.379810.228025 │
│ 20.6342180.653241 │
│ 30.1328210.21506  │
│ 40.4450110.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
@Evizero Evizero self-assigned this Feb 27, 2019
@oxinabox
Copy link
Member

oxinabox commented Apr 5, 2019

This just caught me too.

@oxinabox
Copy link
Member

oxinabox commented Apr 5, 2019

It also does not work for batchview.
I suspect it is fully broken.

Migth as well change to Tables #46 while fixing it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants