How to Manipulate a Dataset

I have a raw dataset of Images I got from Kaggle, It has been classified already, but I want to randomly split the information in a 80:20 ratio between train and test, problem is since all information is classified, I'd love to keep that folder classification in my new train set while all is mixed in the test folder. I cant do it myself since I want it to be randomly split, how do I do this?

From this dataset, you should prepare new variables namely, X and y; where X = feature matrix and y = class variable. Now, use the following code to split the data into train and test dataset of desired proportion -
from sklearn.model_selection import train_test_split

The test_size helps you prepare a train-test split of 80:20; and
the random_state is the seed value for randomisation.