Spaces:
Sleeping
Sleeping
Tom Aarsen
commited on
Commit
•
9e998d9
1
Parent(s):
c06af88
Don't always reset index; would create "level_0" column
Browse files- refresh.py +2 -1
refresh.py
CHANGED
@@ -659,7 +659,8 @@ def write_out_results(item: dict, item_name: str) -> None:
|
|
659 |
print(f"Saving {main_folder} to {main_folder}/default.jsonl")
|
660 |
os.makedirs(main_folder, exist_ok=True)
|
661 |
|
662 |
-
item.
|
|
|
663 |
item.to_json(f"{main_folder}/default.jsonl", orient="records", lines=True)
|
664 |
|
665 |
elif isinstance(item, str):
|
|
|
659 |
print(f"Saving {main_folder} to {main_folder}/default.jsonl")
|
660 |
os.makedirs(main_folder, exist_ok=True)
|
661 |
|
662 |
+
if "index" not in item.columns:
|
663 |
+
item.reset_index(inplace=True)
|
664 |
item.to_json(f"{main_folder}/default.jsonl", orient="records", lines=True)
|
665 |
|
666 |
elif isinstance(item, str):
|