text_plain_output_1.png
import matplotlib.pyplot as plt

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sn

data_train_db = pd.read_csv('/kaggle/input/data-train-db/data_train_db.csv')
data_test_db = pd.read_csv('/kaggle/input/data-test-db/data_test_db.csv')

from scipy import stats
stdev_max = 6
pd.set_option('display.max_rows', data_train_db.shape[0] + 1)

data_train = data_train_db.values

labels = 'Runs', 'Does not run'
sizes = [np.sum(data_train[:,0]), np.sum(1-data_train[:,0])]

fig1, ax1 = plt.subplots()
ax1.pie(sizes, labels=labels, autopct='%1.1f%%',
        shadow=True, startangle=90)
ax1.axis('equal')  # Equal aspect ratio ensures that pie is drawn as a circle.

plt.show()

corrMatrix = data_train_db.corr().abs()

data_train_db.columns[79]

for i in range(2, 99):
    data_train_db[data_train_db.columns[i] + ' +'] = data_train_db[data_train_db.columns[i]] + data_train_db[data_train_db.columns[i + 1]]
for i in range(2, 98):
    data_train_db[data_train_db.columns[i] + ' ++'] = data_train_db[data_train_db.columns[i]] + data_train_db[data_train_db.columns[i + 1]] + data_train_db[data_train_db.columns[i + 2]]
corrMatrix2 = data_train_db.corr().abs()
S = np.argsort(np.array(corrMatrix['Running']))[::-1]
S = S[1:]
S2 = np.argsort(np.array(corrMatrix2['Running']))[::-1]
S2 = S2[1:]
print(S)
print(S2)