KeyError in Big Mart Sales Problem

big_mart_sales

#21

Yes, this method does not give the KeyError but if you notice the total number of null values after the imputing step, it still says there are null values (4 null values remaining in my case)


#22

Got the reason why it is working for only few of us. Those who have skipped merging of train and test data are likely to get this error. Please perform that step as the author is suggesting that it is a good idea to combine both the datasets while doing the feature engineering.
Please execute the below step and it will start working
train[‘source’]=‘train’
test[‘source’]=‘test’
data = pd.concat([train, test],ignore_index=True)
print train.shape, test.shape, data.shape


#23

if you have find the solution of above error then help me because i have same issue.