TextParse Error with Inf/-Inf

I encountered an issue using JuliaDB v0.12.0 on Julia v1.1. Whenever I try to read a CSV with numbers and Inf/-Inf mixed in, the parser fails saying that Inf cannot be parsed as a Float64 and thus doesn’t match either Float64 or missing. I’m not sure how to write a custom parser to handle this case but I expected the parser to convert this to the Float64 version of Inf which in Julia is just Inf. I’ve also pasted my environment manifest file below the error message.

What would be the easiest way to parse this into an indexed table with the expected Inf/-Inf behavior you get when calling parse(Float64, "Inf")?

This is what the CSV file looks like:

Test1,Test2,Test3
1,2,3
1,2,3
Inf,2.0,3.0
NA,5,2

With the file named testCSV.csv I tried running the following code

using JuliaDB
loadtable("testCSV.csv")

and received this error message:

ERROR: CSV parsing error in testCSV.csv at line 6 char 0:

Inf,2.0,3.0

^

column 1 is expected to be: TextParse.Field{Union{Missing, Float64},TextParse.NAToken{Union{Missing, Float64},TextParse.Numeric{Float64}}}(?, true, true, false)

parsefill!(::TextParse.VectorBackedUTF8String, ::TextParse.LocalOpts{UInt8,UInt8,UInt8}, ::TextParse.Record{Tuple{TextParse.Field{Union{Missing, Float64},TextParse.NAToken{Union{Missing, Float64},TextParse.Numeric{Float64}}},TextParse.Field{Float64,TextParse.Numeric{Float64}},TextParse.Field{Float64,TextParse.Numeric{Float64}}},Tuple{Union{Missing, Float64},Float64,Float64}}, ::Int64, ::Tuple{Array{Union{Missing, Float64},1},Array{Float64,1},Array{Float64,1}}, ::OrderedCollections.OrderedDict{Union{Int64, String},AbstractArray{T,1} where T}, ::Int64, ::Int64, ::Int64, ::Int64, ::Nothing) at /Users/jekyllstein/.julia/packages/TextParse/E6Z0e/src/csv.jl:560

#_csvread_internal#26(::Bool, ::Char, ::Char, ::Nothing, ::Type, ::Type, ::Bool, ::Int64, ::Nothing, ::Nothing, ::Int64, ::Array{Any,1}, ::Bool, ::Array{String,1}, ::Array{String,1}, ::OrderedCollections.OrderedDict{Union{Int64, String},AbstractArray{T,1} where T}, ::Int64, ::Nothing, ::Array{Any,1}, ::String, ::Int64, ::typeof(TextParse._csvread_internal), ::TextParse.VectorBackedUTF8String, ::Char) at /Users/jekyllstein/.julia/packages/TextParse/E6Z0e/src/csv.jl:328

(::getfield(TextParse, Symbol("#kw##_csvread_internal")))(::NamedTuple{(:filename, :noresize, :colspool, :samecols),Tuple{String,Bool,OrderedCollections.OrderedDict{Union{Int64, String},AbstractArray{T,1} where T},Array{Any,1}}}, ::typeof(TextParse._csvread_internal), ::TextParse.VectorBackedUTF8String, ::Char) at ./none:0

(::getfield(TextParse, Symbol("##22#24")){Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:noresize, :colspool, :samecols),Tuple{Bool,OrderedCollections.OrderedDict{Union{Int64, String},AbstractArray{T,1} where T},Array{Any,1}}}},String,Char})(::IOStream) at /Users/jekyllstein/.julia/packages/TextParse/E6Z0e/src/csv.jl:110

#open#310(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(TextParse, Symbol("##22#24")){Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:noresize, :colspool, :samecols),Tuple{Bool,OrderedCollections.OrderedDict{Union{Int64, String},AbstractArray{T,1} where T},Array{Any,1}}}},String,Char}, ::String, ::Vararg{String,N} where N) at ./iostream.jl:369

open at ./iostream.jl:367 [inlined]

#_csvread_f#20 at /Users/jekyllstein/.julia/packages/TextParse/E6Z0e/src/csv.jl:107 [inlined]

