We should avoid writing the index (row numbers) when creating the ticket files. The row numbers aren't helpful, and make the file more difficult to maintain and consume.
This can be done by providing index=False to the invocations of to_csv here:
|
def save(self, df: pd.DataFrame, change_df: pd.DataFrame) -> None: |
|
''' |
|
Saves data to file as CSVs. |
|
''' |
|
filename = f'{self.year}/{self.state}__{self.year}__tickets.csv' |
|
df.to_csv(filename) |
|
change_df.to_csv(f'{self.year}/{self.state}__{self.year}__ticket__changes.csv') |
There is a brief discussion about this in pull request #28.
We should avoid writing the index (row numbers) when creating the ticket files. The row numbers aren't helpful, and make the file more difficult to maintain and consume.
This can be done by providing
index=Falseto the invocations ofto_csvhere:openelections-data-sd/scripts/tickets.py
Lines 279 to 285 in e0b7b0b
There is a brief discussion about this in pull request #28.