title: WRITE only first N rows from pandas df to csv
body: <p>How can I write only first N rows or from P to Q rows to csv from pandas dataframe without subseting the df first? I cannot subset the data I want to export because of memory issues.</p>
  
  <p>I am thinking of a function which writes to csv row by row.</p>
  
  <p>Thank you</p>