| Crates.io | csv_polars_cleaner |
| lib.rs | csv_polars_cleaner |
| version | 0.3.0 |
| created_at | 2025-05-01 07:24:27.107737+00 |
| updated_at | 2025-05-01 09:08:28.871009+00 |
| description | A robust Rust library for extracting and cleaning tabular data from messy CSV files using Polars. |
| homepage | https://github.com/sanjaysingh13/csv_polars_cleaner |
| repository | https://github.com/sanjaysingh13/csv_polars_cleaner |
| max_upload_size | |
| id | 1655931 |
| size | 79,341 |
A robust Rust library for extracting and cleaning tabular data from messy CSV files using the Polars DataFrame engine.
,).Add to your Cargo.toml:
[dependencies]
csv_polars_cleaner = "<version>"
Example usage:
use csv_polars_cleaner::parse_folder;
fn main() {
let folder = "path/to/your/folder";
match parse_folder(folder, b',') {
Ok(dfs) => {
println!("Parsed {} files", dfs.len());
for (i, df) in dfs.iter().enumerate() {
println!("\nFile {}:", i + 1);
println!("Headers: {:?}", df.get_column_names());
println!("Number of rows: {}", df.height());
}
}
Err(e) => {
eprintln!("Failed to parse folder: {:?}", e);
}
}
}
To get started, clone this repository:
git clone https://github.com/sanjaysingh13/csv_polars_cleaner.git
cd csv_polars_cleaner
This crate includes a simple CLI for quickly checking CSV parsing on your system:
cargo run -- path/to/your/folder
This will recursively parse all .csv files in the specified folder and its subfolders.
For more details, see the source code.