image_output_1.png
from sklearn.preprocessing import scale

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

table = pd.read_csv('../input/genre-dataset/genre_dataset.txt')
table = table[table.genre.str.contains('jazz and blues') | table.genre.str.contains('soul and reggae')]
for i in range(4, len(table.columns)):
    col = table.iloc[:, [i]].values
    table.iloc[:, [i]] = scale(col)

le = LabelEncoder()
table['genre'] = le.fit_transform(table[['genre']])
table.head()