How do I split a Dataset with only train to train/test?

I’m sure I’m missing something obvious

DatasetDict({
    train: Dataset({
        features: ['label', 'tweet'],
        num_rows: 31962
    })
})

how do I split this train only dataset to 90% train, and 10% test?

@barlen dataset_split = dataset['train'].train_test_split(test_size=0.1)

1 Like