Struct polars::prelude::LazyGroupBy [−][src]
pub struct LazyGroupBy { /* fields omitted */ }
Utility struct for lazy groupby operation.
Implementations
impl LazyGroupBy
[src]
impl LazyGroupBy
[src]pub fn agg(self, aggs: Vec<Expr, Global>) -> LazyFrame
[src]
Group by and aggregate.
Select a column with col and choose an aggregation.
If you want to aggregate all columns use col("*")
.
Example
use polars_core::prelude::*; use polars_lazy::prelude::*; fn example(df: DataFrame) -> LazyFrame { df.lazy() .groupby(vec![col("date")]) .agg(vec![ col("rain").min(), col("rain").sum(), col("rain").quantile(0.5).alias("median_rain"), ]) .sort("date", false) }
pub fn apply<F>(self, f: F) -> LazyFrame where
F: 'static + Fn(DataFrame) -> Result<DataFrame, PolarsError> + Send + Sync,
[src]
F: 'static + Fn(DataFrame) -> Result<DataFrame, PolarsError> + Send + Sync,
Auto Trait Implementations
impl !RefUnwindSafe for LazyGroupBy
impl !RefUnwindSafe for LazyGroupBy
impl Send for LazyGroupBy
impl Send for LazyGroupBy
impl Sync for LazyGroupBy
impl Sync for LazyGroupBy
impl Unpin for LazyGroupBy
impl Unpin for LazyGroupBy
impl !UnwindSafe for LazyGroupBy
impl !UnwindSafe for LazyGroupBy
Blanket Implementations
impl<T, U> Cast<U> for T where
U: FromCast<T>,
impl<T, U> Cast<U> for T where
U: FromCast<T>,
pub fn cast(self) -> U
impl<T> FromCast<T> for T
impl<T> FromCast<T> for T
pub fn from_cast(t: T) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,