[][src]Struct crabsformer::MatrixLoaderForCSV

pub struct MatrixLoaderForCSV<T, P> where
    P: AsRef<Path>, 
{ /* fields omitted */ }

Matrix loader for CSV formatted file.

See also: Matrix::from_csv.

Methods

impl<T, P> MatrixLoaderForCSV<T, P> where
    P: AsRef<Path>, 
[src]

pub fn has_headers(self, yes: bool) -> MatrixLoaderForCSV<T, P>[src]

Set to true to treat the first row as a special header row. By default, it is set to false.

Examples

use crabsformer::*;

let dataset: Matrix<f32> = Matrix::from_csv("tests/dataset.csv")
    .has_headers(true)
    .load()
    .unwrap();

pub fn load(self) -> Result<Matrix<T>, LoadError> where
    T: FromPrimitive + Num + Copy + TypeName, 
[src]

Load Matrix from CSV file. You need to explicitly annotate the numeric type.

Examples

use crabsformer::*;

let dataset: Matrix<f32> = Matrix::from_csv("tests/weight.csv").load().unwrap();

Trait Implementations

impl<T: Debug, P: Debug> Debug for MatrixLoaderForCSV<T, P> where
    P: AsRef<Path>, 
[src]

Auto Trait Implementations

impl<T, P> Send for MatrixLoaderForCSV<T, P> where
    P: Send,
    T: Send

impl<T, P> Sync for MatrixLoaderForCSV<T, P> where
    P: Sync,
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]