唐宇迪Python Kaggle竞赛案例实战
plt.title('Fare >distribution')
plt.xlabel('Fare')
plt.ylabel('Count of Passengers')
#如果变量是categorical的,想看distribution,则可以:
df.PdDistrict.value_counts().plot(kind='bar', figsize=(8,10))如果想看几个feature之间的联立情况,则可以用pandas的groupby,
temp = pd.crosstab([df.Pclass, df.Sex], df.Survived.astype(bool))
temp.plot(kind='bar', stacked=True, color=['red','bl