Skip to content

Commit

Permalink
exclude dataframe index from CSV output; add QUOTE_NONNUMERIC
Browse files Browse the repository at this point in the history
  • Loading branch information
pcoccoli committed Jul 13, 2023
1 parent fe67e26 commit 27b8bda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/kestrel/codegen/data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import csv
import json
import pathlib
import uuid
Expand Down Expand Up @@ -55,7 +56,7 @@ def dump_data_to_file(store, input_entity_table, file_path):
df = pd.DataFrame(input_data)
dump_format = _get_dump_format(p)
if dump_format == "csv":
df.to_csv(file_path)
df.to_csv(file_path, index=False, quoting=csv.QUOTE_NONNUMERIC)
elif dump_format == "parquet":
df.to_parquet(file_path)
elif dump_format == "json":
Expand Down

0 comments on commit 27b8bda

Please sign in to comment.