--- [![Crates.io](https://img.shields.io/crates/v/baskerville)](https://crates.io/crates/baskerville) [![docs.rs](https://img.shields.io/docsrs/baskerville)](https://docs.rs/baskerville/) ![GitHub](https://img.shields.io/github/license/jaynewey/baskerville) Infer and validate data-type schemas in Rust and Python. [Rust](https://github.com/jaynewey/baskerville) • [Python](https://github.com/jaynewey/baskerville-py)

Installation

cargo add baskerville

Example

```csv

mascots.csv

Name,LOC,Species Ferris,42,Crab Corro,7,Urchin ```

```rust use baskerville::{infercsvwith_options, CsvInput, InferOptions};

fn main() { let fields = infercsvwithoptions( CsvInput::Path("mascots.csv"), &mut InferOptions { hasheaders: true, ..InferOptions::default() }, ) .unwrap(); println!("{fields}"); } ```

Output:

╭──────┬─────────┬─────────╮ │ Name │ LOC │ Species │ ├──────┼─────────┼─────────┤ │ Text │ Integer │ Text │ │ │ Float │ │ │ │ Text │ │ ╰──────┴─────────┴─────────╯

Contributing

Versioning

The repo bases versioning from Conventional Commits