Repository navigation
What is the easiest way to load a dataset with Hugging Face Datasets? #8747
|
Hi everyone! I'm new to the Hugging Face Datasets library. |
Answered by
sulcer
Oct 5, 2026
Replies: 1 comment
|
Install the library with from datasets import load_dataset
ds = load_dataset(
"cornell-movie-review-data/rotten_tomatoes",
split="train",
)
print(ds[0])The first argument is the dataset’s Hub ID. Omit |
0 replies
Answer selected by
Advait251206
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install the library with
pip install datasets, then try this example from the official loading tutorial:The first argument is the dataset’s Hub ID.
split="train"loads its training set, andds[0]returns the first example.Omit
splitto load all available splits into aDatasetDict, then access one withds["train"].