turicas / rows

A common, beautiful interface to tabular data, no matter the format
GNU Lesser General Public License v3.0
865 stars 136 forks source link

Preserve original headers when re-exporting #330

Open viniciusd opened 5 years ago

viniciusd commented 5 years ago

I currently have the following workflow:

  1. import csv
  2. transform it
  3. 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?

viniciusd commented 5 years ago

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?