import pandas as pd
cases_url = 'https://api.vitaldb.net/cases'
df = pd.read_csv(cases_url, na_values='-nan(ind)')
cases = df.to_dict(orient='record')
for case in cases:
print(case)
df.to_excel('cases.xlsx')
trks_list_url = 'https://api.vitaldb.net/trks'
df = pd.read_csv(trks_list_url, na_values='-nan(ind)')
df.to_excel('trks.xlsx')
trks_list = df.to_dict(orient='record')
for trk in trks_list:
trk_url = 'https://api.vitaldb.net/' + trk['tid']
df = pd.read_csv(trk_url, na_values='-nan(ind)')
trk_data = df.to_dict(orient='record')
print(trk_data)