There is a dataset of about 6,000,000 rows. I use the below codes to split the dataset into train set and test set:
from sklearn.model_selection import train_test_split
train, test = train_test_split(df, test_size=0.3, random_state=42)
What I would like to have is to split the test set exactly on certain number of rows, for example 50,000 rows for the test set.
What is the way to get this?