#_csvread_f at ./none:0 [inlined]

#csvread#25(::Base.Iterators.Pairs{Symbol,Array{Any,1},Tuple{Symbol},NamedTuple{(:samecols,),Tuple{Array{Any,1}}}}, ::Function, ::Array{String,1}, ::Char) at /Users/jekyllstein/.julia/packages/TextParse/E6Z0e/src/csv.jl:125

(::getfield(TextParse, Symbol("#kw##csvread")))(::NamedTuple{(:samecols,),Tuple{Array{Any,1}}}, ::typeof(csvread), ::Array{String,1}, ::Char) at ./none:0

#_loadtable_serial#3(::Char, ::Array{Any,1}, ::Nothing, ::Nothing, ::Nothing, ::Bool, ::Bool, ::typeof(csvread), ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(JuliaDB._loadtable_serial), ::UnionAll, ::Array{String,1}) at /Users/jekyllstein/.julia/packages/JuliaDB/jDAlJ/src/util.jl:83

#_loadtable_serial at ./none:0 [inlined]

(::getfield(JuliaDB, Symbol("##190#193")){Array{Any,1},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},UnionAll})(::Array{String,1}) at /Users/jekyllstein/.julia/packages/JuliaDB/jDAlJ/src/io.jl:131

do_task(::Dagger.Context, ::Dagger.OSProc, ::Int64, ::Function, ::Tuple{Array{String,1}}, ::Bool, ::Bool, ::Bool) at /Users/jekyllstein/.julia/packages/Dagger/sdZXi/src/scheduler.jl:259

#143 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Distributed/src/remotecall.jl:339 [inlined]

run_work_thunk(::getfield(Distributed, Symbol("##143#144")){typeof(Dagger.Sch.do_task),Tuple{Dagger.Context,Dagger.OSProc,Int64,getfield(JuliaDB, Symbol("##190#193")){Array{Any,1},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},UnionAll},Tuple{Array{String,1}},Bool,Bool,Bool},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}, ::Bool) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Distributed/src/process_messages.jl:56

#remotecall_fetch#148(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Function, ::Distributed.LocalProcess, ::Dagger.Context, ::Vararg{Any,N} where N) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Distributed/src/remotecall.jl:364

remotecall_fetch(::Function, ::Distributed.LocalProcess, ::Dagger.Context, ::Vararg{Any,N} where N) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Distributed/src/remotecall.jl:364

#remotecall_fetch#152(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Function, ::Int64, ::Dagger.Context, ::Vararg{Any,N} where N) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Distributed/src/remotecall.jl:406

remotecall_fetch at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Distributed/src/remotecall.jl:406 [inlined]

macro expansion at /Users/jekyllstein/.julia/packages/Dagger/sdZXi/src/scheduler.jl:272 [inlined]

(::getfield(Dagger.Sch, Symbol("##13#14")){Dagger.Context,Dagger.OSProc,Int64,getfield(JuliaDB, Symbol("##190#193")){Array{Any,1},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},UnionAll},Tuple{Array{String,1}},Channel{Any},Bool,Bool,Bool})() at ./task.jl:259

Stacktrace:

[1] compute_dag( ::Dagger.Context, ::Dagger.Thunk ) at /Users/jekyllstein/.julia/packages/Dagger/sdZXi/src/scheduler.jl:62

[2] compute( ::Dagger.Context, ::Dagger.Thunk ) at /Users/jekyllstein/.julia/packages/Dagger/sdZXi/src/compute.jl:25

[3] #fromchunks#47( ::Nothing, ::Int64, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Array{Dagger.Thunk,1} ) at /Users/jekyllstein/.julia/packages/JuliaDB/jDAlJ/src/table.jl:148

[4] (::getfield(JuliaDB, Symbol("#kw##fromchunks")))( ::NamedTuple{(:output, :fnoffset),Tuple{Nothing,Int64}}, ::typeof(JuliaDB.fromchunks), ::Array{Dagger.Thunk,1} ) at ./none:0

