title: How to create a bag of words from csv file in python?
body: <p>I am new to python. I have a csv file which has cleaned tweets. I want to create a bag of words of these tweets.
  I have the following code but its not working correctly.</p>
  
  <pre><code>import pandas as pd
  from sklearn import svm
  from sklearn.feature_extraction.text import CountVectorizer
  
  data = pd.read_csv(open("Twidb11.csv"), sep=' ')
  count_vect = CountVectorizer()
  X_train_counts = count_vect.fit_transform(data.Text)
  count_vect.vocabulary_
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>.ParserError: Error tokenizing data. C error: Expected 19 fields in
    line 5, saw 22</p>
  </blockquote>