Train Data and Test Data

Dear Concern,
In assignment 2 Machine Learning Bootcamp, both train data and test data are given seperately. In test data set target variable has been provided. I learnt that one data frame is splittd into train data and test data. But in the assignment 2 data sets are given. How can I do create test data for target variable.

If I do one hot encoding for target variable, I got three coulmns, TaxpayerParty_Democrat, PoliticalParty_Independent PoliticalParty_Republican. Then how can I seperate the input data and target data ( I need to know the code). If so how can I again transform the one hot coding to categorical data. @Chanukya Patnaik (Coach)