How to split data into train data and test data
-
First we divide data into two new dataframe a) X - It denotes dataframe with independent variable. b) y - It denotes dataframe with dependent variable.
-
Now we divide data into train dataset and test dataset with the help of sklearn.model_selection liberary.