How to combine and separate test and train data for data cleaning?
I am working on an ML model in which I have been provided the data in 2 files test.csv
and train.csv
. I want to perform data cleaning on both files together be concatenating them and then separating them.
I know how to concatenate 2 dataframes, but after data cleaning how will I separate the two files? Please help me complete the code.
CODE
test = pd.read_csv('test.csv')
train = pd.read_csv('train.csv')
df = pd.concat([test, train])
//Data Cleaning steps
//Separating them back to train and test set for providing input to model
Topic dataframe python-3.x pandas dataset python
Category Data Science