1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Preprocessing for Machine Learning in Python

Connected

अभ्यास

Vectorizing text

You'll now transform the volunteer dataset's title column into a text vector, which you'll use in a prediction task in the next exercise.

निर्देश

100 XP
  • Store the volunteer["title"] column in a variable named title_text.
  • Instantiate a TfidfVectorizer as tfidf_vec.
  • Transform the text in title_text into a tf-idf vector using tfidf_vec.