pub struct DataFrame { /* private fields */ }Expand description
Eager DataFrame and GroupBy.
An eager table backed by one or more Arrow RecordBatch values.
Implementations§
Source§impl DataFrame
impl DataFrame
Sourcepub fn new(columns: Vec<Series>) -> Result<Self>
pub fn new(columns: Vec<Series>) -> Result<Self>
Construct a DataFrame from a list of Series.
Chunk boundaries do not need to align across series as long as total lengths match.
Sourcepub fn from_batches(batches: Vec<RecordBatch>) -> Result<Self>
pub fn from_batches(batches: Vec<RecordBatch>) -> Result<Self>
Construct a DataFrame from Arrow record batches (all batches must share the same schema).
Sourcepub fn from_series(series: Vec<Series>) -> Result<Self>
pub fn from_series(series: Vec<Series>) -> Result<Self>
Alias for DataFrame::new.
Sourcepub fn to_arrow(&self) -> Vec<RecordBatch>
pub fn to_arrow(&self) -> Vec<RecordBatch>
Return the underlying Arrow batches.
Sourcepub fn lazy(&self) -> LazyFrame
pub fn lazy(&self) -> LazyFrame
Convert this eager DataFrame to a LazyFrame for query planning/execution.
Sourcepub fn select(&self, exprs: Vec<Expr>) -> Result<Self>
pub fn select(&self, exprs: Vec<Expr>) -> Result<Self>
Eager select, implemented by delegating to LazyFrame.
Sourcepub fn filter(&self, predicate: Expr) -> Result<Self>
pub fn filter(&self, predicate: Expr) -> Result<Self>
Eager filter, implemented by delegating to LazyFrame.
Sourcepub fn with_columns(&self, exprs: Vec<Expr>) -> Result<Self>
pub fn with_columns(&self, exprs: Vec<Expr>) -> Result<Self>
Eager with_columns, implemented by delegating to LazyFrame.
Sourcepub fn join<K: Into<JoinKeys>>(
&self,
other: &DataFrame,
keys: K,
how: JoinType,
) -> Result<Self>
pub fn join<K: Into<JoinKeys>>( &self, other: &DataFrame, keys: K, how: JoinType, ) -> Result<Self>
Join with another DataFrame using provided join keys.
Sourcepub fn sort(&self, by: Vec<String>, descending: Vec<bool>) -> Result<Self>
pub fn sort(&self, by: Vec<String>, descending: Vec<bool>) -> Result<Self>
Sort by one or more columns.
Sourcepub fn fill_null<T: Into<FillNull>>(&self, fill: T) -> Result<Self>
pub fn fill_null<T: Into<FillNull>>(&self, fill: T) -> Result<Self>
Fill null values using a scalar or strategy.
Sourcepub fn drop_nulls(&self, subset: Option<Vec<String>>) -> Result<Self>
pub fn drop_nulls(&self, subset: Option<Vec<String>>) -> Result<Self>
Drop rows containing null values.
Sourcepub fn null_count(&self) -> Result<Self>
pub fn null_count(&self) -> Result<Self>
Count null values per column.