Skip to content

Latest commit

 

History

History
139 lines (105 loc) · 1.46 KB

README.md

File metadata and controls

139 lines (105 loc) · 1.46 KB

Comma-Separated Values (CSV) Datafiles for Testing

Quotes in quotes, newlines in quotes, blank lines, comments, crlf, comma in quotes and more

Summary

simple.csv:

a,b,c
1,2,3

=>

[["a", "b", "c"],
 ["1", "2", "3"]]

utf8.csv:

a,b,c
1,2,3
4,5,ʤ

=>

[["a", "b", "c"],
 ["1", "2", "3"],
 ["4", "5", "ʤ"]]

empty.csv:

a,b,c
1,,
2,3,4

or

a,b,c
1,"",""
2,3,4

=>

[["a", "b", "c"],
 ["1", "",  "" ],
 ["2", "3", "4"]]

comma_in_quotes.csv:

first,last,address,city,zip
John,Doe,120 any st.,"Anytown, WW",08123

=>

[["first", "last", "address",     "city",        "zip"  ],
 ["John",  "Doe",  "120 any st.", "Anytown, WW", "08123"]]

newlines.csv:

a,b,c
1,2,3
"Once upon↵
a time",5,6
7,8,9

=>

[["a", "b", "c"],
 ["1", "2", "3"],
 ["Once upon\na time", "5", "6"],
 ["7", "8", "9"]]

escaped_quotes.csv:

a,b
1,"ha ""ha"" ha"
3,4

=>

[["a", "b"],
 ["1", "ha \"ha\" ha"],
 ["3", "4"]]

quotes_and_newlines.csv:

a,b
1,"ha↵
""ha""↵
ha"
3,4

=>

[["a", "b"],
 ["1", "ha\n\"ha\"\nha"],
 ["3", "4"]]

json.csv:

key,val
1,"{""type"": ""Point"", ""coordinates"": [102.0, 0.5]}"

=>

[["key", "val"],
 ["1",   "{\"type\": \"Point\", \"coordinates\": [102.0, 0.5]}"]]