anofox_ml_io/lib.rs
1//! CSV data loading with ndarray integration.
2//!
3//! This crate provides functions for reading CSV files into
4//! [`ndarray::Array2`] feature matrices and optional [`ndarray::Array1`]
5//! target vectors. It supports configurable delimiters, optional headers,
6//! and target column extraction.
7//!
8//! # Examples
9//!
10//! ```no_run
11//! use anofox_ml_io::{read_csv, CsvReadOptions};
12//!
13//! let options = CsvReadOptions::new()
14//! .with_target_column(2);
15//!
16//! let (x, y, headers) = read_csv::<f64, _>("data.csv", &options).unwrap();
17//! // x: Array2<f64> -- feature matrix (all columns except column 2)
18//! // y: Some(Array1<f64>) -- target vector (column 2)
19//! // headers: Some(Vec<String>) -- column names from the first row
20//! ```
21
22pub mod csv_reader;
23
24pub use csv_reader::{read_csv, read_csv_with_header, CsvError, CsvReadOptions, CsvReadResult};