用python参加Kaggle的些许经验总结
用python在kaggle上试了几个project,有点体会,记录下。 Step1: Exploratory Data Analysis EDA,也就是对数据进行探索性的分析,一般就用到pandas和matplotlib就够了。EDA一般包括: 每个feature的意义,feature的类型,比较有用的代码如下 df.describe() df['Category'].unique() 看是否存在missing value df.loc[df.Dates.isnull(),'Dates'] 每个特征下的数据分布,可以用boxplot或者hist来看 %matplotlib inline import matplotlib.pyplot as plt df.boxplot(column='Fare', by = 'Pclass') plt.hist(df['Fare'], bins = 10, range =(df['Fare'].min(),df['Fare'].max())) plt.title('Fare >distribution') plt.xlabel('Fare')...