[5] #_loadtable#188( ::Nothing, ::Nothing, ::Bool, ::Array{Any,1}, ::Bool, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Type, ::String ) at /Users/jekyllstein/.julia/packages/JuliaDB/jDAlJ/src/io.jl:140

[6] _loadtable at /Users/jekyllstein/.julia/packages/JuliaDB/jDAlJ/src/io.jl:95 [inlined]

[7] #loadtable#186 at /Users/jekyllstein/.julia/packages/JuliaDB/jDAlJ/src/io.jl:63 [inlined]

[8] loadtable( ::String ) at /Users/jekyllstein/.julia/packages/JuliaDB/jDAlJ/src/io.jl:63

[9] top-level scope at none:0

Manifest File:

# This file is machine-generated - editing it directly is not advised

[[Arpack]]
deps = ["BinaryProvider", "Libdl", "LinearAlgebra", "Random", "SparseArrays", "Test"]
git-tree-sha1 = "1ce1ce9984683f0b6a587d5bdbc688ecb480096f"
uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"
version = "0.3.0"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BinDeps]]
deps = ["Compat", "Libdl", "SHA", "URIParser"]
git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9"
uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
version = "0.8.10"

[[BinaryProvider]]
deps = ["Libdl", "Pkg", "SHA", "Test"]
git-tree-sha1 = "055eb2690182ebc31087859c3dd8598371d3ef9e"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.3"

[[CSTParser]]
deps = ["LibGit2", "Test", "Tokenize"]
git-tree-sha1 = "437c93bc191cd55957b3f8dee7794b6131997c56"
uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
version = "0.5.2"

[[CodecZlib]]
deps = ["BinaryProvider", "Libdl", "Test", "TranscodingStreams"]
git-tree-sha1 = "36bbf5374c661054d41410dc53ff752972583b9b"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.5.2"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "84aa74986c5b9b898b0d1acaf3258741ee64754f"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "2.1.0"

[[Conda]]
deps = ["Compat", "JSON", "VersionParsing"]
git-tree-sha1 = "b625d802587c2150c279a40a646fba63f9bd8187"
uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d"
version = "1.2.0"

[[Dagger]]
deps = ["Distributed", "LinearAlgebra", "MemPool", "Profile", "Random", "Serialization", "SharedArrays", "SparseArrays", "Statistics", "StatsBase", "Test"]
git-tree-sha1 = "39dd9351c6637a71d1925e26e49adcd8a25ebf0b"
uuid = "d58978e5-989f-55fb-8d15-ea34adc7bf54"
version = "0.8.0"

[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections", "Random", "Serialization", "Test"]
git-tree-sha1 = "ca971f03e146cf144a9e2f2ce59674f5bf0e8038"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.15.0"

[[DataValues]]
deps = ["Dates", "InteractiveUtils", "LinearAlgebra", "Random", "Test"]
git-tree-sha1 = "05e4a87fe52a2af1b4a1ffd3ab2fc996c038b192"
uuid = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5"
version = "0.4.7"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[Distributions]]
deps = ["LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
git-tree-sha1 = "0d048298541db10d16110508d5146f1fd13da971"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.19.1"

[[DoubleFloats]]
deps = ["GenericSVD", "LinearAlgebra", "Polynomials", "Random", "Test"]
git-tree-sha1 = "0adca7017ef5356aedfc57be3c513c9d51ebc1b5"
uuid = "497a8b3b-efae-58df-a0af-a86822472b78"
version = "0.7.21"

[[Formatting]]
deps = ["Compat"]
git-tree-sha1 = "289003271ce9c8194c1ce56a3c433f1c51841125"
uuid = "59287772-0a20-5a39-b81b-1366585eb4c0"
version = "0.3.5"

[[GenericSVD]]
deps = ["LinearAlgebra", "Random", "Test"]
git-tree-sha1 = "8aa93c3f3d81562a8962047eafcc5712af0a0f59"
uuid = "01680d73-4ee2-5a08-a1aa-533608c188bb"
version = "0.2.1"

[[Glob]]
deps = ["Compat", "Test"]
git-tree-sha1 = "c72f1fcb7d17426de1e8af2e948dfb3de1116eed"
uuid = "c27321d9-0574-5035-807b-f59d2c89b15c"
version = "1.2.0"

[[IndexedTables]]
deps = ["DataValues", "Dates", "Distributed", "IteratorInterfaceExtensions", "OnlineStatsBase", "PooledArrays", "Random", "SparseArrays", "Statistics", "StructArrays", "TableTraits", "TableTraitsUtils", "Tables", "Test", "WeakRefStrings"]
git-tree-sha1 = "7488adb80b31cdf7c0782d27c9bb20135cde1c1a"
uuid = "6deec6e2-d858-57c5-ab9b-e6ca5bd20e43"
version = "0.12.0"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[IteratorInterfaceExtensions]]
deps = ["Test"]
git-tree-sha1 = "5484e5ede2a4137b9643f4d646e8e7b87b794415"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "0.1.1"

