commercetest / nlnet

Analysis of the opensource codebases of NLnet sponsored projects.
MIT License
0 stars 0 forks source link

Stop the creation of index columns in the CSV files. #22

Closed julianharty closed 5 months ago

julianharty commented 5 months ago

Context

When pandas dataframes are saved as csv files the default behaviour adds an index column as the first column. While this is fairly benign the project was inadvertently creating several index columns in files and none are needed.

Let's remove the creation of index columns to keep the signal-to-noise ratio higher and the files smaller.

julianharty commented 5 months ago

I'd forgotten to refer to the SO Q&A on this topic https://stackoverflow.com/questions/20845213/how-to-avoid-pandas-creating-an-index-in-a-saved-csv there are several approaches that might be useful in future when using indexes.