我试图得到一个特定区域下每个地方的平均“活跃”值。因此,假设输出是("Andaman and Nicobar Islands":10,"Andhra Pradesh":12),然而,我得到的类型错误字符串索引必须是“r[v”recovered“].append(v”已故“)中的整数。parse the data
response_API = requests.get("https://data.covid19india.org/
我使用距离矩阵API来获得在两点之间旅行所需的时间,但我在调用get请求列表中的.json函数时遇到了问题。#creates url for API call to get travel time between two cities (my list includes 7 origin and destinationr = [requests.get(url) for url in full_url]
#calls .json on each ge