Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with readtable #382

Closed
nalimilan opened this issue Oct 21, 2013 · 4 comments
Closed

Errors with readtable #382

nalimilan opened this issue Oct 21, 2013 · 4 comments

Comments

@nalimilan
Copy link
Member

I'm getting an error when reading a CSV file:

> df = readtable("somefile.csv")
DataFrame with 4596 rows, 7 columns
Columns:

WARNING: max(x) is deprecated, use maximum(x) instead.
 in depwarn at deprecated.jl:29
 in max at deprecated.jl:19
 in format_table at /home/milan/.julia/DataFrames/src/dataframe.jl:903
 in column_summary at /home/milan/.julia/DataFrames/src/dataframe.jl:913
 in show at /home/milan/.julia/DataFrames/src/dataframe.jl:890
 in anonymous at no file:930
 in with_output_limit at show.jl:907
 in showlimited at show.jl:929
 in writemime at repl.jl:2
 in display at multimedia.jl:111
 in display at multimedia.jl:113
 in display at multimedia.jl:145
Evaluation succeeded, but an error occurred while showing value of type DataFrame:
ERROR: max: ordering is not well-defined for arrays
 in maximum at reduce.jl:33
 in max at deprecated.jl:21
 in format_table at /home/milan/.julia/DataFrames/src/dataframe.jl:903
 in column_summary at /home/milan/.julia/DataFrames/src/dataframe.jl:913
 in show at /home/milan/.julia/DataFrames/src/dataframe.jl:890
 in anonymous at no file:930
 in with_output_limit at show.jl:907
 in showlimited at show.jl:929
 in writemime at repl.jl:2
 in display at multimedia.jl:111
 in display at multimedia.jl:113
 in display at multimedia.jl:145

The first error (not the warning) can be reproduced with these contents:

K1,ROW_LABEL,age6,diplo,csp,local,revenu
c'est tout; l'espace en général,4   ,34-45a,Sup,ajf&dkf,THG,4b20MG

Also, only with the full file, if I try to change the separator to ';' (which is wrong for this file), I get a cryptic error:

> df = readtable("somefile.csv", separator=';')
ERROR: BoundsError()
 in findcorruption at /home/milan/.julia/DataFrames/src/io.jl:467
 in readtable! at /home/milan/.julia/DataFrames/src/io.jl:525
 in readtable at /home/milan/.julia/DataFrames/src/io.jl:595
@ivarne
Copy link

ivarne commented Oct 21, 2013

This is because of JuliaLang/julia#4235. Unfortunately I did not understand the rationale behind the renaming, so I won't change code I do not understand, but probably the only required action is to change max in https://github.com/JuliaStats/DataFrames.jl/blob/master/src/dataframe.jl#L903 to maximum.

@johnmyleswhite
Copy link
Contributor

This seems to have been fixed by some of Dahua's patch. Can someone confirm that this occurs on their copy of master? I don't see any errors in the test suite.

@nalimilan
Copy link
Member Author

Yeah, it works with master thanks to commit bd3e333, sorry for the noise.

@johnmyleswhite
Copy link
Contributor

No worries. Just wanted to figure out what was going on. Always really interested to see CSV files that we legitimately can't read (but should be able to).

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

No branches or pull requests

3 participants