Trait datafusion::dataframe::DataFrame
[−]
[src]
pub trait DataFrame { fn repartition(&self, n: u32) -> Result<Box<DataFrame>, DataFrameError>; fn select(&self, expr: Vec<Expr>) -> Result<Box<DataFrame>, DataFrameError>; fn filter(&self, expr: Expr) -> Result<Box<DataFrame>, DataFrameError>; fn sort(&self, expr: Vec<Expr>) -> Result<Box<DataFrame>, DataFrameError>; fn write(&self, filename: &str) -> Result<(), DataFrameError>; fn col(&self, column_name: &str) -> Result<Expr, DataFrameError>; fn schema(&self) -> Schema; }
DataFrame is an abstraction of a distributed query plan
Required Methods
fn repartition(&self, n: u32) -> Result<Box<DataFrame>, DataFrameError>
Change the number of partitions
fn select(&self, expr: Vec<Expr>) -> Result<Box<DataFrame>, DataFrameError>
Projection
fn filter(&self, expr: Expr) -> Result<Box<DataFrame>, DataFrameError>
Selection
fn sort(&self, expr: Vec<Expr>) -> Result<Box<DataFrame>, DataFrameError>
Sorting
fn write(&self, filename: &str) -> Result<(), DataFrameError>
Write to CSV ... will support other formats in the future
fn col(&self, column_name: &str) -> Result<Expr, DataFrameError>
Return an expression representing the specified column
fn schema(&self) -> Schema
Implementors
impl DataFrame for DF