title: How to export large number of rows from InfluxDB to CSV using python client?
body: <p>I am trying to export a large number of rows (160.000.000+) from influxDB to a csv file. So far i am just blowing up the memory on the machine that runs the query. I am lost on how i could export this amount of rows without blowing the memory of the machine that runs the export. Any thoughts on this?? I have also tried the CLI without any luck.</p>
  
  <p>I have tried the following code..</p>
  
  <pre><code>def export_to_csv_file(self, file_name, header, query):
      logger.info("Executing query {}".format(query))
      dfs = pd.DataFrame(self.client.query(query, chunked=True, chunk_size=10000).get_points())
      dfs.to_csv('dummy.txt', index=False, columns=header, encoding='utf-8')
  </code></pre>
  
  <p>Any hints or tips on how i could export the data successfull.</p>