bamfcsv's Introduction
BAMFCSV -- Parsin' CSVs like a BAMF! $ gem install bamfcsv $ irb -rbamfcsv irb> BAMFCSV.read "super_giant.csv" ===> ...large array of arrays... BAMF!!! CSV IS PARSED IN LESS THAN ONE SECOND! GUARANTEED!* also: BAMFCSV.parse "csv,string,of,awesome" AND! both #parse and #read take an optional :headers => true to generate a table! irb(1.9.2): table = BAMFCSV.parse <<EOF, headers: true ?> foo,bar ?> 1,2 ?> 3,4 ?> EOF ==========> #<BAMFCSV::Table> irb(1.9.2): table.first["foo"] ==========> "1" irb(1.9.2): table[1]["bar"] ==========> "4" DOUBLE-AND/ALSO it supports custom field separators!! irb(1.9.2): BAMFCSV.parse(<<EOF, separator: '|') ?> foo|bar ?> baz|quux ?> EOF ==========> [["foo", "bar"], ["baz", "quux"]] (*) Results may vary.
bamfcsv's People
bamfcsv's Issues
Custom separator
Hello,
It would be great to customise the the way files are parsed setting what separator is desired. Example:
BAMFCSV.parse <<EOF, :header => true, :separator => ';'
number;literal
1;One
2;Two
3;Three
EOF
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.