[[JSON]]
deps = ["Dates", "Distributed", "Mmap", "Sockets", "Test", "Unicode"]
git-tree-sha1 = "1f7a25b53ec67f5e9422f1f551ee216503f4a0fa"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.20.0"

[[JuliaDB]]
deps = ["Dagger", "DataValues", "Distributed", "Glob", "IndexedTables", "MemPool", "Nullables", "OnlineStats", "OnlineStatsBase", "PooledArrays", "Printf", "RecipesBase", "Serialization", "Statistics", "StatsBase", "Test", "TextParse", "WeakRefStrings"]
git-tree-sha1 = "958bda10d25cca244e5d506785188079c77f2ac8"
uuid = "a93385a2-3734-596a-9a66-3cfbb77141e6"
version = "0.12.0"

[[LearnBase]]
deps = ["LinearAlgebra", "SparseArrays", "StatsBase", "Test"]
git-tree-sha1 = "c4b5da6d68517f46f70ed5157b28336b56cd2ff3"
uuid = "7f8f8fb0-2700-5f03-b4bd-41f8cfc144b6"
version = "0.2.2"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[LossFunctions]]
deps = ["InteractiveUtils", "LearnBase", "Markdown", "Random", "RecipesBase", "SparseArrays", "Statistics", "StatsBase", "Test"]
git-tree-sha1 = "08d87fec43e7d335811dfae5b55dbfc5690e915b"
uuid = "30fc2ffe-d236-52d8-8643-a9d8f7c094a7"
version = "0.5.1"

[[MacroTools]]
deps = ["CSTParser", "Compat", "DataStructures", "Test"]
git-tree-sha1 = "daecd9e452f38297c686eba90dba2a6d5da52162"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.0"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MemPool]]
deps = ["DataStructures", "Distributed", "Mmap", "Random", "Serialization", "Sockets", "Test"]
git-tree-sha1 = "d52799152697059353a8eac1000d32ba8d92aa25"
uuid = "f9f48841-c794-520a-933b-121f7ba6ed94"
version = "0.2.0"

[[Missings]]
deps = ["Dates", "InteractiveUtils", "SparseArrays", "Test"]
git-tree-sha1 = "d1d2585677f2bd93a97cfeb8faa7a0de0f982042"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "0.4.0"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Nullables]]
deps = ["Compat"]
git-tree-sha1 = "ae1a63457e14554df2159b0b028f48536125092d"
uuid = "4d1e1d77-625e-5b40-9113-a560ec7a8ecd"
version = "0.0.8"

[[OnlineStats]]
deps = ["DataStructures", "Dates", "LearnBase", "LinearAlgebra", "LossFunctions", "OnlineStatsBase", "PenaltyFunctions", "Random", "RecipesBase", "Reexport", "Statistics", "StatsBase", "SweepOperator", "Test"]
git-tree-sha1 = "a783fe25075b9d09d6dd2ba67dafd374d835acfa"
uuid = "a15396b6-48d5-5d58-9928-6d29437db91e"
version = "0.23.0"

[[OnlineStatsBase]]
deps = ["Dates", "LearnBase", "Statistics", "Test"]
git-tree-sha1 = "2d62fb8d9b1b407f9f80e99f4a63f32dea90423c"
uuid = "925886fa-5bf2-5e8e-b522-a9147a512338"
version = "0.10.2"

