csv
csv copied to clipboard
CSV Reading and Writing
Hi! CSV developers! Currently, the `col_sep` option is used in Ruby's CSV library, ```ruby CSV.open("nice.tsv", col_sep: "\t") ``` but it requires 8 keystrokes. `sep` requires only 3 keystrokes. The reason...
I created GH releases by `gh release create --generate-notes vX.Y.Z` like https://github.com/ruby/logger/releases under the Ruby organization. But I didn't create `csv`, `rexml` and others that are your maintained libraries. Can...
``` N_ROWS=5000 rake benchmark:write benchmark:parse benchmark:parse_liberal_parsing benchmark:parse_quote_char_nil benchmark:parse_strip ``` ``` RUBYLIB= BUNDLER_ORIG_RUBYLIB= /Users/vladimirkochnev/.asdf/installs/ruby/3.3.3/bin/ruby -v -S benchmark-driver /Users/vladimirkochnev/code/csv/benchmark/write.yaml ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [arm64-darwin23] Calculating ------------------------------------- csv 3.3.0 master generate_line: fields...
On some benchmarks it seems to make a difference: - `quoted` from `benchmark/parse.yaml` - `quote_char_nil` from `benchmark/parse_quote_char_nil.yaml` ``` N_ROWS=5000 rake benchmark:parse benchmark:parse_liberal_parsing benchmark:parse_quote_char_nil benchmark:parse_strip ``` ``` RUBYLIB= BUNDLER_ORIG_RUBYLIB= /Users/vladimirkochnev/.asdf/installs/ruby/3.3.3/bin/ruby -v...
Fix #300
If nobody objects this in a month, I'll do it.
## Proposal I'd like to propose being able to open a `StringIO` `s` with `CSV.foreach(s)`, just as it's possible to open a file with `CSV.foreach(path)`. I can investigate and open...
What's weird is that it works with structs (and arrays of course) but not with hashes ``` >> require 'csv'; CSV.generate { |csv| csv
Fixes #60 This has been bugging me for a while - the CSV parser was rejecting `\r` characters in unquoted fields even when the row separator was something completely different...
When upgrading from ruby `3.1.4` to `3.3.5`, FiberError/NoMemoryError error related to csv occurred in our system. In addition, when loading csv file, CPU load also increases compared to before. -...