kaggle-titantic, from: https://www.youtube.com/watch?v=siEPqQsPLKA
install matplotlib:
conda install matplotlib
install scikit-learn:
conda install scikit-learn
train_df.count() #查看缺失数据
train_df.Age.min() train_df.Age.max()
train_df.Survived.value_counts()
train_df.Sex.value_counts().plot(kind=‘bar‘)
train_df [ (train_df[‘Sex‘] == ‘male‘) & (train_df[‘Pclass‘] == 1)] [‘Survived‘].value_counts().plot(kind=‘bar‘)
Data Analysis with Python : Exercise- Titantic Survivor Analysis | packtpub.com
原文:http://www.cnblogs.com/HITSZ/p/7747859.html