Skip to content

Commit 65ebaba

Browse files
authored
Merge pull request #40 from queryverse/vectorstring
Force Vector{String} instead of StringVector
2 parents bbda88e + 88bbfd8 commit 65ebaba

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# CSVFiles.jl v0.13.0
2+
* Never use StringVector, always use Vector{String} instead
3+
14
# CSVFiles.jl v0.12.0
25
* Export FileIO.File and FileIO.@format_str
36

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
julia 0.7
2-
TextParse 0.6.0
2+
TextParse 0.7.0
33
IteratorInterfaceExtensions 0.1.1
44
TableTraits 0.4.0
55
TableTraitsUtils 0.2.1

src/CSVFiles.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ function _loaddata(file)
6666
if startswith(file.filename, "https://") || startswith(file.filename, "http://")
6767
response = HTTP.get(file.filename)
6868
data = String(response.body)
69-
return TextParse._csvread(data, file.delim; file.keywords...)
69+
return TextParse._csvread(data, file.delim; stringarraytype=Array, file.keywords...)
7070
else
71-
return csvread(file.filename, file.delim; file.keywords...)
71+
return csvread(file.filename, file.delim; stringarraytype=Array, file.keywords...)
7272
end
7373
end
7474

@@ -86,15 +86,15 @@ function TableTraits.get_columns_copy_using_missing(file::CSVFile)
8686
end
8787

8888
function TableTraits.getiterator(s::CSVStream)
89-
res = TextParse.csvread(s.io, s.delim; s.keywords...)
89+
res = TextParse.csvread(s.io, s.delim; stringarraytype=Array, s.keywords...)
9090

9191
it = TableTraitsUtils.create_tableiterator([i for i in res[1]], [Symbol(i) for i in res[2]])
9292

9393
return it
9494
end
9595

9696
function TableTraits.get_columns_copy_using_missing(s::CSVStream)
97-
columns, colnames = TextParse.csvread(s.io, s.delim, s.keywords...)
97+
columns, colnames = TextParse.csvread(s.io, s.delim; stringarraytype=Array, s.keywords...)
9898
return NamedTuple{(Symbol.(colnames)...,), Tuple{typeof.(columns)...}}((columns...,))
9999
end
100100

0 commit comments

Comments
 (0)