stats#
Utility functions for calculating summary statistics.
Functions
  | 
Calculate the summary statistics for the given set of points.  | 
Classes
  | 
Named tuple containing the summary statistics for plotting/analysis.  | 
- class data_morph.data.stats.SummaryStatistics(x_mean: float, y_mean: float, x_stdev: float, y_stdev: float, correlation: float, x_median: float | None, y_median: float | None)[source]#
 Bases:
NamedTupleNamed tuple containing the summary statistics for plotting/analysis.
- count(value, /)#
 Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)#
 Return first index of value.
Raises ValueError if the value is not present.
- data_morph.data.stats.get_summary_statistics(data: pd.DataFrame, with_median: bool) SummaryStatistics[source]#
 Calculate the summary statistics for the given set of points.
- Parameters:
 data (pandas.DataFrame) – A dataset with columns
xandy.with_median (bool) – Whether to include the median of
xandy.
- Returns:
 Named tuple consisting of mean and standard deviations of
xandy, along with the Pearson correlation coefficient between the two, and optionally, the median ofxandy.- Return type: