text_plain_output_1.png image_output_1.png
import pandas as pd

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

test_df[test_df['Fare'].isnull()]
print(test_df[test_df['Pclass'] == 3]['Fare'].mean())
test_df['Fare'].fillna(12.45, inplace=True)