-
Notifications
You must be signed in to change notification settings - Fork 2
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
readdlm
dictionary parsing default behavior
#13
Comments
What did you expect from julia> filter(t -> isa(t, Float64), english)
3-element Array{Any,1}:
Inf
NaN
NaN and the second argument in parse should be a string. julia> parse(Float64, NaN)
ERROR: MethodError: no method matching parse(::Type{Float64}, ::Float64)
Closest candidates are:
parse{T<:AbstractFloat}(::Type{T<:AbstractFloat}, ::AbstractString)
in eval(::Module, ::Any) at ./boot.jl:225
in macro expansion at ./REPL.jl:92 [inlined]
in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:46 |
Yes, I am not thinking this early. I updated the original comment. I feel that this should return a list of strings by default (would be what I would expect) but this is debatable because |
readdlm
cannot parse the dictionary correctly by defaultreaddlm
dictionary parsing default behavior
I think every other DLM reader I've encountered will first check if a column is entirely boolean/numeric, and if not will just return strings for each cell. Returning a hybrid of both is weird. |
Solution: delete |
@tanmaykm said he is working on a better |
How is deleting it not a solution? Both DataFrames and CSV.jl already offer better solutions to this. |
Even if the code that's currently in base is going to be improved, there's not much reason for it to remain in this repository and coupled to the release schedule of the core language and compiler. |
💯 CSV parsing is complicated enough that it should be moved out of the base language. |
Yes, CSV parsing is complicated, but dlm parsing is not. The current Julia repo has a bunch of other things that make things convenient for users of such systems - and I don't see why reading simple delimited files is the thing that has to be booted. Why do I have to install a package to load a simple file? |
This implementation is a nightmare and it's awful to maintain when we change things in Base. |
The fact that we have |
I think we should have readdlm only, and have it only support simple
delimited files, not csv, and remove the readcsv function from Base.
|
|
The implementation is a nightmare for good reason. I think it will simplify over time as the compiler gets better, and by being strict about the files that it accepts. |
+1 for removing. Apart from threads by people complaining about poor performance and lack of options of this function, Julia has been criticized for having a too big standard library. |
Yes, I think we should deprecate |
reading in simple homogeneous (typed) text files is really handy esp. for testing so delegating this job to CSV.jl or similar package seems like overkill. I think that |
I would be fine with having something simple, fast and reliable in Base; that is not what we have atm. |
The text was updated successfully, but these errors were encountered: