Struct polars::prelude::JsonReader
source · [−]Implementations
sourceimpl<R> JsonReader<R> where
R: BufRead + Seek,
impl<R> JsonReader<R> where
R: BufRead + Seek,
sourcepub fn with_schema(self, schema: &Schema) -> JsonReader<R>
pub fn with_schema(self, schema: &Schema) -> JsonReader<R>
Set the JSON file’s schema
sourcepub fn infer_schema_len(self, max_records: Option<usize>) -> JsonReader<R>
pub fn infer_schema_len(self, max_records: Option<usize>) -> JsonReader<R>
Set the JSON reader to infer the schema of the file
sourcepub fn with_batch_size(self, batch_size: usize) -> JsonReader<R>
pub fn with_batch_size(self, batch_size: usize) -> JsonReader<R>
Set the batch size (number of records to load at one time) This heavily influences loading time.
sourcepub fn with_projection(
self,
projection: Option<Vec<String, Global>>
) -> JsonReader<R>
pub fn with_projection(
self,
projection: Option<Vec<String, Global>>
) -> JsonReader<R>
Set the reader’s column projection
pub fn with_json_format(self, format: JsonFormat) -> JsonReader<R>
Trait Implementations
sourceimpl<R> SerReader<R> for JsonReader<R> where
R: BufRead + Seek,
impl<R> SerReader<R> for JsonReader<R> where
R: BufRead + Seek,
fn new(reader: R) -> JsonReader<R>
sourcefn set_rechunk(self, rechunk: bool) -> JsonReader<R>
fn set_rechunk(self, rechunk: bool) -> JsonReader<R>
Rechunk to a single chunk after Reading file.
sourcefn finish(self) -> Result<DataFrame, PolarsError>
fn finish(self) -> Result<DataFrame, PolarsError>
Take the SerReader and return a parsed DataFrame.
Auto Trait Implementations
impl<R> RefUnwindSafe for JsonReader<R> where
R: RefUnwindSafe,
impl<R> Send for JsonReader<R> where
R: Send,
impl<R> Sync for JsonReader<R> where
R: Sync,
impl<R> Unpin for JsonReader<R> where
R: Unpin,
impl<R> UnwindSafe for JsonReader<R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more