Created
October 19, 2021 17:58
-
-
Save CLozy/4ae7c9d6f517de7adec49e052512bb21 to your computer and use it in GitHub Desktop.
spilliting dataset to train and test set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#splitting the dataset.csv file into train , test splits and saving them as csv files | |
from sklearn.model_selection import train_test_split | |
dataset_df = pd.read_csv(r'/content/gdrive/My Drive/Malaria/dataset.csv') | |
train,test = train_test_split(dataset_df, test_size=0.1) | |
train.to_csv(r'gdrive/My Drive/Malaria/train.csv', index=False) | |
test.to_csv(r'gdrive/My Drive/Malaria/test.csv', index=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment