Hi,

Using a freshly updated Version 0.3.0-prerelease+3251 (2014-05-20 23:18 UTC) of 
Julia I think I noticed a different behavior of readtable(), which I hope is 
not intended.

I have a small test file with data as shown below (and attached as a file at 
the end of the email):

lp__,accept_stat__,stepsize__,treedepth__,n_leapfrog__,n_divergent__,mu
# Adaptation terminated

-19.8871,0.975123,0.303529,4,15,0,4.25051
-22.1208,0.971631,0.303529,3,7,0,8.55276
-23.8336,0.857954,0.303529,4,15,0,4.41087

If I remove the commented line ("# Adaptation terminated"), readtable() has no 
problem, but if it's there readtable() seems to ignore the 'allowcomments=true'.

I didn't update DataFrames as far as I am aware, but once or twice today I did 
pull Julia's master from github.

I wonder if someone could try this example. Thanks a lot.

Rob J. Goedman
goed...@icloud.com


julia> df = readtable("schools8_samples.csv", allowcomments=true)
ERROR: Saw 4 rows, 5 columns and 22 fields
 * Line 1 has 3 columns

 in error at error.jl:21
 in findcorruption at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:680
 in readtable! at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:731
 in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:812
 in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:879

julia> df = readtable("schools8_samples.csv", allowcomments=true)
3x7 DataFrame
|-------|---------------|---------|---------|
| Col # | Name          | Eltype  | Missing |
| 1     | lp__          | Float64 | 0       |
| 2     | accept_stat__ | Float64 | 0       |
| 3     | stepsize__    | Float64 | 0       |
| 4     | treedepth__   | Int64   | 0       |
| 5     | n_leapfrog__  | Int64   | 0       |
| 6     | n_divergent__ | Int64   | 0       |
| 7     | mu            | Float64 | 0       |





lp__,accept_stat__,stepsize__,treedepth__,n_leapfrog__,n_divergent__,mu

-19.8871,0.975123,0.303529,4,15,0,4.25051
-22.1208,0.971631,0.303529,3,7,0,8.55276
-23.8336,0.857954,0.303529,4,15,0,4.41087

Reply via email to