pub struct CsvReadOptions {Show 25 fields
pub delimiter: u8,
pub has_headers: bool,
pub na_values: Vec<String>,
pub keep_default_na: bool,
pub na_filter: bool,
pub index_col: Option<String>,
pub usecols: Option<Vec<String>>,
pub nrows: Option<usize>,
pub skiprows: usize,
pub dtype: Option<HashMap<String, DType>>,
pub parse_dates: Option<Vec<String>>,
pub parse_date_combinations: Option<Vec<Vec<String>>>,
pub parse_date_combinations_named: Option<Vec<(String, Vec<String>)>>,
pub comment: Option<u8>,
pub true_values: Vec<String>,
pub false_values: Vec<String>,
pub decimal: u8,
pub on_bad_lines: CsvOnBadLines,
pub thousands: Option<u8>,
pub skipfooter: usize,
pub quotechar: u8,
pub escapechar: Option<u8>,
pub doublequote: bool,
pub lineterminator: Option<u8>,
pub skipinitialspace: bool,
}Fields§
§delimiter: u8§has_headers: bool§na_values: Vec<String>Additional NA values to recognize beyond the pandas defaults.
keep_default_na: boolWhether to include the default NaN values when parsing data.
If na_values are specified and keep_default_na is false, only the
specified na_values will be treated as NA.
Matches pandas keep_default_na parameter. Default: true.
na_filter: boolDetect missing value markers (empty strings and the value of na_values).
In data without any NAs, passing na_filter=false can improve performance.
Matches pandas na_filter parameter. Default: true.
index_col: Option<String>§usecols: Option<Vec<String>>Read only these columns (by name). None means read all.
Matches pandas usecols parameter.
nrows: Option<usize>Maximum number of data rows to read. None means read all.
Matches pandas nrows parameter.
skiprows: usizeNumber of initial lines to skip at the start of the file (including
the header line when has_headers is true).
Matches pandas skiprows parameter (when given as int).
dtype: Option<HashMap<String, DType>>Force specific dtypes for columns. Map of column name -> DType.
Matches pandas dtype parameter.
parse_dates: Option<Vec<String>>Column names to coerce via pandas-style parse_dates handling. Currently supports explicit column-name selection.
parse_date_combinations: Option<Vec<Vec<String>>>Column groups to combine and coerce via pandas-style parse_dates handling.
Each group replaces its source columns with a new <a>_<b>_... datetime column.
parse_date_combinations_named: Option<Vec<(String, Vec<String>)>>Named column groups to combine and parse as datetime, matching
pd.read_csv(parse_dates={'new_name': ['year', 'month', 'day']}).
Each (new_name, [source_cols]) entry replaces its source columns
with a single combined datetime column using the caller-supplied
name instead of the default <a>_<b>_... joined form.
comment: Option<u8>Character whose lines are treated as comments and skipped entirely.
Must be a single byte (ASCII); multi-byte characters are rejected.
Matches pandas comment parameter. Default: None.
true_values: Vec<String>Additional string values to coerce to true during CSV parsing.
Matches pandas true_values parameter.
false_values: Vec<String>Additional string values to coerce to false during CSV parsing.
Matches pandas false_values parameter.
decimal: u8Character to recognize as the decimal separator when parsing floats.
Matches pandas decimal parameter. Default: ..
on_bad_lines: CsvOnBadLinesHow to handle rows with more fields than the header width.
Matches pandas on_bad_lines parameter for the supported
error/warn/skip modes.
thousands: Option<u8>Thousands separator stripped from numeric fields before parsing.
Matches pandas thousands parameter. Must differ from decimal
(otherwise the option is silently ignored, matching pandas).
Number of trailing data rows to drop (after the header is
consumed). Matches pandas skipfooter parameter. Default: 0.
quotechar: u8Character used to quote fields that contain the delimiter, a
newline, or the quote character itself. Defaults to " (ASCII
double-quote). Matches pandas quotechar parameter.
escapechar: Option<u8>Character used to escape the quote character inside a quoted
field when doublequote is false. None disables backslash-
style escaping entirely. Matches pandas escapechar parameter.
doublequote: boolWhen true (the default), a doubled quote character inside a
quoted field is interpreted as a single literal quote. When
false, escapechar must be used to quote the quote character.
Matches pandas doublequote parameter.
lineterminator: Option<u8>Custom single-byte line terminator. When set, the reader treats
only that byte as a record separator (instead of CRLF/LF).
Matches pandas lineterminator (C-engine only). None keeps
the default CRLF/LF handling.
skipinitialspace: boolWhen true, skip ASCII spaces (0x20 only, not tabs) immediately after a
delimiter and at each field start, before quote handling. Matches pandas
skipinitialspace (default false). Trailing spaces are preserved; spaces
inside quoted fields are preserved; a space-then-quote field ( "x,y")
is parsed as the quoted value.
Trait Implementations§
Source§impl Clone for CsvReadOptions
impl Clone for CsvReadOptions
Source§fn clone(&self) -> CsvReadOptions
fn clone(&self) -> CsvReadOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more