Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid writing row numbers when creating ticket files #48

Open
warwickmm opened this issue Jun 24, 2021 · 0 comments
Open

Avoid writing row numbers when creating ticket files #48

warwickmm opened this issue Jun 24, 2021 · 0 comments

Comments

@warwickmm
Copy link
Member

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')

This is related to openelections/openelections-data-sd#31.

warwickmm added a commit to warwickmm/openelections-data-wv that referenced this issue Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant