stats#

Utility functions for calculating summary statistics.

Functions

get_values(df)

Calculate the summary statistics for the given set of points.

Classes

SummaryStatistics(x_mean, y_mean, x_stdev, ...)

Named tuple containing the summary statistics for plotting/analysis.

class data_morph.data.stats.SummaryStatistics(x_mean, y_mean, x_stdev, y_stdev, correlation)#

Bases: tuple

Named tuple containing the summary statistics for plotting/analysis.

correlation#

Alias for field number 4

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.

x_mean#

Alias for field number 0

x_stdev#

Alias for field number 2

y_mean#

Alias for field number 1

y_stdev#

Alias for field number 3

data_morph.data.stats.get_values(df: DataFrame) SummaryStatistics[source]#

Calculate the summary statistics for the given set of points.

Parameters:

df (pandas.DataFrame) – A dataset with columns x and y.

Returns:

Named tuple consisting of mean and standard deviations of x and y, along with the Pearson correlation coefficient between the two.

Return type:

SummaryStatistics