pub struct LoadSheetOrTableOptions {
pub header_row: Option<usize>,
pub column_names: Option<Vec<String>>,
pub skip_rows: SkipRows,
pub n_rows: Option<usize>,
pub schema_sample_rows: Option<usize>,
pub dtype_coercion: DTypeCoercion,
pub selected_columns: SelectedColumns,
pub dtypes: Option<DTypes>,
}
Expand description
Options for loading a sheet or table.
Fields§
§header_row: Option<usize>
The index of the row containing the column labels. If None
, the provided headers are used.
Any row before the header row is skipped.
column_names: Option<Vec<String>>
The column names to use. If None
, the column names are inferred from the header row.
skip_rows: SkipRows
How rows should be skipped.
n_rows: Option<usize>
The number of rows to read. If None
, all rows are read.
schema_sample_rows: Option<usize>
The number of rows to sample for schema inference. If None
, all rows are sampled.
dtype_coercion: DTypeCoercion
How data types should be coerced.
selected_columns: SelectedColumns
The columns to select.
dtypes: Option<DTypes>
Override the inferred data types.
Implementations§
Source§impl LoadSheetOrTableOptions
impl LoadSheetOrTableOptions
Sourcepub fn new_for_sheet() -> Self
pub fn new_for_sheet() -> Self
Returns a new LoadSheetOrTableOptions
instance for loading a sheet. header_row
is set to
Some(0)
Sourcepub fn new_for_table() -> Self
pub fn new_for_table() -> Self
Returns a new LoadSheetOrTableOptions
instance for loading a sheet. header_row
is set to
None
pub fn header_row(self, header_row: usize) -> Self
pub fn no_header_row(self) -> Self
pub fn column_names<I: IntoIterator<Item = impl Into<String>>>( self, column_names: I, ) -> Self
pub fn skip_rows(self, skip_rows: SkipRows) -> Self
pub fn n_rows(self, n_rows: usize) -> Self
pub fn schema_sample_rows(self, schema_sample_rows: usize) -> Self
pub fn dtype_coercion(self, dtype_coercion: DTypeCoercion) -> Self
pub fn selected_columns(self, selected_columns: SelectedColumns) -> Self
pub fn with_dtypes(self, dtypes: DTypes) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoadSheetOrTableOptions
impl RefUnwindSafe for LoadSheetOrTableOptions
impl Send for LoadSheetOrTableOptions
impl Sync for LoadSheetOrTableOptions
impl Unpin for LoadSheetOrTableOptions
impl UnwindSafe for LoadSheetOrTableOptions
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
Mutably borrows from an owned value. Read more