title: Python - Trouble printing to CSV
body: <p>My code seems to be outputting the list I want, however, when I try printing the list to CSV I do not get the same result on the .csv file for some reason. I am sure there's something not right at the end of my code. Could anyone please shed some light? Thanks in advance.</p>
  <pre><code>import pandas as pd
  df = pd.read_csv('microRuleSet-row.csv')
  deduplicated_list = list()
  for index, row in df.iterrows():
      for item in row:
          if item not in deduplicated_list:
              deduplicated_list.append(item)
      print(deduplicated_list)
  df.to_csv('microRuleSet-row-noDupes.csv', index=False)
  </code></pre>