text_plain_output_1.png
import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

data = pd.read_csv('/kaggle/input/refined-data/data_hard_refined.csv')
data_full = pd.read_csv('/kaggle/input/refined-data/data_filtered.csv')
objectColumns = list(data.dtypes[data.dtypes == np.object].index)
numericColumns = list(data.dtypes[data.dtypes != np.object].index)
objectColumns = list(data.dtypes[data.dtypes == np.object].index)
numericColumns = list(data.dtypes[data.dtypes != np.object].index)

data['Energy/Surface'] = data['SiteEnergyUse(kBtu)'] / data['PropertyGFATotal']
data['GHG/Surface'] = data['TotalGHGEmissions'] / data['PropertyGFATotal']
columns_to_boxplot = ['SiteEnergyUse(kBtu)', 'Energy/Surface', 'TotalGHGEmissions', 'GHG/Surface']
for column in columns_to_boxplot:
    print('column: {}'.format(column))
    n_bins = 12
    subset = data[column]
    print('all datas: \n\tmean: {}\n\tmed: {}\n\tmod: {}\n\tvar: {}\n\tstd: {}\n\tskew: {}\n\tkur: {}'.format(subset.mean(), subset.median(), subset.mode()[0], subset.var(ddof=0), subset.std(ddof=0), subset.skew(), subset.kurtosis()))
    plt.hist(subset, n_bins, label='all datas', alpha=0.5)
    plt.title(column)
    plt.legend(loc='best')
    plt.show()
    subset.plot.box(vert=False)
    plt.title(column)
    plt.show()
    print('=' * 120)