title: Top row of Dataframe got printed over and over again in Python
body: <p>I'm using a large database as input. I've tried two different methods but both got me the same result with the top row printed for every loop.</p>
  <p>I'm not sure what I did wrong here. Any help would be much appreciated.</p>
  <p>My code</p>
  <pre><code>def cal_score(search_word):
      for file in files:
        with open(catcal_dir + file, &quot;r&quot;) as infile:
          content = json.load(infile)
          if word in content[&quot;Convo&quot;]:
            convo_content = content[&quot;Convo&quot;]
  
            vectorizer = TfidfVectorizer(stop_words = {'english'}, ngram_range=(1,3), lowercase=True)
            tfidf_print = vectorizer.fit_transform([convo_content])
            feature_names = vectorizer.get_feature_names()
            feature_index = tfidf_print[0,:].nonzero()[1]
            tfidf_scores = zip(feature_index, [tfidf_print[0, x] for x in feature_index])
  
            data = {}
            for word, score in [(feature_names[i], score) for (i, score) in tfidf_scores]:
              if search_word == word:
                data['Score'] = score
                data['Date'] = content['Date']
                data['Term'] = word
  
            df = pd.DataFrame(data, columns = ['Date', 'Score', 'Term'], index=[0])
            print(df)
  
  print(cal_score('nekko'))
  </code></pre>
  <p>Output I got</p>
  <pre><code>           Date     Score       Term
  0  May 16, 1797  0.002463  nekko
               Date     Score       Term
  0  March 04, 1809  0.005918  nekko
              Date     Score       Term
  0  July 09, 1812  0.019306  nekko
               Date     Score       Term
  0  March 04, 1813  0.006175  nekko
              Date     Score       Term
  0  July 23, 1813  0.008521  nekko
  </code></pre>
  <p>The output I want</p>
  <pre><code>           Date     Score       Term
  0  May 16, 1797  0.002463  nekko
  1  March 04, 1809  0.005918  nekko
  2 July 09, 1812  0.019306  nekko
  3  March 04, 1813  0.006175  nekko
  4  July 23, 1813  0.008521  nekko
  </code></pre>
  <p>Thank you.</p>