Income Group not present in test.csv


Income group column is not present in test.csv.
So during variable transformation of test data types to combine the data and during data preprocessing in predicitve modelling stage I am struck with error as “KeyError:Income Group”

Please guide me


Hi @jayashrees,

The Income Group column is not present in test dataset because its the target variable, the variable to be predicted by the model.

Make sure you don’t use this column as a feature for training, put it as the target.



Hi @jalFaizy,
Thanks for the reply.I have a doubt.Can i add Income Group as header in test dataset.This will be a dependent variable in test dataset too right?



You can add the dependent variable in test dataset too, but that will be after your model has predicted what values should be there for the given row.

So that would be the output of the trained model.


Yeah got the point.Thanks for the reply