rows
rows copied to clipboard
Preserve original headers when re-exporting
I currently have the following workflow:
- import csv
- transform it
- re-export it back to csv
However, I noticed all headers are now using snake_case, which is clearly something that rows does in order to allow one to manipulate the rows (also, rows are represented as namedtuples).
Is there a way to preserve the original headers when re-exporting? Does the Table object store that data somehow?
Just checked its source code.
So it neither stores the original headers nor uses them on exporting.
Exporting uses slugs only, as I can see on rows/plugins/utils.py
's prepare_to_export
function.
Thoughts here?