Train test split

I have a csv file on which I want to perform some operation .I hgave read the file using pandas in jupyter notebook.Now how to use it in Dataloader for pytorch and then perform train test split.
The csv file has two columns.

Please mention the code for it.

I would recommend to write a custom Dataset as explained in this tutorial or alternatively, get the data of your pandas DataFrame as numpy arrays, transform them to tensors via torch.from_numpy() and use a TensorDataset.

Once you’ve created a dataset, you can use to create different splits.