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

train = pd.read_csv('/kaggle/input/titanic/train.csv')
test = pd.read_csv('/kaggle/input/titanic/test.csv')

train['Embarked'] = [1 if l == 'S' else 2 if l == 'C' else 3 for l in train['Embarked']]
train['Embarked'].value_counts()