Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge 2 | Moving on to Tasks
course content

Course Content

Data Preprocessing

Challenge 2Challenge 2

Task

So, now let's remember what we do with text data. You will be working with the 'reviews.csv' dataset, and your task will be to encode text data using the bag of words method.

  1. Create a CountVectorizer object to tokenize text
  2. Fit data to the tokenizer
  3. Print the vocabulary of the tokenizer
  4. Encode 'Text' column
  5. Print the results

Everything was clear?

Section 6. Chapter 2
toggle bottom row
course content

Course Content

Data Preprocessing

Challenge 2Challenge 2

Task

So, now let's remember what we do with text data. You will be working with the 'reviews.csv' dataset, and your task will be to encode text data using the bag of words method.

  1. Create a CountVectorizer object to tokenize text
  2. Fit data to the tokenizer
  3. Print the vocabulary of the tokenizer
  4. Encode 'Text' column
  5. Print the results

Everything was clear?

Section 6. Chapter 2
toggle bottom row
some-alt