pub struct DataFrameGroupBy<'a> { /* private fields */ }Expand description
Deferred GroupBy object for DataFrame.
Created by DataFrame::groupby(). Call aggregation methods to produce results.
Implementations§
Source§impl DataFrameGroupBy<'_>
impl DataFrameGroupBy<'_>
Sourcepub fn sharing(self, layout: &Arc<DenseGroupLayout>) -> Self
pub fn sharing(self, layout: &Arc<DenseGroupLayout>) -> Self
Name the result’s key levels names (one per key; None for an
unnamed key) instead of the key column names - for keys a caller
grouped by through key columns of its own (fvsao.19).
This groupby reading and keeping its single text key’s grouping in
layout - the cache the groupby object holds for all its calls and
selections, as pandas’ keeps its grouper (br-frankenpandas-e186m).
pub fn with_key_names<N: Into<LabelName>>( self, names: Vec<Option<N>>, ) -> Result<Self, FrameError>
Sourcepub fn group_codes(&self) -> Result<(Column, Index), FrameError>
pub fn group_codes(&self) -> Result<(Column, Index), FrameError>
Every row’s group as a code in this groupby’s group order (null where
dropna drops the row), and the groups in that order as an index: their
flat labels, carrying the row MultiIndex levels when grouping by
several keys. A Series grouped by the codes reduces to one value per
code, and take of this index at the codes labels that result as pandas
labels the groups - how the Python binding runs gb[col] over several
keys (br-frankenpandas-rc0923-epic-rust-parity-bugs-4qg5w.9).
Sourcepub fn combine_group_stat_frames<F>(
&self,
stat: F,
) -> Result<DataFrame, FrameError>
pub fn combine_group_stat_frames<F>( &self, stat: F, ) -> Result<DataFrame, FrameError>
stat of every group’s frame (its value columns) stacked under the
group keys: pandas’ DataFrameGroupBy.corr / cov shape, the inner
level keeping the stat frame’s own index name (pandas’ None; it was
‘index’, c90rr). A caller with the options of its own stat runs it
here.
Sourcepub fn keys(&self) -> Vec<IndexLabel>
pub fn keys(&self) -> Vec<IndexLabel>
Group labels in group iteration order.
Sourcepub fn indices(&self) -> HashMap<IndexLabel, Vec<usize>>
pub fn indices(&self) -> HashMap<IndexLabel, Vec<usize>>
Mapping from group labels to source row positions.
Sourcepub fn groups(&self) -> HashMap<IndexLabel, Vec<usize>>
pub fn groups(&self) -> HashMap<IndexLabel, Vec<usize>>
Alias for indices, matching pandas’ groups property shape.
Sourcepub fn dtypes(&self) -> Result<Series, FrameError>
pub fn dtypes(&self) -> Result<Series, FrameError>
DTypes for grouped value columns.
Sourcepub fn plot(&self) -> Result<PlotSpec, FrameError>
pub fn plot(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped plotting request.
Sourcepub fn line(&self) -> Result<PlotSpec, FrameError>
pub fn line(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped line plot request.
Sourcepub fn line_to_svg(&self) -> Result<String, FrameError>
pub fn line_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe line plot directly to deterministic SVG string.
Sourcepub fn line_to_html(&self) -> Result<String, FrameError>
pub fn line_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe line plot directly to HTML figure snippet.
Sourcepub fn line_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn line_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe line plot directly to disk.
Sourcepub fn bar(&self) -> Result<PlotSpec, FrameError>
pub fn bar(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped bar plot request.
Sourcepub fn bar_to_svg(&self) -> Result<String, FrameError>
pub fn bar_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe bar plot directly to deterministic SVG string.
Sourcepub fn bar_to_html(&self) -> Result<String, FrameError>
pub fn bar_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe bar plot directly to HTML figure snippet.
Sourcepub fn bar_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn bar_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe bar plot directly to disk.
Sourcepub fn barh(&self) -> Result<PlotSpec, FrameError>
pub fn barh(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped horizontal bar plot request.
Sourcepub fn barh_to_svg(&self) -> Result<String, FrameError>
pub fn barh_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe horizontal bar plot directly to deterministic SVG string.
Sourcepub fn barh_to_html(&self) -> Result<String, FrameError>
pub fn barh_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe horizontal bar plot directly to HTML figure snippet.
Sourcepub fn barh_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn barh_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe horizontal bar plot directly to disk.
Sourcepub fn area(&self) -> Result<PlotSpec, FrameError>
pub fn area(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped area plot request.
Sourcepub fn area_to_svg(&self) -> Result<String, FrameError>
pub fn area_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe area plot directly to deterministic SVG string.
Sourcepub fn area_to_html(&self) -> Result<String, FrameError>
pub fn area_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe area plot directly to HTML figure snippet.
Sourcepub fn area_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn area_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe area plot directly to disk.
Sourcepub fn scatter(&self) -> Result<PlotSpec, FrameError>
pub fn scatter(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped scatter plot request.
Sourcepub fn scatter_to_svg(&self) -> Result<String, FrameError>
pub fn scatter_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe scatter plot directly to deterministic SVG string.
Sourcepub fn scatter_to_html(&self) -> Result<String, FrameError>
pub fn scatter_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe scatter plot directly to HTML figure snippet.
Sourcepub fn scatter_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn scatter_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe scatter plot directly to disk.
Sourcepub fn scatter_columns(&self, x: &str, y: &str) -> Result<PlotSpec, FrameError>
pub fn scatter_columns(&self, x: &str, y: &str) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped scatter plot request for the specified (x, y) column pair.
Sourcepub fn scatter_xy(&self, x: &str, y: &str) -> Result<PlotSpec, FrameError>
pub fn scatter_xy(&self, x: &str, y: &str) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped scatter plot request for the specified (x, y) column pair (alias for DataFrameGroupBy::scatter_columns).
Sourcepub fn scatter_columns_to_svg(
&self,
x: &str,
y: &str,
) -> Result<String, FrameError>
pub fn scatter_columns_to_svg( &self, x: &str, y: &str, ) -> Result<String, FrameError>
Convenience helper: render grouped dataframe (x, y) scatter plot directly to deterministic SVG string.
Sourcepub fn scatter_xy_to_svg(&self, x: &str, y: &str) -> Result<String, FrameError>
pub fn scatter_xy_to_svg(&self, x: &str, y: &str) -> Result<String, FrameError>
Convenience helper: render grouped dataframe (x, y) scatter plot directly to deterministic SVG string (alias for DataFrameGroupBy::scatter_columns_to_svg).
Sourcepub fn scatter_columns_to_html(
&self,
x: &str,
y: &str,
) -> Result<String, FrameError>
pub fn scatter_columns_to_html( &self, x: &str, y: &str, ) -> Result<String, FrameError>
Convenience helper: render grouped dataframe (x, y) scatter plot directly to HTML figure snippet.
Sourcepub fn scatter_xy_to_html(&self, x: &str, y: &str) -> Result<String, FrameError>
pub fn scatter_xy_to_html(&self, x: &str, y: &str) -> Result<String, FrameError>
Convenience helper: render grouped dataframe (x, y) scatter plot directly to HTML figure snippet (alias for DataFrameGroupBy::scatter_columns_to_html).
Sourcepub fn scatter_columns_to_file<P: AsRef<Path>>(
&self,
x: &str,
y: &str,
path: P,
) -> Result<(), FrameError>
pub fn scatter_columns_to_file<P: AsRef<Path>>( &self, x: &str, y: &str, path: P, ) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe (x, y) scatter plot directly to disk.
Sourcepub fn scatter_xy_to_file<P: AsRef<Path>>(
&self,
x: &str,
y: &str,
path: P,
) -> Result<(), FrameError>
pub fn scatter_xy_to_file<P: AsRef<Path>>( &self, x: &str, y: &str, path: P, ) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe (x, y) scatter plot directly to disk (alias for DataFrameGroupBy::scatter_columns_to_file).
Sourcepub fn pie(&self) -> Result<PlotSpec, FrameError>
pub fn pie(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped pie plot request.
Sourcepub fn pie_to_svg(&self) -> Result<String, FrameError>
pub fn pie_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe pie plot directly to deterministic SVG string.
Sourcepub fn pie_to_html(&self) -> Result<String, FrameError>
pub fn pie_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe pie plot directly to HTML figure snippet.
Sourcepub fn pie_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn pie_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe pie plot directly to disk.
Sourcepub fn kde(&self) -> Result<PlotSpec, FrameError>
pub fn kde(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped kernel density estimation plot request.
Sourcepub fn kde_to_svg(&self) -> Result<String, FrameError>
pub fn kde_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe KDE plot directly to deterministic SVG string.
Sourcepub fn kde_to_html(&self) -> Result<String, FrameError>
pub fn kde_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe KDE plot directly to HTML figure snippet.
Sourcepub fn kde_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn kde_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe KDE plot directly to disk.
Sourcepub fn density(&self) -> Result<PlotSpec, FrameError>
pub fn density(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped density plot request (alias for DataFrameGroupBy::kde).
Sourcepub fn density_to_svg(&self) -> Result<String, FrameError>
pub fn density_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe density plot directly to deterministic SVG string.
Sourcepub fn density_to_html(&self) -> Result<String, FrameError>
pub fn density_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe density plot directly to HTML figure snippet.
Sourcepub fn density_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn density_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe density plot directly to disk.
Sourcepub fn hexbin(&self) -> Result<PlotSpec, FrameError>
pub fn hexbin(&self) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped hexbin plot request.
Sourcepub fn hexbin_to_svg(&self) -> Result<String, FrameError>
pub fn hexbin_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe hexbin plot directly to deterministic SVG string.
Sourcepub fn hexbin_to_html(&self) -> Result<String, FrameError>
pub fn hexbin_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe hexbin plot directly to HTML figure snippet.
Sourcepub fn hexbin_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn hexbin_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe hexbin plot directly to disk.
Sourcepub fn hexbin_columns(&self, x: &str, y: &str) -> Result<PlotSpec, FrameError>
pub fn hexbin_columns(&self, x: &str, y: &str) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped hexbin plot request for the specified (x, y) column pair.
Sourcepub fn hexbin_xy(&self, x: &str, y: &str) -> Result<PlotSpec, FrameError>
pub fn hexbin_xy(&self, x: &str, y: &str) -> Result<PlotSpec, FrameError>
Return a backend-neutral pandas-style grouped hexbin plot request for the specified (x, y) column pair (alias for DataFrameGroupBy::hexbin_columns).
Sourcepub fn hexbin_columns_to_svg(
&self,
x: &str,
y: &str,
) -> Result<String, FrameError>
pub fn hexbin_columns_to_svg( &self, x: &str, y: &str, ) -> Result<String, FrameError>
Convenience helper: render grouped dataframe (x, y) hexbin plot directly to deterministic SVG string.
Sourcepub fn hexbin_xy_to_svg(&self, x: &str, y: &str) -> Result<String, FrameError>
pub fn hexbin_xy_to_svg(&self, x: &str, y: &str) -> Result<String, FrameError>
Convenience helper: render grouped dataframe (x, y) hexbin plot directly to deterministic SVG string (alias for DataFrameGroupBy::hexbin_columns_to_svg).
Sourcepub fn hexbin_columns_to_html(
&self,
x: &str,
y: &str,
) -> Result<String, FrameError>
pub fn hexbin_columns_to_html( &self, x: &str, y: &str, ) -> Result<String, FrameError>
Convenience helper: render grouped dataframe (x, y) hexbin plot directly to HTML figure snippet.
Sourcepub fn hexbin_xy_to_html(&self, x: &str, y: &str) -> Result<String, FrameError>
pub fn hexbin_xy_to_html(&self, x: &str, y: &str) -> Result<String, FrameError>
Convenience helper: render grouped dataframe (x, y) hexbin plot directly to HTML figure snippet (alias for DataFrameGroupBy::hexbin_columns_to_html).
Sourcepub fn hexbin_columns_to_file<P: AsRef<Path>>(
&self,
x: &str,
y: &str,
path: P,
) -> Result<(), FrameError>
pub fn hexbin_columns_to_file<P: AsRef<Path>>( &self, x: &str, y: &str, path: P, ) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe (x, y) hexbin plot directly to disk.
Sourcepub fn hexbin_xy_to_file<P: AsRef<Path>>(
&self,
x: &str,
y: &str,
path: P,
) -> Result<(), FrameError>
pub fn hexbin_xy_to_file<P: AsRef<Path>>( &self, x: &str, y: &str, path: P, ) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe (x, y) hexbin plot directly to disk (alias for DataFrameGroupBy::hexbin_columns_to_file).
Sourcepub fn plot_xy(
&self,
kind: PlotKind,
x: &str,
y: &str,
) -> Result<PlotSpec, FrameError>
pub fn plot_xy( &self, kind: PlotKind, x: &str, y: &str, ) -> Result<PlotSpec, FrameError>
Return a backend-neutral grouped plot request for the specified plot kind and (x, y) column pair.
Sourcepub fn plot_with_kind(&self, kind: PlotKind) -> Result<PlotSpec, FrameError>
pub fn plot_with_kind(&self, kind: PlotKind) -> Result<PlotSpec, FrameError>
Return a backend-neutral grouped plot request for the specified plot kind.
Sourcepub fn hist(&self) -> Result<HistogramSpec, FrameError>
pub fn hist(&self) -> Result<HistogramSpec, FrameError>
Return a backend-neutral pandas-style grouped histogram request.
Sourcepub fn boxplot(&self) -> Result<BoxPlotSpec, FrameError>
pub fn boxplot(&self) -> Result<BoxPlotSpec, FrameError>
Return a backend-neutral pandas-style grouped boxplot request.
Sourcepub fn box_plot(&self) -> Result<BoxPlotSpec, FrameError>
pub fn box_plot(&self) -> Result<BoxPlotSpec, FrameError>
Return a backend-neutral pandas-style grouped boxplot request (alias for DataFrameGroupBy::boxplot).
Sourcepub fn box(&self) -> Result<BoxPlotSpec, FrameError>
pub fn box(&self) -> Result<BoxPlotSpec, FrameError>
Return a backend-neutral pandas-style grouped boxplot request (alias for DataFrameGroupBy::boxplot).
Sourcepub fn plot_to_svg(&self) -> Result<String, FrameError>
pub fn plot_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe plot directly to deterministic SVG string.
Sourcepub fn plot_to_html(&self) -> Result<String, FrameError>
pub fn plot_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe plot directly to HTML figure snippet.
Sourcepub fn plot_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn plot_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe plot directly to disk.
Sourcepub fn hist_to_svg(&self) -> Result<String, FrameError>
pub fn hist_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe histogram directly to deterministic SVG string.
Sourcepub fn hist_to_html(&self) -> Result<String, FrameError>
pub fn hist_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe histogram directly to HTML figure snippet.
Sourcepub fn hist_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn hist_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe histogram directly to disk.
Sourcepub fn boxplot_to_svg(&self) -> Result<String, FrameError>
pub fn boxplot_to_svg(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe boxplot directly to deterministic SVG string.
Sourcepub fn boxplot_to_html(&self) -> Result<String, FrameError>
pub fn boxplot_to_html(&self) -> Result<String, FrameError>
Convenience helper: render grouped dataframe boxplot directly to HTML figure snippet.
Sourcepub fn boxplot_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
pub fn boxplot_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe boxplot directly to disk.
Sourcepub fn hist_with_bins(&self, bins: usize) -> Result<HistogramSpec, FrameError>
pub fn hist_with_bins(&self, bins: usize) -> Result<HistogramSpec, FrameError>
Return a backend-neutral grouped histogram request with a custom number of bins.
Sourcepub fn hist_with_bins_to_svg(&self, bins: usize) -> Result<String, FrameError>
pub fn hist_with_bins_to_svg(&self, bins: usize) -> Result<String, FrameError>
Convenience helper: render grouped dataframe histogram with custom bins directly to deterministic SVG string.
Sourcepub fn hist_with_bins_to_html(&self, bins: usize) -> Result<String, FrameError>
pub fn hist_with_bins_to_html(&self, bins: usize) -> Result<String, FrameError>
Convenience helper: render grouped dataframe histogram with custom bins directly to HTML figure snippet.
Sourcepub fn hist_with_bins_to_file<P: AsRef<Path>>(
&self,
bins: usize,
path: P,
) -> Result<(), FrameError>
pub fn hist_with_bins_to_file<P: AsRef<Path>>( &self, bins: usize, path: P, ) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe histogram with custom bins directly to disk.
Sourcepub fn hist_columns(
&self,
columns: &[&str],
bins: usize,
) -> Result<HistogramSpec, FrameError>
pub fn hist_columns( &self, columns: &[&str], bins: usize, ) -> Result<HistogramSpec, FrameError>
Return a backend-neutral grouped histogram request restricted to the specified columns with custom bin count.
Sourcepub fn hist_columns_to_svg(
&self,
columns: &[&str],
bins: usize,
) -> Result<String, FrameError>
pub fn hist_columns_to_svg( &self, columns: &[&str], bins: usize, ) -> Result<String, FrameError>
Convenience helper: render grouped dataframe histogram for selected columns directly to deterministic SVG string.
Sourcepub fn hist_columns_to_html(
&self,
columns: &[&str],
bins: usize,
) -> Result<String, FrameError>
pub fn hist_columns_to_html( &self, columns: &[&str], bins: usize, ) -> Result<String, FrameError>
Convenience helper: render grouped dataframe histogram for selected columns directly to HTML figure snippet.
Sourcepub fn hist_columns_to_file<P: AsRef<Path>>(
&self,
columns: &[&str],
bins: usize,
path: P,
) -> Result<(), FrameError>
pub fn hist_columns_to_file<P: AsRef<Path>>( &self, columns: &[&str], bins: usize, path: P, ) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe histogram for selected columns directly to disk.
Sourcepub fn boxplot_columns(
&self,
columns: &[&str],
) -> Result<BoxPlotSpec, FrameError>
pub fn boxplot_columns( &self, columns: &[&str], ) -> Result<BoxPlotSpec, FrameError>
Return a backend-neutral grouped boxplot request restricted to the specified columns.
Sourcepub fn boxplot_columns_to_svg(
&self,
columns: &[&str],
) -> Result<String, FrameError>
pub fn boxplot_columns_to_svg( &self, columns: &[&str], ) -> Result<String, FrameError>
Convenience helper: render grouped dataframe boxplot for selected columns directly to deterministic SVG string.
Sourcepub fn boxplot_columns_to_html(
&self,
columns: &[&str],
) -> Result<String, FrameError>
pub fn boxplot_columns_to_html( &self, columns: &[&str], ) -> Result<String, FrameError>
Convenience helper: render grouped dataframe boxplot for selected columns directly to HTML figure snippet.
Sourcepub fn boxplot_columns_to_file<P: AsRef<Path>>(
&self,
columns: &[&str],
path: P,
) -> Result<(), FrameError>
pub fn boxplot_columns_to_file<P: AsRef<Path>>( &self, columns: &[&str], path: P, ) -> Result<(), FrameError>
Convenience helper: save rendered grouped dataframe boxplot for selected columns directly to disk.
Sourcepub fn any(&self) -> Result<DataFrame, FrameError>
pub fn any(&self) -> Result<DataFrame, FrameError>
GroupBy any (returns True if any value is truthy per group).
Sourcepub fn all(&self) -> Result<DataFrame, FrameError>
pub fn all(&self) -> Result<DataFrame, FrameError>
GroupBy all (returns True if all values are truthy per group).
Sourcepub fn bool_reduce_with_skipna(
&self,
all: bool,
skipna: bool,
) -> Result<DataFrame, FrameError>
pub fn bool_reduce_with_skipna( &self, all: bool, skipna: bool, ) -> Result<DataFrame, FrameError>
pandas’ any(skipna=...) / all(skipna=...): with skipna=false a
missing value is read, as numpy’s bool of NaN, truthy - any of a
group holding one is True, and all is unchanged, a skipped value
never having made it False (br-frankenpandas-n57tz: the keyword was
unexpected). pandas’ nullable dtypes answer <NA> instead (Kleene
logic); callers refuse those.
Sourcepub fn sum(&self) -> Result<DataFrame, FrameError>
pub fn sum(&self) -> Result<DataFrame, FrameError>
GroupBy sum.
Sourcepub fn mean(&self) -> Result<DataFrame, FrameError>
pub fn mean(&self) -> Result<DataFrame, FrameError>
GroupBy mean.
pub fn count(&self) -> Result<DataFrame, FrameError>
Sourcepub fn min(&self) -> Result<DataFrame, FrameError>
pub fn min(&self) -> Result<DataFrame, FrameError>
GroupBy min.
Sourcepub fn max(&self) -> Result<DataFrame, FrameError>
pub fn max(&self) -> Result<DataFrame, FrameError>
GroupBy max.
Sourcepub fn std(&self) -> Result<DataFrame, FrameError>
pub fn std(&self) -> Result<DataFrame, FrameError>
GroupBy std.
Sourcepub fn var(&self) -> Result<DataFrame, FrameError>
pub fn var(&self) -> Result<DataFrame, FrameError>
GroupBy var.
Sourcepub fn median(&self) -> Result<DataFrame, FrameError>
pub fn median(&self) -> Result<DataFrame, FrameError>
GroupBy median.
Sourcepub fn var_ddof(&self, ddof: usize) -> Result<DataFrame, FrameError>
pub fn var_ddof(&self, ddof: usize) -> Result<DataFrame, FrameError>
GroupBy variance with pandas’ ddof; var_ddof(1) is var.
Sourcepub fn std_ddof(&self, ddof: usize) -> Result<DataFrame, FrameError>
pub fn std_ddof(&self, ddof: usize) -> Result<DataFrame, FrameError>
GroupBy standard deviation with pandas’ ddof; std_ddof(1) is
std.
Sourcepub fn sem_ddof(&self, ddof: usize) -> Result<DataFrame, FrameError>
pub fn sem_ddof(&self, ddof: usize) -> Result<DataFrame, FrameError>
GroupBy standard error of the mean with pandas’ ddof; sem_ddof(1)
is sem.
Sourcepub fn first_skipna(&self, skipna: bool) -> Result<DataFrame, FrameError>
pub fn first_skipna(&self, skipna: bool) -> Result<DataFrame, FrameError>
pandas’ first(skipna=): with skipna = false each group’s value at
its first row, missing or not; first_skipna(true) is
first.
Sourcepub fn last_skipna(&self, skipna: bool) -> Result<DataFrame, FrameError>
pub fn last_skipna(&self, skipna: bool) -> Result<DataFrame, FrameError>
pandas’ last(skipna=): with skipna = false each group’s value at
its last row, missing or not; last_skipna(true) is last.
Sourcepub fn with_min_count(
&self,
reduced: DataFrame,
min_count: usize,
mask_text: bool,
) -> Result<DataFrame, FrameError>
pub fn with_min_count( &self, reduced: DataFrame, min_count: usize, mask_text: bool, ) -> Result<DataFrame, FrameError>
pandas’ min_count on a groupby sum/prod/min/max/first/last already
reduced into reduced: a group with fewer than min_count non-missing
values gets a missing result (see mask_groups; mask_text = false
for min/max, which pandas leaves strings alone under). min_count = 0
changes nothing.
pub fn idxmin(&self) -> Result<DataFrame, FrameError>
Sourcepub fn idxmax(&self) -> Result<DataFrame, FrameError>
pub fn idxmax(&self) -> Result<DataFrame, FrameError>
GroupBy idxmax. Returns the index label of the maximum value for each group.
pub fn first(&self) -> Result<DataFrame, FrameError>
Sourcepub fn last(&self) -> Result<DataFrame, FrameError>
pub fn last(&self) -> Result<DataFrame, FrameError>
GroupBy last.
pub fn nunique(&self) -> Result<DataFrame, FrameError>
Sourcepub fn nunique_with_dropna(&self, dropna: bool) -> Result<DataFrame, FrameError>
pub fn nunique_with_dropna(&self, dropna: bool) -> Result<DataFrame, FrameError>
pandas’ nunique(dropna=...): with dropna=false a group’s missing
values count as one more distinct value, column by column - a
column’s group has one where its size passes its count
(br-frankenpandas-n57tz: the keyword was unexpected).
Sourcepub fn prod(&self) -> Result<DataFrame, FrameError>
pub fn prod(&self) -> Result<DataFrame, FrameError>
GroupBy prod (product of non-null values per group).
Sourcepub fn agg(
&self,
func_map: &HashMap<String, String>,
) -> Result<DataFrame, FrameError>
pub fn agg( &self, func_map: &HashMap<String, String>, ) -> Result<DataFrame, FrameError>
Aggregate with per-column function mapping.
Matches df.groupby(col).agg({'B': 'sum', 'C': 'mean'}) semantics.
func_map: mapping of column_name → aggregation function name.
Only the specified columns are included in the output.
Sourcepub fn aggregate(
&self,
func_map: &HashMap<String, String>,
) -> Result<DataFrame, FrameError>
pub fn aggregate( &self, func_map: &HashMap<String, String>, ) -> Result<DataFrame, FrameError>
pandas spelling alias for Self::agg.
Sourcepub fn agg_list(&self, funcs: &[&str]) -> Result<DataFrame, FrameError>
pub fn agg_list(&self, funcs: &[&str]) -> Result<DataFrame, FrameError>
Aggregate with multiple functions applied to all value columns.
Matches df.groupby(col).agg(['sum', 'mean']) semantics.
Returns a DataFrame where each original value column is expanded into
N columns (one per function), named {col}_{func}.
Sourcepub fn agg_dict_list(
&self,
func_map: &[(String, Vec<String>)],
) -> Result<DataFrame, FrameError>
pub fn agg_dict_list( &self, func_map: &[(String, Vec<String>)], ) -> Result<DataFrame, FrameError>
Aggregate with a per-column list of functions.
Matches df.groupby(col).agg({'a': ['sum', 'mean'], 'b': ['min']})
semantics: the result carries a TWO-LEVEL column axis of
(input_col, func) tuples, in the order the caller requested, and
func_map is an ordered slice rather than a map so that order can be
expressed at all.
Storage keeps one column per (input_col, func) pair keyed
{col}_{func}, with the tuples alongside in column_multiindex — see
Self::with_agg_column_multiindex for why, and
Self::agg_dict_list_specs for the measured ordering rule.
Columns absent from the frame are skipped (pandas raises — noted in
agg_dict_list_specs), group-by key columns are rejected, and an empty
func list is rejected.
Sourcepub fn agg_named(
&self,
specs: &[(&str, &str, &str)],
) -> Result<DataFrame, FrameError>
pub fn agg_named( &self, specs: &[(&str, &str, &str)], ) -> Result<DataFrame, FrameError>
Named aggregation: each tuple is (output_name, input_column, function).
Matches df.groupby('g').agg(out=('col', 'func')) in pandas.
The output DataFrame has columns named by output_name, computed
by applying function to input_column within each group.
Example:
let result = df.groupby(&["region"]).unwrap().agg_named(&[
("total_sales", "revenue", "sum"),
("avg_price", "price", "mean"),
("num_orders", "order_id", "count"),
]).unwrap();Sourcepub fn agg_multi(
&self,
func_map: &[(String, Vec<String>)],
) -> Result<DataFrame, FrameError>
pub fn agg_multi( &self, func_map: &[(String, Vec<String>)], ) -> Result<DataFrame, FrameError>
Aggregate with multiple functions per column.
Matches df.groupby(col).agg({'A': ['sum', 'mean'], 'B': ['count']}),
returning pandas’ two-level column axis — see Self::agg_dict_list,
which this delegates to.
This was a near-verbatim copy of agg_dict_list, differing ONLY in that
an empty function list is skipped here and rejected there. It is now that
one difference and nothing else, so the column-axis rule cannot drift
between the two entry points — which it would have, since the conformance
corpus reaches agg_multi while the fp-frame tests reach
agg_dict_list. (br-frankenpandas-nv5ct)
Sourcepub fn apply<F>(&self, func: F) -> Result<DataFrame, FrameError>
pub fn apply<F>(&self, func: F) -> Result<DataFrame, FrameError>
Apply a custom function to each group DataFrame.
Matches pandas 2.x df.groupby(col).apply(func, include_groups=False)
for DataFrame-returning functions. Results are concatenated vertically;
multi-row group results receive group-key row MultiIndex metadata.
Sourcepub fn apply_with_include_groups<F>(
&self,
include_groups: bool,
func: F,
) -> Result<DataFrame, FrameError>
pub fn apply_with_include_groups<F>( &self, include_groups: bool, func: F, ) -> Result<DataFrame, FrameError>
Apply a DataFrame-returning function with explicit include_groups.
Sourcepub fn apply_scalar<F>(&self, name: &str, func: F) -> Result<Series, FrameError>
pub fn apply_scalar<F>(&self, name: &str, func: F) -> Result<Series, FrameError>
Apply a scalar-returning function to each group.
Rust’s static return types expose pandas’ scalar-returning
GroupBy.apply shape as an explicit API: one Series value per group,
indexed by the group keys.
Sourcepub fn apply_scalar_with_include_groups<F>(
&self,
name: &str,
include_groups: bool,
func: F,
) -> Result<Series, FrameError>
pub fn apply_scalar_with_include_groups<F>( &self, name: &str, include_groups: bool, func: F, ) -> Result<Series, FrameError>
Apply a scalar-returning function with explicit include_groups.
Sourcepub fn apply_series<F>(&self, func: F) -> Result<DataFrame, FrameError>
pub fn apply_series<F>(&self, func: F) -> Result<DataFrame, FrameError>
Apply a Series-returning function to each group.
Returned Series indexes become output columns. The column union is first-seen ordered and groups missing a Series label receive NaN, which matches pandas’ sparse DataFrame shape for uneven Series returns.
Sourcepub fn apply_series_with_include_groups<F>(
&self,
include_groups: bool,
func: F,
) -> Result<DataFrame, FrameError>
pub fn apply_series_with_include_groups<F>( &self, include_groups: bool, func: F, ) -> Result<DataFrame, FrameError>
Apply a Series-returning function with explicit include_groups.
Sourcepub fn apply_series_stacked<F>(
&self,
name: &str,
func: F,
) -> Result<DataFrame, FrameError>
pub fn apply_series_stacked<F>( &self, name: &str, func: F, ) -> Result<DataFrame, FrameError>
Apply a Series-returning function and stack each returned Series row.
This is the Rust API for pandas’ GroupBy.apply path where returned
Series objects do not share identical labels. The result is represented
as a one-column DataFrame because Series does not yet carry row
MultiIndex metadata; group keys and returned Series labels are retained
on the DataFrame row MultiIndex.
Sourcepub fn apply_series_stacked_with_include_groups<F>(
&self,
name: &str,
include_groups: bool,
func: F,
) -> Result<DataFrame, FrameError>
pub fn apply_series_stacked_with_include_groups<F>( &self, name: &str, include_groups: bool, func: F, ) -> Result<DataFrame, FrameError>
Apply a stacked Series-returning function with explicit include_groups.
pub fn transform(&self, func_name: &str) -> Result<DataFrame, FrameError>
Sourcepub fn transform_list(&self, funcs: &[&str]) -> Result<DataFrame, FrameError>
pub fn transform_list(&self, funcs: &[&str]) -> Result<DataFrame, FrameError>
Transform each group with multiple named aggregation functions.
Matches df.groupby(col).transform(['sum', 'mean']) for the
supported function set. One output column is produced per
{input_column}_{func} pair, and each aggregated value is
broadcast back to the original row positions of its group.
Sourcepub fn transform_fn<F>(&self, func: F) -> Result<DataFrame, FrameError>
pub fn transform_fn<F>(&self, func: F) -> Result<DataFrame, FrameError>
Transform each group using a user-supplied closure.
Matches df.groupby(col).transform(lambda s: ...) — the closure
receives a per-group Series (one call per value column × per group)
and must return a Series of the same length. Values are scattered
back to their original row positions, so the output DataFrame has the
same shape and index as the input. Group-by key columns are excluded
from the transform (matching pandas). The closure returning a Series
whose length differs from its input is rejected.
Sourcepub fn size(&self) -> Result<Series, FrameError>
pub fn size(&self) -> Result<Series, FrameError>
GroupBy size (number of rows per group). Over several keys the result’s index carries the keys’ row MultiIndex, as pandas returns (br-frankenpandas-rc0923-epic-rust-parity-bugs-4qg5w.9).
Sourcepub fn filter<F>(&self, func: F) -> Result<DataFrame, FrameError>
pub fn filter<F>(&self, func: F) -> Result<DataFrame, FrameError>
Filter groups using a function that returns bool for each group.
Analogous to df.groupby(col).filter(func).
The function receives a sub-DataFrame for each group and should return
true to keep the group or false to drop it. Returns a DataFrame
containing only the rows belonging to kept groups, preserving original
index and column order.
Sourcepub fn cumsum(&self) -> Result<DataFrame, FrameError>
pub fn cumsum(&self) -> Result<DataFrame, FrameError>
GroupBy cumulative sum. Matches df.groupby(col).cumsum(), dtype
included: int64 and bool columns come back int64.
Sourcepub fn cumprod(&self) -> Result<DataFrame, FrameError>
pub fn cumprod(&self) -> Result<DataFrame, FrameError>
GroupBy cumulative product. Matches df.groupby(col).cumprod(), dtype
included: int64 and bool columns come back int64.
Sourcepub fn cummax(&self) -> Result<DataFrame, FrameError>
pub fn cummax(&self) -> Result<DataFrame, FrameError>
GroupBy cumulative max. Matches df.groupby(col).cummax(), dtype
included: int64 stays int64, bool stays bool and datetime64 keeps
its zone.
Sourcepub fn cummin(&self) -> Result<DataFrame, FrameError>
pub fn cummin(&self) -> Result<DataFrame, FrameError>
GroupBy cumulative min. Matches df.groupby(col).cummin(), dtype
included: int64 stays int64, bool stays bool and datetime64 keeps
its zone.
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>
GroupBy rank within each group.
Matches df.groupby(col).rank().
method: “average” (default), “min”, “max”, “first”, “dense”
ascending: rank direction (default true = smallest gets rank 1)
na_option: “keep” (NaN stays NaN), “top” (NaN gets lowest ranks), “bottom” (NaN gets highest ranks)
Sourcepub fn rank_with_pct(
&self,
method: &str,
ascending: bool,
na_option: &str,
pct: bool,
) -> Result<DataFrame, FrameError>
pub fn rank_with_pct( &self, method: &str, ascending: bool, na_option: &str, pct: bool, ) -> Result<DataFrame, FrameError>
GroupBy rank within each group and optionally scale the ranks to percentiles.
Sourcepub fn shift(&self, periods: i64) -> Result<DataFrame, FrameError>
pub fn shift(&self, periods: i64) -> Result<DataFrame, FrameError>
GroupBy shift within each group.
Matches df.groupby(col).shift(periods).
Sourcepub fn diff(&self, periods: i64) -> Result<DataFrame, FrameError>
pub fn diff(&self, periods: i64) -> Result<DataFrame, FrameError>
GroupBy diff within each group.
Matches df.groupby(col).diff(periods).
Sourcepub fn nth(&self, n: i64) -> Result<DataFrame, FrameError>
pub fn nth(&self, n: i64) -> Result<DataFrame, FrameError>
GroupBy nth: select the nth row from each group.
Matches df.groupby(col).nth(n). Returns a DataFrame with one row per group.
Negative n counts from the end.
Sourcepub fn head(&self, n: i64) -> Result<DataFrame, FrameError>
pub fn head(&self, n: i64) -> Result<DataFrame, FrameError>
GroupBy head: select first n rows per group.
Matches df.groupby(col).head(n), including pandas’ negative n:
head(-k) keeps all but the last k rows of each group. Verified vs
live pandas 2.2.3.
Sourcepub fn tail(&self, n: i64) -> Result<DataFrame, FrameError>
pub fn tail(&self, n: i64) -> Result<DataFrame, FrameError>
GroupBy tail: select last n rows per group.
Matches df.groupby(col).tail(n), including pandas’ negative n:
tail(-k) drops the first k rows of each group. Verified vs live
pandas 2.2.3.
Sourcepub fn take(&self, indices: &[i64]) -> Result<DataFrame, FrameError>
pub fn take(&self, indices: &[i64]) -> Result<DataFrame, FrameError>
Return positional rows from each group.
Matches pd.DataFrameGroupBy.take(indices), resolving negative
positions relative to each group’s length.
Sourcepub fn sample(
&self,
n: Option<usize>,
frac: Option<f64>,
replace: bool,
seed: Option<u64>,
) -> Result<DataFrame, FrameError>
pub fn sample( &self, n: Option<usize>, frac: Option<f64>, replace: bool, seed: Option<u64>, ) -> Result<DataFrame, FrameError>
Randomly sample rows from each group.
Matches pd.DataFrameGroupBy.sample(n=..., frac=..., replace=...).
Sourcepub fn pct_change(&self, periods: i64) -> Result<DataFrame, FrameError>
pub fn pct_change(&self, periods: i64) -> Result<DataFrame, FrameError>
GroupBy pct_change within each group.
Matches df.groupby(col).pct_change().
Sourcepub fn pct_change_with_fill(
&self,
periods: i64,
fill_method: Option<&str>,
limit: Option<usize>,
) -> Result<DataFrame, FrameError>
pub fn pct_change_with_fill( &self, periods: i64, fill_method: Option<&str>, limit: Option<usize>, ) -> Result<DataFrame, FrameError>
pandas’ pct_change(periods, fill_method, limit) of each group, column
by column (see SeriesGroupBy::pct_change_with_fill).
Sourcepub fn value_counts(&self) -> Result<DataFrame, FrameError>
pub fn value_counts(&self) -> Result<DataFrame, FrameError>
GroupBy value_counts: count of each unique value per group.
Matches df.groupby(col)[value_col].value_counts().
Returns a DataFrame with group key + value as index and counts as values.
Sourcepub fn describe(&self) -> Result<DataFrame, FrameError>
pub fn describe(&self) -> Result<DataFrame, FrameError>
GroupBy describe: summary statistics per group.
Matches df.groupby(col).describe(). Returns count, mean, std, min,
25%/50%/75% quantiles, and max for each group’s numeric columns.
Sourcepub fn get_group(&self, name: &str) -> Result<DataFrame, FrameError>
pub fn get_group(&self, name: &str) -> Result<DataFrame, FrameError>
Retrieve a single group as a DataFrame.
Matches groupby.get_group(name). The name should match the
debug representation of the group key value (e.g. "a" for Utf8
or "Int64(1)" for numeric keys).
Sourcepub fn cumcount(&self) -> Result<Series, FrameError>
pub fn cumcount(&self) -> Result<Series, FrameError>
Assign within-group cumulative count (0-based).
Matches groupby.cumcount(). Returns a Series of Int64 with a
monotonically increasing counter within each group.
Sourcepub fn cumcount_with_ascending(
&self,
ascending: bool,
) -> Result<Series, FrameError>
pub fn cumcount_with_ascending( &self, ascending: bool, ) -> Result<Series, FrameError>
Assign within-group cumulative count (0-based) with explicit direction.
Matches groupby.cumcount(ascending=...).
Sourcepub fn ngroup(&self) -> Result<Series, FrameError>
pub fn ngroup(&self) -> Result<Series, FrameError>
Assign group number to each row.
Matches groupby.ngroup(). Returns a Series of Int64 where
each row gets the ordinal number of its group.
pub fn ngroup_with_ascending( &self, ascending: bool, ) -> Result<Series, FrameError>
Sourcepub fn pipe<F>(&self, func: F) -> Result<DataFrame, FrameError>
pub fn pipe<F>(&self, func: F) -> Result<DataFrame, FrameError>
Pipe the GroupBy through a function.
Matches groupby.pipe(func).
Sourcepub fn corr(&self) -> Result<DataFrame, FrameError>
pub fn corr(&self) -> Result<DataFrame, FrameError>
Pairwise Pearson correlation matrix per group.
Matches pd.DataFrameGroupBy.corr() by stacking each group’s
DataFrame correlation matrix under group-key row metadata.
Sourcepub fn cov(&self) -> Result<DataFrame, FrameError>
pub fn cov(&self) -> Result<DataFrame, FrameError>
Pairwise covariance matrix per group.
Matches pd.DataFrameGroupBy.cov() by stacking each group’s
DataFrame covariance matrix under group-key row metadata.
Sourcepub fn corrwith(&self, other: &DataFrame) -> Result<DataFrame, FrameError>
pub fn corrwith(&self, other: &DataFrame) -> Result<DataFrame, FrameError>
Column-wise correlation against another DataFrame per group.
Matches the DataFrameGroupBy.corrwith(other) result shape: one row
per group and one column per shared numeric column.
pub fn sem(&self) -> Result<DataFrame, FrameError>
Sourcepub fn skew_with_skipna(&self, skipna: bool) -> Result<DataFrame, FrameError>
pub fn skew_with_skipna(&self, skipna: bool) -> Result<DataFrame, FrameError>
pandas’ skew(skipna=...): with skipna=false a group holding a
missing value in a column is NaN there (br-frankenpandas-n57tz: the
keyword was unexpected).
Sourcepub fn skew(&self) -> Result<DataFrame, FrameError>
pub fn skew(&self) -> Result<DataFrame, FrameError>
Skewness per group (Fisher’s definition, bias=False).
Matches groupby.skew().
Sourcepub fn kurtosis(&self) -> Result<DataFrame, FrameError>
pub fn kurtosis(&self) -> Result<DataFrame, FrameError>
Kurtosis per group (Fisher’s excess, bias=False).
Matches groupby.kurtosis().
Sourcepub fn kurt(&self) -> Result<DataFrame, FrameError>
pub fn kurt(&self) -> Result<DataFrame, FrameError>
Alias for kurtosis() — pandas exposes both df.groupby(by).kurt()
and .kurtosis(). Parity requires both spellings.
Sourcepub fn ohlc(&self) -> Result<DataFrame, FrameError>
pub fn ohlc(&self) -> Result<DataFrame, FrameError>
Open-High-Low-Close per group.
Matches the current FrankenPandas groupby.ohlc() data contract.
The returned DataFrame keeps its flat storage column names while
carrying the pandas-style column MultiIndex in sidecar metadata.
Sourcepub fn ohlc_column_multiindex(&self) -> Result<MultiIndex, FrameError>
pub fn ohlc_column_multiindex(&self) -> Result<MultiIndex, FrameError>
pandas-style column MultiIndex for groupby.ohlc().
The first level is the source value column and the second level is one
of open, high, low, or close.
Sourcepub fn ohlc_with_column_multiindex(
&self,
) -> Result<(DataFrame, MultiIndex), FrameError>
pub fn ohlc_with_column_multiindex( &self, ) -> Result<(DataFrame, MultiIndex), FrameError>
Return the current flat OHLC frame plus pandas-style MultiIndex columns.
pub fn ffill(&self, limit: Option<usize>) -> Result<DataFrame, FrameError>
Sourcepub fn bfill(&self, limit: Option<usize>) -> Result<DataFrame, FrameError>
pub fn bfill(&self, limit: Option<usize>) -> Result<DataFrame, FrameError>
Backward-fill missing values within each group.
Matches pd.GroupBy.bfill(). Within each group, fills NaN values
with the next non-NaN value.
Sourcepub fn fillna(&self, value: &Scalar) -> Result<DataFrame, FrameError>
pub fn fillna(&self, value: &Scalar) -> Result<DataFrame, FrameError>
Fill missing values within each group using a scalar.
Matches pd.GroupBy.fillna(value).
Sourcepub fn expanding(&self, min_periods: Option<usize>) -> GroupByExpanding<'_>
pub fn expanding(&self, min_periods: Option<usize>) -> GroupByExpanding<'_>
Grouped expanding window operations.
Matches pd.DataFrameGroupBy.expanding(min_periods=...).
Sourcepub fn ewm(&self, span: Option<f64>, alpha: Option<f64>) -> GroupByEwm<'_>
pub fn ewm(&self, span: Option<f64>, alpha: Option<f64>) -> GroupByEwm<'_>
Grouped exponentially weighted moving window operations.
Matches pd.DataFrameGroupBy.ewm(span=..., alpha=...).
Sourcepub fn rolling(&self, window: usize) -> GroupByRolling<'_>
pub fn rolling(&self, window: usize) -> GroupByRolling<'_>
Grouped rolling window operations.
Matches pd.DataFrameGroupBy.rolling(window). Returns a
GroupByRolling struct that applies rolling operations per group.
Sourcepub fn resample(&self, freq: &str) -> GroupByResample<'_>
pub fn resample(&self, freq: &str) -> GroupByResample<'_>
Grouped resampling.
Matches pd.DataFrameGroupBy.resample(freq). Returns a
GroupByResample struct that applies resampling per group.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DataFrameGroupBy<'a>
impl<'a> !UnwindSafe for DataFrameGroupBy<'a>
impl<'a> Forget for DataFrameGroupBy<'a>
impl<'a> Freeze for DataFrameGroupBy<'a>
impl<'a> Move for DataFrameGroupBy<'a>
impl<'a> Send for DataFrameGroupBy<'a>
impl<'a> Sync for DataFrameGroupBy<'a>
impl<'a> Unpin for DataFrameGroupBy<'a>
impl<'a> UnsafeUnpin for DataFrameGroupBy<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more