Skip to main content

Module statistics

Module statistics 

Source

Structs§

AnalysisResults
CategoricalStatistics
ColumnStatistics
ComputeOptions
CorrelationMatrix
DistributionAnalysis
DistributionCharacteristics
Histogram
A histogram and its family’s expected counts, ready to draw.
HistogramCache
The last Histogram built for an analysis. A copy starts empty.
HistogramKey
What a histogram of DistributionAnalysis::sorted_sample_values is drawn for: one family’s fit, a number of bins over a range of values, and the scale.
NumericStatistics
OutlierAnalysis
PercentileBreakdown
TemporalStatistics
Describe for a Date, Datetime, Time or Duration column: each statistic a value of the column’s own type, written as the table writes it; None for a null.

Enums§

CorrelationMethod
Which coefficient the correlation matrix shows.
DistributionType

Constants§

RANK_VALUES
The most values Spearman’s ρ ranks: eight bytes each, so 512 MiB beside the rows read. A sample’s 100,000 rows rank up to 671 columns; a read of every row of a large table can be past it, and the matrix then has Pearson’s r only.

Functions§

analysis_results_from_describe
Builds describe-only AnalysisResults from a list of column statistics.
collect_lazy
Collect a LazyFrame, with the streaming engine when the streaming feature is on and use_streaming asks. Returns PolarsError for callers that store or show it (e.g. DataTableState::error).
compute_correlation_matrix
Pairwise Pearson correlations of all numeric columns, with p-values and sample sizes; needs at least two numeric columns.
compute_describe_from_lazy
Describe statistics for a frame. With sample_size, a table with more rows than that is described from a sample (see crate::analysis::sampling::analysis_rows); without it, every row is aggregated in one streaming pass, never held. known_total saves a count.
compute_describe_single_aggregation
Computes describe statistics in a single aggregation pass over the DataFrame. Uses one collect() with aggregated expressions for all columns (count, null_count, mean, std, min, percentiles, max).
compute_statistics_for_sample
Statistics for a LazyFrame, over the rows a crate::analysis::sampling::Sample picks from lf, which is already cut to the sample’s scope. Describe for every column; numeric percentiles, skewness, kurtosis, distribution fits and the correlation matrix as options asks.
may_stream
Whether a query over lf may use the streaming engine: asked for, and possible. Polars 0.55’s streaming engine cannot run an anonymous scan (a SQLite table): it stops at a todo!.