1. Learn
  2. /
  3. Courses
  4. /
  5. Working with Hugging Face

Connected

Exercise

Manipulating datasets

There will likely be many occasions when you will need to manipulate a dataset before using it within a ML task. Two common manipulations are filtering and selecting (or slicing). Given the size of these datasets, Hugging Face leverages arrow file types.

This means performing manipulations are slightly different than what you might be used to. Fortunately, there's already methods to help with this!

The dataset is already loaded for you under wikipedia.

Instructions 1/2

undefined XP
    1
    2
  • Filter the dataset for rows with the term "football" in the text column and save as filtered.
  • Select a single example from the filtered dataset and save as example.