Hugging Face · Datasets

Make a train and test split

Hold out 10% of the rows for testing.

splits = ds.train_test_split(test_size=0.1, seed=42)

Official Hugging Face documentation

More datasets commands

All datasets commands · Hugging Face cheatsheet

Was this page helpful?