[[OrderedCollections]]
deps = ["Random", "Serialization", "Test"]
git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.1.0"

[[PDMats]]
deps = ["Arpack", "LinearAlgebra", "SparseArrays", "SuiteSparse", "Test"]
git-tree-sha1 = "b6c91fc0ab970c0563cbbe69af18d741a49ce551"
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
version = "0.9.6"

[[PenaltyFunctions]]
deps = ["InteractiveUtils", "LearnBase", "LinearAlgebra", "RecipesBase", "Reexport", "Test"]
git-tree-sha1 = "b0baaa5218ca0ffd6a8ae37ef0b58e0df688ac8b"
uuid = "06bb1623-fdd5-5ca2-a01c-88eae3ea319e"
version = "0.1.2"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Polynomials]]
deps = ["LinearAlgebra", "SparseArrays", "Test"]
git-tree-sha1 = "62142bd65d3f8aeb2226ec64dd8493349147df94"
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
version = "0.5.2"

[[PooledArrays]]
deps = ["Test"]
git-tree-sha1 = "6ea4cfb9136d3ff2b9d30d6696cd72166a3b837c"
uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"
version = "0.5.1"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[Profile]]
deps = ["Printf"]
uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"

[[PyCall]]
deps = ["Conda", "Dates", "Libdl", "LinearAlgebra", "MacroTools", "Pkg", "Serialization", "Statistics", "Test", "VersionParsing"]
git-tree-sha1 = "6e5bac1b1faf3575731a6a5b76f638f2389561d3"
uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
version = "1.91.2"

[[QuadGK]]
deps = ["DataStructures", "LinearAlgebra", "Test"]
git-tree-sha1 = "3ce467a8e76c6030d4c3786e7d3a73442017cdc0"
uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
version = "2.0.3"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[RecipesBase]]
deps = ["Random", "Test"]
git-tree-sha1 = "0b3cb370ee4dc00f47f1193101600949f3dcf884"
uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
version = "0.6.0"

[[Reexport]]
deps = ["Pkg"]
git-tree-sha1 = "7b1d07f411bc8ddb7977ec7f377b97b158514fe0"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "0.2.0"

[[Requires]]
deps = ["Test"]
git-tree-sha1 = "f6fbf4ba64d295e146e49e021207993b6b48c7d1"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "0.5.2"

[[Rmath]]
deps = ["BinaryProvider", "Libdl", "Random", "Statistics", "Test"]
git-tree-sha1 = "9a6c758cdf73036c3239b0afbea790def1dabff9"
uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa"
version = "0.5.0"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SortingAlgorithms]]
deps = ["DataStructures", "Random", "Test"]
git-tree-sha1 = "03f5898c9959f8115e30bc7226ada7d0df554ddd"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "0.3.1"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[SpecialFunctions]]
deps = ["BinDeps", "BinaryProvider", "Libdl", "Test"]
git-tree-sha1 = "0b45dc2e45ed77f445617b99ff2adf0f5b0f23ea"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "0.7.2"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[StatsBase]]
deps = ["DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics"]
git-tree-sha1 = "8a0f4b09c7426478ab677245ab2b0b68552143c7"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.30.0"

[[StatsFuns]]
deps = ["Rmath", "SpecialFunctions", "Test"]
git-tree-sha1 = "b3a4e86aa13c732b8a8c0ba0c3d3264f55e6bb3e"
uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
version = "0.8.0"

[[StructArrays]]
deps = ["PooledArrays", "Requires", "Test"]
git-tree-sha1 = "0c177f90cc58df7fd23c7e7a4eff9ef7c3b86c2a"
uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
version = "0.3.4"

[[SuiteSparse]]
deps = ["Libdl", "LinearAlgebra", "SparseArrays"]
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"

[[SweepOperator]]
deps = ["LinearAlgebra", "Test"]
git-tree-sha1 = "2039aaa96f7b21634a1b3246cb2699dd1d26d473"
uuid = "7522ee7d-7047-56d0-94d9-4bc626e7058d"
version = "0.2.0"

