5 ms·
So, which library? CSV is a mess.
by jstsch 12y ago
So, which library? CSV is a mess.
- Monkeyget 12y agoNo idea. I've been bitten by a library that turned out well into a project to have pernicious flaws. It would be awesome if someone made a table with CSV features in one dimension and application/library behaviour in the other.
- justincormack 12y agoThe problem is that CSV is basically non discoverable, as it has no metadata eg about encoding or delimiters or locale... Thats why Excel gives you a sample and lets you change delimiters etc. You can guess, or you can write something that seems to work for a particular input source. But it is best avoided.
- qnaal 12y agoperl's Text::CSV http://search.cpan.org/~makamaka/Text-CSV-1.32/lib/Text/CSV.pm http://search.cpan.org/~makamaka/Text-CSV-1.32/lib/Text/CSV....
- draegtun 12y agoHere's some links which (will always) point to latest versions on MetaCPAN: http://p3rl.org/Text::CSV http://p3rl.org/Text::CSV | http://p3rl.org/Text::CSV_XS http://p3rl.org/Text::CSV_XS
- earino 12y agoI really have to second this. It's fast, it's smart, it handles almost anything, and it reliably gives good error messages. It's an important part of my data science toolbelt.
- mrweasel 12y agoI would say use the parser included in your programming environment, but I spend way to long looking of the non existing CSV parser in .Net.
- EpicEng 12y agoNot a single language I use on a routine basis includes a CSV parser in its standard library.
- mrweasel 12y agoI'm mostly using Python and trying to learn Go, both have great csv parsers and I used the one in PHP. Given the size and features present in .Net I was really suprised to not find a csv parser.
- rwmj 12y agoocaml-csv can handle anything Excel can throw at it (and throw it back). Worked out well in the real world. https://forge.ocamlcore.org/projects/csv/ https://forge.ocamlcore.org/projects/csv/
- mholt 12y agoHave you tried Papa Parse?