pub struct JsonLineReader<'a, R>where
R: MmapBytesReader,{ /* private fields */ }
Available on crate feature
json
only.Implementations§
Source§impl<'a, R> JsonLineReader<'a, R>where
R: 'a + MmapBytesReader,
impl<'a, R> JsonLineReader<'a, R>where
R: 'a + MmapBytesReader,
pub fn with_n_rows(self, num_rows: Option<usize>) -> Self
pub fn with_schema(self, schema: SchemaRef) -> Self
pub fn with_schema_overwrite(self, schema: &'a Schema) -> Self
pub fn with_rechunk(self, rechunk: bool) -> Self
pub fn with_predicate(self, predicate: Option<Arc<dyn PhysicalIoExpr>>) -> Self
pub fn with_projection(self, projection: Option<Arc<[PlSmallStr]>>) -> Self
pub fn with_row_index(self, row_index: Option<&'a mut RowIndex>) -> Self
pub fn infer_schema_len(self, infer_schema_len: Option<NonZeroUsize>) -> Self
pub fn with_n_threads(self, n: Option<usize>) -> Self
pub fn with_path<P: Into<PathBuf>>(self, path: Option<P>) -> Self
Sourcepub fn with_chunk_size(self, chunk_size: Option<NonZeroUsize>) -> Self
pub fn with_chunk_size(self, chunk_size: Option<NonZeroUsize>) -> Self
Sets the chunk size used by the parser. This influences performance
Sourcepub fn low_memory(self, toggle: bool) -> Self
pub fn low_memory(self, toggle: bool) -> Self
Reduce memory consumption at the expense of performance
Sourcepub fn with_ignore_errors(self, ignore_errors: bool) -> Self
pub fn with_ignore_errors(self, ignore_errors: bool) -> Self
Set values as Null
if parsing fails because of schema mismatches.
pub fn count(self) -> PolarsResult<usize>
Source§impl JsonLineReader<'_, File>
impl JsonLineReader<'_, File>
Sourcepub fn from_path<P: Into<PathBuf>>(path: P) -> PolarsResult<Self>
pub fn from_path<P: Into<PathBuf>>(path: P) -> PolarsResult<Self>
This is the recommended way to create a json reader as this allows for fastest parsing.
Trait Implementations§
Source§impl<R> SerReader<R> for JsonLineReader<'_, R>where
R: MmapBytesReader,
impl<R> SerReader<R> for JsonLineReader<'_, R>where
R: MmapBytesReader,
Source§fn finish(self) -> PolarsResult<DataFrame>
fn finish(self) -> PolarsResult<DataFrame>
Take the SerReader and return a parsed DataFrame.
Source§fn set_rechunk(self, _rechunk: bool) -> Selfwhere
Self: Sized,
fn set_rechunk(self, _rechunk: bool) -> Selfwhere
Self: Sized,
Make sure that all columns are contiguous in memory by
aggregating the chunks into a single array.
Auto Trait Implementations§
impl<'a, R> Freeze for JsonLineReader<'a, R>where
R: Freeze,
impl<'a, R> !RefUnwindSafe for JsonLineReader<'a, R>
impl<'a, R> Send for JsonLineReader<'a, R>
impl<'a, R> Sync for JsonLineReader<'a, R>
impl<'a, R> Unpin for JsonLineReader<'a, R>where
R: Unpin,
impl<'a, R> !UnwindSafe for JsonLineReader<'a, R>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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