Discussion:
tabreader - read in tabular datafiles in text in the tab format; yes, uses values = line.split("/t")
Gerald Bauer
2018-08-17 13:50:26 UTC
Permalink
Hello,

I've put together a new library / gem, that is, tabreader
that lets you read in tabular datafiles in text in the tab format;
yes, uses

values = line.split( "/t" )

or use the packaged up

TabReader.parse_line( ... )

or any of the convenience helpers incl. TabHashReader.parse
for returning hashes (with named value pairs) instead of arrays
(with a list of values by position/index).

The readme includes why CSV.read( col_sep: "\t", quote_char: "∅" )
is NOT recommended (and broken) and why tab is its own (simpler) format
than the classic comma-separated values (csv) format.

Happy data wrangling with ruby. Cheers. Prost.

[1] https://github.com/datatxt/tabreader

Unsubscribe: <mailto:ruby-talk-***@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-b

Loading...