text_plain_output_1.png
import pandas as pd

train_df = pd.read_csv('../input/train.csv')
test_df = pd.read_csv('../input/test.csv')

print(train_df[train_df['Pclass'] == 1]['Age'].mean())
print(train_df[train_df['Pclass'] == 2]['Age'].mean())
print(train_df[train_df['Pclass'] == 3]['Age'].mean())