Struct polars::prelude::JsonLineReader
source · pub struct JsonLineReader<'a, R>where
R: MmapBytesReader,{ /* private fields */ }
Available on crate feature
polars-io
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>) -> JsonLineReader<'a, R>
pub fn with_schema(self, schema: Arc<Schema>) -> JsonLineReader<'a, R>
pub fn with_schema_overwrite(self, schema: &'a Schema) -> JsonLineReader<'a, R>
pub fn with_rechunk(self, rechunk: bool) -> JsonLineReader<'a, R>
pub fn infer_schema_len( self, infer_schema_len: Option<NonZero<usize>> ) -> JsonLineReader<'a, R>
pub fn with_n_threads(self, n: Option<usize>) -> JsonLineReader<'a, R>
pub fn with_path<P>(self, path: Option<P>) -> JsonLineReader<'a, R>
sourcepub fn with_chunk_size(
self,
chunk_size: Option<NonZero<usize>>
) -> JsonLineReader<'a, R>
pub fn with_chunk_size( self, chunk_size: Option<NonZero<usize>> ) -> JsonLineReader<'a, R>
Sets the chunk size used by the parser. This influences performance
sourcepub fn low_memory(self, toggle: bool) -> JsonLineReader<'a, R>
pub fn low_memory(self, toggle: bool) -> JsonLineReader<'a, R>
Reduce memory consumption at the expense of performance
sourcepub fn with_ignore_errors(self, ignore_errors: bool) -> JsonLineReader<'a, R>
pub fn with_ignore_errors(self, ignore_errors: bool) -> JsonLineReader<'a, R>
Set values as Null
if parsing fails because of schema mismatches.
source§impl<'a> JsonLineReader<'a, File>
impl<'a> JsonLineReader<'a, File>
sourcepub fn from_path<P>(path: P) -> Result<JsonLineReader<'a, File>, PolarsError>
pub fn from_path<P>(path: P) -> Result<JsonLineReader<'a, File>, PolarsError>
This is the recommended way to create a json reader as this allows for fastest parsing.
Trait Implementations§
source§impl<'a, R> SerReader<R> for JsonLineReader<'a, R>where
R: MmapBytesReader,
impl<'a, R> SerReader<R> for JsonLineReader<'a, R>where
R: MmapBytesReader,
source§fn new(reader: R) -> JsonLineReader<'a, R>
fn new(reader: R) -> JsonLineReader<'a, R>
Create a new JsonLineReader from a file/ stream
source§fn finish(self) -> Result<DataFrame, PolarsError>
fn finish(self) -> Result<DataFrame, PolarsError>
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> 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