title: tf-idf for text cluster-analysis
body: <p>I would like to group small texts included in a column, <code>df['Texts']</code>, from a dataframe. 
  An example of sentences to analyse are as follows: </p>
  
  <pre><code>    Texts
  
    1 Donald Trump, Donald Trump news, Trump bleach, Trump injected bleach, bleach coronavirus.
    2 Thank you Janey.......laughing so much at this........you have saved my sanity in these mad times. Only bleach Trump is using is on his heed 
    3 His more uncharitable critics said Trump had suggested that Americans drink bleach. Trump responded that he was being sarcastic.
    4 Outcry after Trump suggests injecting disinfectant as treatment.
    5 Trump Suggested 'Injecting' Disinfectant to Cure Coronavirus?
    6 The study also showed that bleach and isopropyl alcohol killed the virus in saliva or respiratory fluids in a matter of minutes.
  </code></pre>
  
  <p>Since I know that TF-IDF is useful for clustering, I have been using the following lines of code (by following some previous questions in the community):</p>
  
  <pre><code>from sklearn.feature_extraction.text import TfidfVectorizer
  from sklearn.cluster import KMeans
  import re
  import string
  
  def preprocessing(line):
      line = line.lower()
      line = re.sub(r"[{}]".format(string.punctuation), " ", line)
      return line
  
  tfidf_vectorizer = TfidfVectorizer(preprocessor=preprocessing)
  tfidf = tfidf_vectorizer.fit_transform(all_text)
  
  kmeans = KMeans(n_clusters=2).fit(tfidf) # the number of clusters could be manually changed
  </code></pre>
  
  <p>However, since I am considering a column from a dataframe, I do not know how to apply the above function. 
  Could you help me with it?</p>