Skip to main content

parse

Function parse 

Source
pub fn parse(text: &str, dtype: &DataType) -> Result<Scalar, String>
Expand description

text as a literal of dtype: a number, a flag, a date, a date and time read as a clock in the column’s zone, a time, a duration or a decimal at the column’s scale. Text and categories stay text. The error says what text should look like.

Whole numbers are read as i64 or u64 whatever their width, so < 300 on an i8 column still compares; a float is read at the column’s own precision, so 0.1 is the f32 a Float32 column stores.