正在从 URL 加载 pandas 数据帧

Loading pandas dataframe from a URL

我试图从 URL

加载数据框
url = 'https://ncdc.herokuapp.com/ncdc-covid-data/epicurve-by-date?state=akwa%20ibom'

df = pd.read_csv(url)

所以我得到的不是多行数据框,而是一堆列。任何帮助将不胜感激。

import pandas as pd

url = 'https://ncdc.herokuapp.com/ncdc-covid-data/epicurve-by-date?state=akwa%20ibom'

data = pd.json_normalize(pd.read_json(url)['data'])

# display(data.head())
          _id  total_confirmed_cases  total_discharged  total_deaths  total_active_cases  new_confirmed_cases  new_discharged  new_deaths
0  2020-06-29                     86                54             2                  30                  0.0             0.0         0.0
1  2020-06-28                     86                54             2                  30                  3.0            11.0         0.0
2  2020-06-27                     83                43             2                  38                  0.0             0.0         0.0
3  2020-06-26                     83                43             2                  38                  0.0             0.0         0.0
4  2020-06-25                     83                43             2                  38                  0.0             0.0         0.0