Course Content
Data Preprocessing
Data Preprocessing
2. Processing Quantitative Data
3. Processing Categorical Data
4. Time Series Data Processing
6. Moving on to Tasks
Challenge 2
Task
Swipe to show code editor
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.
- Create a
CountVectorizer
object to tokenize text - Fit data to the tokenizer
- Print the vocabulary of the tokenizer
- Encode
'Text'
column - Print the results
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 6. Chapter 2
Challenge 2
Task
Swipe to show code editor
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.
- Create a
CountVectorizer
object to tokenize text - Fit data to the tokenizer
- Print the vocabulary of the tokenizer
- Encode
'Text'
column - Print the results
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 6. Chapter 2
Switch to desktop for real-world practiceContinue from where you are using one of the options below