Skip to content

Commit

Permalink
write json
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsuss committed Oct 6, 2024
1 parent 6e1db35 commit 6150dab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

6 changes: 5 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
#write_data(abspath("./data/superforecasts.csv"), data)

# Step 1: Parse the JSON string to a Python object (list of dictionaries)
#json_data = json.loads(data)
json_data = json.loads(data)
df = pd.read_json(data)

# Store the JSON data in a file
with open(abspath("./data/tmp.json"), "w") as file:
json.dump(json_data, file)

# Step 2: Convert the parsed JSON into a Pandas DataFrame
#df = pd.DataFrame(json_data)

Expand Down

0 comments on commit 6150dab

Please sign in to comment.