application_vnd.jupyter.stderr_output_4.png application_vnd.jupyter.stderr_output_3.png text_html_output_1.png text_plain_output_2.png text_plain_output_1.png
import pandas as pd

import pandas as pd
messages = pd.read_csv('../input/spam-or-ham/spam.csv', usecols=['v1', 'v2'], encoding='ISO-8859-1')

messages = messages.rename(columns={'v1': 'label', 'v2': 'message'})

y = list(messages['label'])
y[:5]

y = list(pd.get_dummies(y, drop_first=True)['spam'])
y[:5]