title: How to export csv row into separate .txt file
body: <p>I have a .csv (export.csv) which contains almost 9k rows structured as follows:</p>
  
  <pre><code>|---------------------|------------------|---------------|
  |      Oggetto        |     valueID      | note          |
  |---------------------|------------------|---------------|
  |          1          |      work1       |DescrizioneA   |
  |---------------------|------------------|---------------|
  |          2          |      work2       |DescrizioneB   |
  |---------------------|------------------|---------------|
  |          3          |      work3       |DescrizioneC   |
  |---------------------|------------------|---------------|
  </code></pre>
  
  <p>I would export the rows from the column "note" in a separate .txt file and then name the file as the value from the column "valueID" i.e work1.txt (Content of the work1.txt file "DescrizioneA").
  Starting from <a href="https://stackoverflow.com/questions/32087088/how-to-extract-data-from-rows-in-csv-file-into-separate-txt-files-using-python">this</a> similar issue I tried, failing, like so:</p>
  
  <pre class="lang-py prettyprint-override"><code>import csv
  
  with open('export.csv', 'r') as file:
      data = file.read().split('\n')
  
  for row in range(1, len(data)):
      third_col= data
      with open('t' +  '.txt', 'w') as output:
          output.write(third_col[2])
  </code></pre>
  
  <p>I tried then with Pandas</p>
  
  <pre class="lang-py prettyprint-override"><code>
  import pandas as pd 
  
  data = pd.read_csv("export.csv", engine ='python')
  
  d = data
  file = 'file{}.txt'
  
  n = 0 # to number the files
  for row in d.iterrows():
      with open(file.format(n), 'w') as f:
          f.write(str(row))
          n += 1
  </code></pre>
  
  <p>I'm getting something but:</p>
  
  <ol>
  <li>The filename of each is progressive according to the number of the file from 1 to 9000 ex. file0001.txt</li>
  <li>The content of the .txt comprises all the 3 columns plus the content of the column "note" it's partial ex: "La cornice architettonica superiore del capite..." </li>
  </ol>
  
  <p>Any idea?</p>
  
  <p>Thanks </p>