CSV processing library inspired by csvsc
```rs use csv_pipeline::{Pipeline, Transformer};
let source = "\ Person,Score\n\ A,1\n\ A,8\n\ B,3\n\ B,4\n"; let reader = csv::Reader::fromreader(source.asbytes()); let csv = Pipeline::fromreader(reader) .unwrap() .map(|headers, row| Ok(row)) // Transform into a new csv .transforminto(|| { vec![ // Keep every Person Transformer::new("Person").keepunique(), // Sum the scores into a "Total score" column Transformer::new("Total score").fromcol("Score").sum(0), ] }) .collectinto_string() .unwrap();
assert_eq!( csv, "Person,Total score\n\ A,9\n\ B,7\n" ); ```
Install Rust.
Run tests:
cargo test
CHANGELOG.md
Cargo.toml
cargo test
cargo publish
v#.#.#