Jan-03-2018, 09:10 AM
Quote:As far as I know you cannot go back to the beginning of a file with the csv packageCorrect, you can use
It's a file, so you should be able to use seek command to position to beginning.
file.seek(0)
to position yourself at the beginning of a file but it is not part of the csv package. Furthermore, the OP doesn't want to read from the beginning of the file but to write a longer header and definitively the csv package is not meant for that.