pydata/pandas — pull request #7147 by michaelaye (2014-05-17 01:12:58+00:00)
Title: improving df.to_csv performance

This is a WIP and discuss PR :construction:
Adding small Writer class to have short-lived self.writer in CSVFomatter just for the header line. It is closed after the header was written.
Adding new lib.pyx function write_csv_rows_fast that manages file open/close on its own with self.path_or_buf from CSVFormmatter.
Current speed-up is factor 2.5 compared to before. Possibly the fprintf for each item is inefficient, but I thought as fprintf is buffered (in contrast to write) it can't be too bad. Any suggestions what I'm doing horribly wrong?