Crates.io | czv |
lib.rs | czv |
version | 0.0.2 |
source | src |
created_at | 2024-06-20 21:44:49.196219 |
updated_at | 2024-06-21 03:35:54.012407 |
description | Rust library for performing CSV-related operations for data engineering and analysis. |
homepage | |
repository | https://github.com/rzmk/czv |
max_upload_size | |
id | 1278736 |
size | 1,976,111 |
Rust library for czv. czv is a library of CSV-related operations for data engineering and analysis tasks.
To install czv
, run:
cargo install czv
Let's say we want to print the total number of rows in a 4x3 CSV file fruits.csv
including the header row:
use czv::{RowCount, Result};
fn main() -> Result<()> {
let data = "\
fruits,price
apple,2.50
banana,3.00
strawberry,1.50
";
let output = RowCount::new()
.file_data(data)
.include_header_row(true)
.execute()?;
println!("{output}"); // 4
Ok(())
}
When ran, this should be the standard output printed in the terminal:
4
To run the tests, run:
cargo test
To run the benchmarks, run:
cargo bench
For benchmarks we use criterion.rs.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.