| Crates.io | csv-slice |
| lib.rs | csv-slice |
| version | 0.1.0 |
| created_at | 2025-05-18 12:54:00.044993+00 |
| updated_at | 2025-05-18 12:54:00.044993+00 |
| description | Extract rows or columns from CSV files without loading the entire file |
| homepage | |
| repository | https://github.com/arrismo/csv-slice |
| max_upload_size | |
| id | 1678632 |
| size | 26,194 |
Extract rows or columns from CSV files without loading the entire file
Clone the repository and build with Cargo:
cargo build --release
csv-slice rows --input <csv_file> --start <start> --end <end>
csv-slice columns --input <csv_file> --columns <col1> <col2> ...
Example:
use csv_slice::{extract_rows, extract_columns};
let rows = extract_rows("data.csv", 0, 10)?;
let cols = extract_columns("data.csv", &["Name", "Email"])?;
Run example programs:
cargo run --example rows -- data.csv 0 10
cargo run --example columns -- data.csv Name Email