Reputation: 2508
I installed the DataFrames package using JuliaStudio, with no problems. Then I tried to replicate the simple example here using the following code
using DataFrames
cd("my local directory here")
readtable("maindata.csv")
and got this error:
no method readtable!
(ParsedCSV,IOStream,Int64,ParseOptions{ASCIIString,UTF8String})
In the packages folder, I opened the file io.jl and saw the types that readtable! is expecting don't match what is shown in the error above.
function readtable!(p::ParsedCSV,
io::IO,
nrows::Int,
o::ParseOptions)
So I changed the second and third types in the readtable!
definition to IOStream
and Int64
, respectively to match what the error above was showing. Then I tried to run
readtable("maindata.csv")
again, and got the same error, but for a different function:
no method readnrows!
(ParsedCSV,IOStream,Int64,ParseOptions{ASCIIString,UTF8String})
How can I get the function readtable()
to read my file successfully without needing to edit the types in all the package functions?
Upvotes: 3
Views: 577
Reputation: 226766
Perhaps a disappointing answer, but this problem appears to be solved in the prerelease version/with version 0.5.4 of DataFrames
.
julia> versioninfo(true)
Julia Version 0.3.0-prerelease
Platform Info:
System: Linux (i686-linux-gnu)
CPU: Intel(R) Core(TM)2 Duo CPU P8800 @ 2.66GHz
WORD_SIZE: 32
Ubuntu 12.04.4 LTS
uname: Linux 3.2.0-61-generic-pae #92-Ubuntu SMP Tue Apr 1 00:10:04 UTC 2014 i686 i686
Package Directory: /home/bolker/.julia/v0.3
3 required packages:
- DataFrames 0.5.4
- MixedModels 0.3.1
- RDatasets 0.1.1
Upvotes: 1