pub struct DataFrameRolling<'a> { /* private fields */ }Expand description
Rolling window aggregation over a DataFrame’s numeric columns.
Created by DataFrame::rolling(). Applies the rolling window to each
numeric column independently.
Implementations§
Source§impl DataFrameRolling<'_>
impl DataFrameRolling<'_>
Sourcepub fn sum(&self) -> Result<DataFrame, FrameError>
pub fn sum(&self) -> Result<DataFrame, FrameError>
Rolling sum across all numeric columns.
Sourcepub fn mean(&self) -> Result<DataFrame, FrameError>
pub fn mean(&self) -> Result<DataFrame, FrameError>
Rolling mean across all numeric columns.
Sourcepub fn min(&self) -> Result<DataFrame, FrameError>
pub fn min(&self) -> Result<DataFrame, FrameError>
Rolling min across all numeric columns.
Sourcepub fn max(&self) -> Result<DataFrame, FrameError>
pub fn max(&self) -> Result<DataFrame, FrameError>
Rolling max across all numeric columns.
Sourcepub fn std(&self) -> Result<DataFrame, FrameError>
pub fn std(&self) -> Result<DataFrame, FrameError>
Rolling standard deviation across all numeric columns.
Sourcepub fn count(&self) -> Result<DataFrame, FrameError>
pub fn count(&self) -> Result<DataFrame, FrameError>
Rolling count of non-null values across all numeric columns.
Sourcepub fn var(&self) -> Result<DataFrame, FrameError>
pub fn var(&self) -> Result<DataFrame, FrameError>
Rolling variance across all numeric columns.
Sourcepub fn median(&self) -> Result<DataFrame, FrameError>
pub fn median(&self) -> Result<DataFrame, FrameError>
Rolling median across all numeric columns.
Sourcepub fn skew(&self) -> Result<DataFrame, FrameError>
pub fn skew(&self) -> Result<DataFrame, FrameError>
Rolling skewness across all numeric columns.
Matches df.rolling(window).skew(). Closes parity gap — the
Series-level Rolling has skew()/kurt()/first()/last()/prod() but
DataFrameRolling was missing all of them.
Sourcepub fn kurt(&self) -> Result<DataFrame, FrameError>
pub fn kurt(&self) -> Result<DataFrame, FrameError>
Rolling excess kurtosis across all numeric columns.
Matches df.rolling(window).kurt().
Sourcepub fn kurtosis(&self) -> Result<DataFrame, FrameError>
pub fn kurtosis(&self) -> Result<DataFrame, FrameError>
Alias for kurt() — pandas exposes both spellings.
Sourcepub fn first(&self) -> Result<DataFrame, FrameError>
pub fn first(&self) -> Result<DataFrame, FrameError>
Rolling first non-null value across all numeric columns.
Matches df.rolling(window).first().
Sourcepub fn last(&self) -> Result<DataFrame, FrameError>
pub fn last(&self) -> Result<DataFrame, FrameError>
Rolling last non-null value across all numeric columns.
Matches df.rolling(window).last().
Sourcepub fn prod(&self) -> Result<DataFrame, FrameError>
pub fn prod(&self) -> Result<DataFrame, FrameError>
Rolling product across all numeric columns.
Matches df.rolling(window).prod().
Sourcepub fn quantile(&self, q: f64) -> Result<DataFrame, FrameError>
pub fn quantile(&self, q: f64) -> Result<DataFrame, FrameError>
Rolling quantile across all numeric columns.
Sourcepub fn corr(&self) -> Result<DataFrame, FrameError>
pub fn corr(&self) -> Result<DataFrame, FrameError>
Rolling pairwise Pearson correlation across numeric columns.
Produces one output column per upper-triangular pair:
{left}__{right}.
Sourcepub fn cov(&self) -> Result<DataFrame, FrameError>
pub fn cov(&self) -> Result<DataFrame, FrameError>
Rolling pairwise sample covariance (ddof=1) across numeric columns.
Produces one output column per upper-triangular pair:
{left}__{right}.
Sourcepub fn corr_with(&self, other: &Series) -> Result<DataFrame, FrameError>
pub fn corr_with(&self, other: &Series) -> Result<DataFrame, FrameError>
Rolling correlation of each numeric column with other.
Matches pd.DataFrame.rolling(window).corr(other) when other
is a Series: produces a DataFrame with one column per numeric
input, each containing the rolling Pearson correlation between
that column and other. Column names are preserved.
Sourcepub fn cov_with(&self, other: &Series) -> Result<DataFrame, FrameError>
pub fn cov_with(&self, other: &Series) -> Result<DataFrame, FrameError>
Rolling covariance of each numeric column with other.
Matches pd.DataFrame.rolling(window).cov(other) when other
is a Series: produces a DataFrame with one column per numeric
input containing the rolling sample covariance (ddof=1) with
other. Column names are preserved.
Sourcepub fn agg(&self, funcs: &[&str]) -> Result<DataFrame, FrameError>
pub fn agg(&self, funcs: &[&str]) -> Result<DataFrame, FrameError>
Aggregate each numeric column with multiple rolling functions.
Matches df.rolling(window).agg(['sum', 'mean']). Output columns are
named {column}_{function}.
Sourcepub fn aggregate(&self, funcs: &[&str]) -> Result<DataFrame, FrameError>
pub fn aggregate(&self, funcs: &[&str]) -> Result<DataFrame, FrameError>
pandas alias for Self::agg.
Sourcepub fn sem(&self) -> Result<DataFrame, FrameError>
pub fn sem(&self) -> Result<DataFrame, FrameError>
Rolling standard error of the mean across numeric columns.
Sourcepub fn rank(
&self,
method: &str,
ascending: bool,
na_option: &str,
) -> Result<DataFrame, FrameError>
pub fn rank( &self, method: &str, ascending: bool, na_option: &str, ) -> Result<DataFrame, FrameError>
Rolling rank across numeric columns.
Sourcepub fn exclusions(&self) -> Vec<String>
pub fn exclusions(&self) -> Vec<String>
Frozenset-style label set excluded from this rolling window.
DataFrame rolling currently processes all numeric columns and excludes no labels.