[[TableTraits]]
deps = ["IteratorInterfaceExtensions", "Test"]
git-tree-sha1 = "eba4b1d0a82bdd773307d652c6e5f8c82104c676"
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
version = "0.4.1"

[[TableTraitsUtils]]
deps = ["DataValues", "IteratorInterfaceExtensions", "Missings", "TableTraits", "Test"]
git-tree-sha1 = "55133a5476b61ec31060e555ffe12da27ac13682"
uuid = "382cd787-c1b6-5bf2-a167-d5b971a19bda"
version = "0.4.0"

[[Tables]]
deps = ["IteratorInterfaceExtensions", "LinearAlgebra", "Requires", "TableTraits", "Test"]
git-tree-sha1 = "719d5be11e89ae29d79b469c4238b63b53544d38"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "0.1.18"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[TextParse]]
deps = ["CodecZlib", "DataStructures", "Dates", "DoubleFloats", "Mmap", "Nullables", "PooledArrays", "Random", "Test", "WeakRefStrings"]
git-tree-sha1 = "cc7aa42aea3490a68552fcdb1df9ce5732a6a4de"
uuid = "e0df1984-e451-5cb5-8b61-797a481e67e3"
version = "0.9.0"

[[Tokenize]]
deps = ["Printf", "Test"]
git-tree-sha1 = "3e83f60b74911d3042d3550884ca2776386a02b8"
uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624"
version = "0.5.3"

[[TranscodingStreams]]
deps = ["Random", "Test"]
git-tree-sha1 = "a25d8e5a28c3b1b06d3859f30757d43106791919"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.9.4"

[[URIParser]]
deps = ["Test", "Unicode"]
git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69"
uuid = "30578b45-9adc-5946-b283-645ec420af67"
version = "0.4.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[VersionParsing]]
deps = ["Compat"]
git-tree-sha1 = "c9d5aa108588b978bd859554660c8a5c4f2f7669"
uuid = "81def892-9a0e-5fdd-b105-ffc91e053289"
version = "1.1.3"

[[WeakRefStrings]]
deps = ["Missings", "Random", "Test"]
git-tree-sha1 = "960639a12ffd223ee463e93392aeb260fa325566"
uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5"
version = "0.5.8"

Hi @jekyllstein, @StefanKarpinski pinged me on your question here. I know that TextParse.jl has an open issue about float parsing issues; I guess it’s not handling Inf correctly as you’ve noticed.

In the meantime, you could also use the CSV.jl package to load into JuliaDB, like:

julia> csv = """
       Test1,Test2,Test3
       1,2,3
       1,2,3
       Inf,2.0,3.0
       NA,5,2
       """
"Test1,Test2,Test3\n1,2,3\n1,2,3\nInf,2.0,3.0\nNA,5,2\n"

julia> t = JuliaDB.table(rowtable(CSV.File(IOBuffer(csv); missingstring="NA")))
Table with 4 rows, 3 columns:
Test1    Test2  Test3
─────────────────────
1.0      2.0    3.0
1.0      2.0    3.0
Inf      2.0    3.0
missing  5.
2 Likes

TableReader.jl also handles [-+]?Inf correctly, so I think you can load your file with TableReader.jl and then convert it to other type you want.

julia> using TableReader

julia> readcsv("test.csv")
4×3 DataFrames.DataFrame
│ Row │ Test1    │ Test2   │ Test3   │
│     │ Float64⍰ │ Float64 │ Float64 │
├─────┼──────────┼─────────┼─────────┤
│ 1   │ 1.0      │ 2.0     │ 3.0     │
│ 2   │ 1.0      │ 2.0     │ 3.0     │
│ 3   │ Inf      │ 2.0     │ 3.0     │
│ 4   │ missing  │ 5.0     │ 2.0     │
1 Like

Thanks. I was able to get that to work using CSV.rowtable. Can I pass to this function an array of missing strings like TextParse.NA_STRINGS that JuliaDB uses to load files?

Sorry for the slow response, yes you can either pass a single string via missingstring="NA", or multiple strings via missingstrings=["NA", "NAN"].