pigeon/data_stats.py
def grouped_stats(data, grouped_cols, calculation_col, mean_colname, min_colname, max_colname):
    """
    Calculate basic statistics and return results in the form of a new dataframe.
    :param data: dataframe
    :param grouped_cols: Array/String, columns of values used to group data
    :param calculation_col: String, name of the column which stats will be calculated
    :param mean_colname: String, chosen name for mean column
    :param min_colname: String, chosen name for min column
    :param max_colname: String, chosen name for max column
    :return: dataframe
    """
    mean = data.groupby(grouped_cols)[calculation_col].mean()
    minimum = data.groupby(grouped_cols)[calculation_col].min()
    maximum = data.groupby(grouped_cols)[calculation_col].max()

    tab = create_stat_df(mean_colname, mean, min_colname, minimum, max_colname, maximum)
    return tab

    Calculate basic statistics and return results in the form of a new dataframe.
    :param data: dataframe
    :param grouped_cols: Array/String, columns of values used to group data
    :param calculation_col: String, name of the column which stats will be calculated
    :param mean_colname: String, chosen name for mean column
    :param min_colname: String, chosen name for min column
    :param max_colname: String, chosen name for max column
    :return: dataframe
    
Calculate basic statistics and return results in the form of a new dataframe.
Calculate basic statistics and return results in the form of a new dataframe .
def grouped_stats(data, grouped_cols, calculation_col, mean_colname, min_colname, max_colname):
    mean = data.groupby(grouped_cols)[calculation_col].mean()
    minimum = data.groupby(grouped_cols)[calculation_col].min()
    maximum = data.groupby(grouped_cols)[calculation_col].max()
    tab = create_stat_df(mean_colname, mean, min_colname, minimum, max_colname, maximum)
    return tab
def grouped_stats ( data , grouped_cols , calculation_col , mean_colname , min_colname , max_colname ) : mean = data . groupby ( grouped_cols ) [ calculation_col ] . mean ( ) minimum = data . groupby ( grouped_cols ) [ calculation_col ] . min ( ) maximum = data . groupby ( grouped_cols ) [ calculation_col ] . max ( ) tab = create_stat_df ( mean_colname , mean , min_colname , minimum , max_colname , maximum ) return tab
Calculate basic statistics and return results in the form of a new dataframe.
Calculate basic statistics and return results in the form of a new dataframe .
"""
    Calculate basic statistics and return results in the form of a new dataframe.
    :param data: dataframe
    :param grouped_cols: Array/String, columns of values used to group data
    :param calculation_col: String, name of the column which stats will be calculated
    :param mean_colname: String, chosen name for mean column
    :param min_colname: String, chosen name for min column
    :param max_colname: String, chosen name for max column
    :return: dataframe
    """
None
data
None
grouped_cols
Array/String, columns of values used to group data
Array / String columns of values used to group data
calculation_col
String, name of the column which stats will be calculated
String name of the column which stats will be calculated
mean_colname
String, chosen name for mean column
String chosen name for mean column
min_colname
String, chosen name for min column
String chosen name for min column
max_colname
String, chosen name for max column
String chosen name for max column