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

train = pd.read_csv('../input/drugsComTrain_raw.csv')
test = pd.read_csv('../input/drugsComTest_raw.csv')

ratings = train['rating'].values
labels = 1.0 * (ratings >= 8) + 1.0 * (ratings >= 5)

hot_labels = to_categorical(labels)
print('Shape of label tensor:', hot_labels.shape)
hot_labels[:3]