title: python read bigger csv line by line
body: <p>Hello i have huge csv file (1GB) that can be updated (server often add new value)</p>
  
  <p>I want in python read this file line by line (not load all file in memory) and i want to read this in "real time"</p>
  
  <p>this is example of my csv file :</p>
  
  <pre><code>id,name,lastname
  1,toto,bob
  2,tutu,jordan
  3,titi,henri
  </code></pre>
  
  <p>in first time i want to get the header of file (columns name) in my example i want get this : id,name,lastname</p>
  
  <p>and in second time, i want read this file line by line not load all file in memory</p>
  
  <p>and in third time i want to try to read new value between 10 seconds (with sleep(10) for example)</p>
  
  <p>i search actualy solution with use pandas
  i read this topic :
  <a href="https://stackoverflow.com/questions/17444679/reading-a-huge-csv-file">Reading a huge .csv file</a></p>
  
  <pre><code>import pandas as pd
  chunksize = 10 ** 8
  for chunk in pd.read_csv(filename, chunksize=chunksize):
      process(chunk)
  </code></pre>
  
  <p>but i don't unterstand,
  1) i don't know size of my csv file, how define chunksize ?
  2) when i finish read, how says to pandas to try to read new value between 10 seconds (for example) ?</p>
  
  <p>thanks for advance for your help</p>