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

import seaborn as sns

sms = pd.read_csv('/kaggle/input/sms-spam-collection-dataset/spam.csv', encoding='latin-1')

sms = sms.rename(columns={'v1': 'label', 'v2': 'text'})
sms.drop(['Unnamed: 2', 'Unnamed: 3', 'Unnamed: 4'], axis=1, inplace=True)

sms['label_num'] = sms['label'].map({'ham': 0, 'spam': 1})
sms['Length'] = sms['text'].apply(len)

sns.countplot(sms['label'], palette=sns.color_palette('Set2'))