• Home
  • Raw
  • Download

Lines Matching full:csv

2 A cookbook of examples for CSV reading and writing.
8 [`rust-csv`](https://github.com/BurntSushi/rust-csv)
11 For **reading** CSV:
18 For **writing** CSV:
24 [submit a pull request](https://github.com/BurntSushi/rust-csv/pulls)
29 This example shows how to read CSV data from stdin and print each record to
37 // Build the CSV reader and iterate over each record.
38 let mut rdr = csv::Reader::from_reader(io::stdin());
59 $ git clone git://github.com/BurntSushi/rust-csv
60 $ cd rust-csv
61 $ cargo run --example cookbook-read-basic < examples/data/smallpop.csv
81 // a corresponding field in the CSV data's header record.
91 let mut rdr = csv::Reader::from_reader(io::stdin());
112 $ git clone git://github.com/BurntSushi/rust-csv
113 $ cd rust-csv
114 $ cargo run --example cookbook-read-serde < examples/data/smallpop.csv
119 This example shows how to read CSV data from stdin where fields are separated
127 let mut rdr = csv::ReaderBuilder::new()
148 $ git clone git://github.com/BurntSushi/rust-csv
149 $ cd rust-csv
150 $ cargo run --example cookbook-read-colon < examples/data/smallpop-colon.csv
155 The CSV reader in this crate assumes that CSV data has a header record by
157 CSV data in interpreted as the header record and is skipped. When disabled, the
165 let mut rdr = csv::ReaderBuilder::new()
186 $ git clone git://github.com/BurntSushi/rust-csv
187 $ cd rust-csv
188 $ cargo run --example cookbook-read-no-headers < examples/data/smallpop-no-headers.csv
193 This example shows how to write CSV data to stdout.
200 let mut wtr = csv::Writer::from_writer(io::stdout());
222 $ git clone git://github.com/BurntSushi/rust-csv
223 $ cd rust-csv
224 $ cargo run --example cookbook-write-basic > /tmp/simplepop.csv
229 This example shows how to write CSV data to stdout with Serde. Namely, we
248 let mut wtr = csv::Writer::from_writer(io::stdout());
279 $ git clone git://github.com/BurntSushi/rust-csv
280 $ cd rust-csv
281 $ cargo run --example cookbook-write-serde > /tmp/simplepop.csv