/
polars.rs
29 lines (26 loc) · 816 Bytes
/
polars.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use faer::{dbgf, polars::polars_to_faer_f64};
use polars::prelude::*;
fn main() -> PolarsResult<()> {
let directory = "./faer/examples/";
for filename in ["diabetes_data_raw.parquet", "iris.parquet"] {
dbg!(filename);
let data = LazyFrame::scan_parquet(
format!("{directory}{filename}"),
ScanArgsParquet {
n_rows: None,
cache: true,
parallel: ParallelStrategy::Auto,
rechunk: true,
row_count: None,
low_memory: false,
cloud_options: None,
use_statistics: true,
..Default::default()
},
)
.and_then(|lf| polars_to_faer_f64(lf))
.unwrap();
dbgf!("6.2?", data);
}
Ok(())
}