Exercise

Creating a Dask bag

You have been tasked with analyzing some reviews left on TripAdvisor. Your colleague has provided the reviews as a list of strings. You want to use Dask to speed up your analysis of the data, so to start with, you need to load the data into a Dask bag.

Instructions

100 XP
  • Import the dask.bag subpackage as db.
  • Use the from_sequence() function to convert reviews_list into a Dask bag with 3 partitions.
  • Use the bag's .take() method to print a single element from the Dask bag.