Skip to main content

alopex_dataframe/
lib.rs

1//! `alopex-dataframe` is a small, Polars-inspired DataFrame API built on Arrow.
2//!
3//! The v0.1 scope focuses on a minimal eager `DataFrame` and a lazy query pipeline
4//! (`LazyFrame`) that compiles logical plans into physical plans and executes them.
5//! CSV / Parquet I/O is provided via `arrow-csv` and `parquet`.
6
7mod error;
8
9/// Eager DataFrame and Series types.
10pub mod dataframe;
11/// Expression DSL used by both eager and lazy APIs.
12pub mod expr;
13/// CSV / Parquet I/O and option types.
14pub mod io;
15/// Lazy query planning and optimization.
16pub mod lazy;
17/// P1 operation types and helpers.
18pub mod ops;
19/// Physical plan compilation and execution.
20pub mod physical;
21
22/// Re-export of the primary eager types.
23pub use crate::dataframe::{DataFrame, GroupBy, Series};
24/// Re-export of the crate error type and result alias.
25pub use crate::error::{DataFrameError, Result};
26/// Re-export of the expression DSL entrypoints.
27pub use crate::expr::{all, col, lit, Expr};
28/// Re-export of eager CSV / Parquet I/O helpers.
29pub use crate::io::{read_csv, read_parquet, write_csv, write_parquet};
30/// Re-export of the primary lazy type.
31pub use crate::lazy::LazyFrame;
32/// Re-export of P1 operation types.
33pub use crate::ops::{FillNullStrategy, JoinKeys, JoinType, SortOptions};
34
35/// Create a `LazyFrame` that scans a CSV file without performing I/O eagerly.
36pub fn scan_csv(path: impl AsRef<std::path::Path>) -> Result<LazyFrame> {
37    LazyFrame::scan_csv(path)
38}
39
40/// Create a `LazyFrame` that scans a Parquet file without performing I/O eagerly.
41pub fn scan_parquet(path: impl AsRef<std::path::Path>) -> Result<LazyFrame> {
42    LazyFrame::scan_parquet(path)
43}