Mastering CSV in Ruby book(let) pdf download (37-pages, 185kb) is now free (Donation Optional). Happy Monday! -- Paweł Dąbrowski (Ruby is dead, long live Rails!)

Hello,

  Paweł Dąbrowski (Ruby is dead, long live Rails!) writes:

Mastering CSV in Ruby book(let) [pdf download (37-pages, 185kb)] is now free [(Donation Optional)].
Happy Monday!

  See Mastering CSV in Ruby

  It's a great read on the "state-of-art" of the built-in standard csv
gem / library in 2022.

Did you now that reading the data into a "true" plain-old vanilla hash requires
  this dance:

     rows = CSV.read( "example.csv", headers: true ).map { |row| row.to_h }

vs

     rows = CsvHash.read( "examples.csv" )

in - dare I say - my humble alternate csv reader gem / library [1].
Or even easier
or using ruby cocos (code commons) [2]:

     rows = read_csv( "examples.csv" )

Anyways, that's pretty much sums up the interest and state-of-art of
data wrangling in ruby.
  I am talking to myself ;-). Ruby is dead. Long live Rails!

What's your take? What alternate csv / tabular data gems / libraries
do you use (or recommend)?

[1] GitHub - rubycocos/csvreader: csvreader library / gem - read tabular data in the comma-separated values (csv) format the right way (uses best practices out-of-the-box with zero-configuration)
[2] GitHub - rubycocos/cocos: cocos (code commons) - auto-include quick-starter prelude & prolog

maybe the project like ruby-spark will be using this module heavily.

thanks for share.

Gerald Bauer wrote:

···

      rows = CSV.read( "example.csv", headers: true ).map {|row| row.to_h }