text_html_output_1.png
import pandas as pd

import pandas as pd
t = pd.read_csv('../input/titanic/train.csv')
t

t[['Fare', 'Survived']].groupby(['Fare'], as_index=False).mean().sort_values(by=['Survived'], ascending=False)