This commit is contained in:
2024-10-13 21:47:23 +02:00
parent 5d1ec4f974
commit 084b66fe0e
5 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import requests
import json
import pandas as pd
api_url = "https://overfast-api.tekrop.fr/heroes"
response = requests.get(api_url)
json_data = response.json()
with open('heroes.json', 'w') as outfile: json.dump(json_data, outfile)
df = pd.read_json(json.dumps(json_data))
csv_data = df.to_csv('csv_data.csv')