Struct polars::prelude::CsvParseOptions  
source · pub struct CsvParseOptions {
    pub separator: u8,
    pub quote_char: Option<u8>,
    pub eol_char: u8,
    pub encoding: CsvEncoding,
    pub null_values: Option<NullValues>,
    pub missing_is_null: bool,
    pub truncate_ragged_lines: bool,
    pub comment_prefix: Option<CommentPrefix>,
    pub try_parse_dates: bool,
    pub decimal_comma: bool,
}polars-io only.Fields§
§separator: u8§quote_char: Option<u8>§eol_char: u8§encoding: CsvEncoding§null_values: Option<NullValues>§missing_is_null: bool§truncate_ragged_lines: bool§comment_prefix: Option<CommentPrefix>§try_parse_dates: bool§decimal_comma: boolImplementations§
source§impl CsvParseOptions
 
impl CsvParseOptions
sourcepub fn with_separator(self, separator: u8) -> CsvParseOptions
 
pub fn with_separator(self, separator: u8) -> CsvParseOptions
The character used to separate fields in the CSV file. This is most often a comma ‘,’.
sourcepub fn with_quote_char(self, quote_char: Option<u8>) -> CsvParseOptions
 
pub fn with_quote_char(self, quote_char: Option<u8>) -> CsvParseOptions
Set the character used for field quoting. This is most often double quotes ‘“’. Set this to None to disable quote parsing.
sourcepub fn with_eol_char(self, eol_char: u8) -> CsvParseOptions
 
pub fn with_eol_char(self, eol_char: u8) -> CsvParseOptions
Set the character used to indicate an end-of-line (eol).
sourcepub fn with_encoding(self, encoding: CsvEncoding) -> CsvParseOptions
 
pub fn with_encoding(self, encoding: CsvEncoding) -> CsvParseOptions
Set the encoding used by the file.
sourcepub fn with_null_values(
    self,
    null_values: Option<NullValues>
) -> CsvParseOptions
 
pub fn with_null_values( self, null_values: Option<NullValues> ) -> CsvParseOptions
Set values that will be interpreted as missing/null.
Note: These values are matched before quote-parsing, so if the null values are quoted then those quotes also need to be included here.
sourcepub fn with_missing_is_null(self, missing_is_null: bool) -> CsvParseOptions
 
pub fn with_missing_is_null(self, missing_is_null: bool) -> CsvParseOptions
Treat missing fields as null.
sourcepub fn with_truncate_ragged_lines(
    self,
    truncate_ragged_lines: bool
) -> CsvParseOptions
 
pub fn with_truncate_ragged_lines( self, truncate_ragged_lines: bool ) -> CsvParseOptions
Truncate lines that are longer than the schema.
sourcepub fn with_comment_prefix<T>(
    self,
    comment_prefix: Option<T>
) -> CsvParseOptionswhere
    T: Into<CommentPrefix>,
 
pub fn with_comment_prefix<T>(
    self,
    comment_prefix: Option<T>
) -> CsvParseOptionswhere
    T: Into<CommentPrefix>,
Sets the comment prefix for this instance. Lines starting with this prefix will be ignored.
sourcepub fn with_try_parse_dates(self, try_parse_dates: bool) -> CsvParseOptions
 
pub fn with_try_parse_dates(self, try_parse_dates: bool) -> CsvParseOptions
Automatically try to parse dates/datetimes and time. If parsing fails,
columns remain of dtype [DataType::String].
sourcepub fn with_decimal_comma(self, decimal_comma: bool) -> CsvParseOptions
 
pub fn with_decimal_comma(self, decimal_comma: bool) -> CsvParseOptions
Parse floats with a comma as decimal separator.
Trait Implementations§
source§impl Clone for CsvParseOptions
 
impl Clone for CsvParseOptions
source§fn clone(&self) -> CsvParseOptions
 
fn clone(&self) -> CsvParseOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for CsvParseOptions
 
impl Debug for CsvParseOptions
source§impl Default for CsvParseOptions
 
impl Default for CsvParseOptions
Options related to parsing the CSV format.
source§fn default() -> CsvParseOptions
 
fn default() -> CsvParseOptions
source§impl Hash for CsvParseOptions
 
impl Hash for CsvParseOptions
source§impl PartialEq for CsvParseOptions
 
impl PartialEq for CsvParseOptions
source§fn eq(&self, other: &CsvParseOptions) -> bool
 
fn eq(&self, other: &CsvParseOptions) -> bool
self and other values to be equal, and is used
by ==.impl Eq for CsvParseOptions
impl StructuralPartialEq for CsvParseOptions
Auto Trait Implementations§
impl Freeze for CsvParseOptions
impl RefUnwindSafe for CsvParseOptions
impl Send for CsvParseOptions
impl Sync for CsvParseOptions
impl Unpin for CsvParseOptions
impl UnwindSafe for CsvParseOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
 
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more