TwoRavens

SummaryStatsUtil

SummaryStatsUtil does the calculation for the statistic variables in the ColumnInfo class. It takes a Pandas.Series and a ColumnInfo as input, fill all the attributes via several built-in functions.

SummaryStatsUtil (col_series, col_info)

      Return a blank SummaryStatsUtil object, does the statistic calculation and fill corresponding variables in the given ColumnInfo object.


calc_stats ()

      Compute numeric statistic if applicable, return True if the process has done correctly and False otherwise.


herfindahl_index (col_data, char, sum_val, drop_missing=True)

      Static method, calculate Herfindahl-Hirschman Index (HHI) for the column data. For each given data, HHI is defined as a sum of squared weights of values in a col_series. It varies from 1/n to 1.