text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df = pd.read_csv('../input/bluebook-for-bulldozers/TrainAndValid.csv')

df = pd.read_csv('../input/bluebook-for-bulldozers/TrainAndValid.csv', low_memory=False, parse_dates=['saledate'])

df.sort_values(by=['saledate'], inplace=True, ascending=True)

df_tmp = df.copy()

df_tmp['saleYear'] = df_tmp.saledate.dt.year
df_tmp['saleMonth'] = df_tmp.saledate.dt.month
df_tmp['saleDay'] = df_tmp.saledate.dt.day
df_tmp['saleDayofweek'] = df_tmp.saledate.dt.dayofweek
df_tmp['saleDayofyear'] = df_tmp.saledate.dt.dayofyear
df_tmp.drop('saledate', axis=1, inplace=True)

df_tmp.state.value_counts()

df_tmp.isnull().sum()

pd.api.types.is_string_dtype(df_tmp['UsageBand'])