def export_normal_distribution(self, column, date): path = DataFrame.get_export_path(date) mean = MathsUtil.arr_mean(self.data[self.headers[column]]) median = MathsUtil.arr_median(self.data[self.headers[column]]) mode = MathsUtil.arr_mode(self.data[self.headers[column]]) GraphUtils.export_distribution_graph(self.data[self.headers[column]], self.headers[column], mean, median, mode, path) print(f"exported {path}dist_{self.headers[column]}")
def plot_normal_distribution(self, column): mean = MathsUtil.arr_mean(self.data[self.headers[column]]) median = MathsUtil.arr_median(self.data[self.headers[column]]) mode = MathsUtil.arr_mode(self.data[self.headers[column]]) GraphUtils.show_distribution_graph(self.data[self.headers[column]], self.headers[column], mean, median, mode)
def print_deviation_calculations(self, column): rows = self.data[self.headers[column]] DataFrame.print_deviation_calculation("Mean", rows, MathsUtil.arr_mean(rows)) DataFrame.print_deviation_calculation("Median", rows, MathsUtil.arr_median(rows)) DataFrame.print_deviation_calculation("Mode", rows, MathsUtil.arr_mode(rows))