ImperialCollegeLondon / pycsvy

Python reader/writer for CSV files with YAML header information
BSD 3-Clause "New" or "Revised" License
6 stars 7 forks source link

Write header and data using same file object #28

Open alexdewar opened 1 year ago

alexdewar commented 1 year ago

Currently a call to write() entails the following:

It'd be cleaner to just open the file once and pass this file object to the various write*() functions. This will bring a (likely minuscule) performance benefit, but the main reason to do it is just to make the code clearer.