title: CSV copy with pandas
body: <p>I know this topic has been extensively treated, but I'm not able to get what I want, sorry about the probably newbie question. So the thing is I have a CSV like this:</p>
  
  <pre><code>Date,"Tmax","Tmin","Tmedia","Rachas","Vmax","LT","L1","L2","L3","L4"
  23 nov 2018,"14.0 (15:30)","7.3 (23:59)","10.7","12 (14:50)","5 (14:50)","2.0","1.6","0.4","0.0","0.0"
  </code></pre>
  
  <p>I am getting a new CSV like that one each day, with multiple rows, but I'm interested <strong>only</strong> in the first row after the header. What I want to do is copying that first row each day to a new CSV iteratively, so at the end of the week, that CSV should have seven rows. Additionally, I'd like to check if that date is already in that daily file. The thing is that I'm not getting the new CSV right, here's my try:</p>
  
  <pre><code>import pandas as pd
  
  df = pd.read_csv('file.csv', skiprows=4, header=None)
  writer=df[df.index.isin([0])].to_csv('output.csv',header=None)
  </code></pre>
  
  <p>The problem with this code is that it overwrites the file <em>output.csv</em> each time. Then I considered changing it to:</p>
  
  <pre><code>writer=df[df.index.isin([0])]
  pd.read_csv('output.csv').append(writer).to_csv('output.csv',header=None)
  </code></pre>
  
  <p>The problem now is that it does need the file to previously exist; and even so, the information is not correctly copied to the new file. I think it must be simpler than this, but I'm stuck. Thanks for your help.</p>