Me conecto a la API https://api.covid19api.com/
!pip install pandas
Requirement already satisfied: pandas in c:\users\lenovo e570\anaconda3\lib\site-packages (1.4.2)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\lenovo e570\anaconda3\lib\site-packages (from pandas) (2.8.2)
Requirement already satisfied: numpy>=1.18.5 in c:\users\lenovo e570\anaconda3\lib\site-packages (from pandas) (1.21.5)
Requirement already satisfied: pytz>=2020.1 in c:\users\lenovo e570\anaconda3\lib\site-packages (from pandas) (2021.3)
Requirement already satisfied: six>=1.5 in c:\users\lenovo e570\anaconda3\lib\site-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)
Luego de instaladas las librerías de Pandas, colocamos import
para tener el acceso y luego importarlo como un pd.
import pandas as pd
Se utilizó url para hacer el vículo con la dirección del sitio web de donde se obtendrían los datos. Comprobamos que con introducir url la variable está relacionada automáticamente con esta dirección de la API. A través del siguiente código se le hace una petición de información a la API y el resultado se guarda en una variable. En esta caso particular, lo observamos en un modelo de cuadro.
Este paso se muestra a continuación:
url = "https://api.covid19api.com/countries"
url
'https://api.covid19api.com/countries'
Como el API tiene la información en un lista de datos JSON, creamos un Data Frame df, el cual se trata de una estructuras de lista de datos de Python, compuesto por la función de Pandas que permite leer el formato JSON.
df = pd.read_json(url)
Nos aparecen los datos JSON en forma de tabla, luego de comprobarlo al invocarlo con df
df
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | Slug | ISO2 | |
---|---|---|---|
0 | Gibraltar | gibraltar | GI |
1 | Oman | oman | OM |
2 | France | france | FR |
3 | Jersey | jersey | JE |
4 | Mali | mali | ML |
... | ... | ... | ... |
243 | Puerto Rico | puerto-rico | PR |
244 | Papua New Guinea | papua-new-guinea | PG |
245 | Saint Pierre and Miquelon | saint-pierre-and-miquelon | PM |
246 | Timor-Leste | timor-leste | TL |
247 | Montenegro | montenegro | ME |
248 rows × 3 columns
Se puede hacer un filtro de la fila requerida a través del siguiente código:
df[df["Country"] == "Spain"]
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | Slug | ISO2 | |
---|---|---|---|
141 | Spain | spain | ES |
Como se observa, se utilizó ese código para obtener los datos relacionados con España.
La primera prueba fue la extracción de los datos de covid19 en tiempo real para España. Con la librería Pandas, se llama a la funcion read_json()
, que devuelve los datos de la consulta.
url_rt_es = "https://api.covid19api.com/country/spain/status/confirmed/live"
df_rt_es = pd.read_json(url_rt_es)
df_rt_es
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | CountryCode | Province | City | CityCode | Lat | Lon | Cases | Status | Date | |
---|---|---|---|---|---|---|---|---|---|---|
0 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-22 00:00:00+00:00 | |||
1 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-23 00:00:00+00:00 | |||
2 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-24 00:00:00+00:00 | |||
3 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-25 00:00:00+00:00 | |||
4 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-26 00:00:00+00:00 | |||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
894 | Spain | ES | 40.46 | -3.75 | 12818184 | confirmed | 2022-07-04 00:00:00+00:00 | |||
895 | Spain | ES | 40.46 | -3.75 | 12890002 | confirmed | 2022-07-05 00:00:00+00:00 | |||
896 | Spain | ES | 40.46 | -3.75 | 12890002 | confirmed | 2022-07-06 00:00:00+00:00 | |||
897 | Spain | ES | 40.46 | -3.75 | 12890002 | confirmed | 2022-07-07 00:00:00+00:00 | |||
898 | Spain | ES | 40.46 | -3.75 | 12973615 | confirmed | 2022-07-08 00:00:00+00:00 |
899 rows × 10 columns
Con el cógido df_rt_es.head()
se obtuvieron los datos de las cinco primeras líneas.
df_rt_es.head()
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | CountryCode | Province | City | CityCode | Lat | Lon | Cases | Status | Date | |
---|---|---|---|---|---|---|---|---|---|---|
0 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-22 00:00:00+00:00 | |||
1 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-23 00:00:00+00:00 | |||
2 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-24 00:00:00+00:00 | |||
3 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-25 00:00:00+00:00 | |||
4 | Spain | ES | 40.46 | -3.75 | 0 | confirmed | 2020-01-26 00:00:00+00:00 |
Mientras que con el código df_rt_es.tail()
se obtienen las últimas líneas.
df_rt_es.tail()
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | CountryCode | Province | City | CityCode | Lat | Lon | Cases | Status | Date | |
---|---|---|---|---|---|---|---|---|---|---|
894 | Spain | ES | 40.46 | -3.75 | 12818184 | confirmed | 2022-07-04 00:00:00+00:00 | |||
895 | Spain | ES | 40.46 | -3.75 | 12890002 | confirmed | 2022-07-05 00:00:00+00:00 | |||
896 | Spain | ES | 40.46 | -3.75 | 12890002 | confirmed | 2022-07-06 00:00:00+00:00 | |||
897 | Spain | ES | 40.46 | -3.75 | 12890002 | confirmed | 2022-07-07 00:00:00+00:00 | |||
898 | Spain | ES | 40.46 | -3.75 | 12973615 | confirmed | 2022-07-08 00:00:00+00:00 |
Ya tenemos un cuadro con las siguientes columnas: país, código de país, provincia, ciudad, código de ciudad, latitud, longitud, número de casos, estado y la fecha. Particularmente de esta información nos interesa el número de casos y la fecha. El procedimiento que debo ejecutar es transformar la columna de control. Para ello convierto la columna de fecha en columna de control pidiéndole ya que me muestre los casos España desde el 20 de enero de 2020 a la actualidad con la expresión df_rt_es.set_index('Date')['Cases'].plot(title="Casos de Covid-19 en España desde 20/01/2020 hasta 29/06/2022")
. Debo darle un nombre de variable.
casos_es = df_rt_es.set_index('Date')['Cases']
casos_es.plot(title="Casos de Covid-19 en España",kind = "area")
<AxesSubplot:title={'center':'Casos de Covid-19 en España'}, xlabel='Date'>
Para los datos de Panamá debemos repetir el proceso. Solo utilizo las letras de la nomenclatura para el país y coloco el nombre del país en la url que utilizo. Si agregamos ,kind="area"
al final se pondría el gráfico de área y con ,kind="bar"
el gráfico de barras.
df[df["Country"] == "Panama"]
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | Slug | ISO2 | |
---|---|---|---|
190 | Panama | panama | PA |
url_rt_pa = "https://api.covid19api.com/country/panama/status/confirmed/live"
df_rt_pa = pd.read_json(url_rt_pa)
df_rt_pa
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | CountryCode | Province | City | CityCode | Lat | Lon | Cases | Status | Date | |
---|---|---|---|---|---|---|---|---|---|---|
0 | Panama | PA | 8.54 | -80.78 | 0 | confirmed | 2020-01-22 00:00:00+00:00 | |||
1 | Panama | PA | 8.54 | -80.78 | 0 | confirmed | 2020-01-23 00:00:00+00:00 | |||
2 | Panama | PA | 8.54 | -80.78 | 0 | confirmed | 2020-01-24 00:00:00+00:00 | |||
3 | Panama | PA | 8.54 | -80.78 | 0 | confirmed | 2020-01-25 00:00:00+00:00 | |||
4 | Panama | PA | 8.54 | -80.78 | 0 | confirmed | 2020-01-26 00:00:00+00:00 | |||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
895 | Panama | PA | 8.54 | -80.78 | 925254 | confirmed | 2022-07-05 00:00:00+00:00 | |||
896 | Panama | PA | 8.54 | -80.78 | 925254 | confirmed | 2022-07-06 00:00:00+00:00 | |||
897 | Panama | PA | 8.54 | -80.78 | 925254 | confirmed | 2022-07-07 00:00:00+00:00 | |||
898 | Panama | PA | 8.54 | -80.78 | 932710 | confirmed | 2022-07-08 00:00:00+00:00 | |||
899 | Panama | PA | 8.54 | -80.78 | 925254 | confirmed | 2022-07-09 00:00:00+00:00 |
900 rows × 10 columns
casos_pa = df_rt_pa.set_index('Date')['Cases']
casos_pa.plot(title="Casos de Covid-19 en Panamá",kind = "area")
<AxesSubplot:title={'center':'Casos de Covid-19 en Panamá'}, xlabel='Date'>
Repetimos este procedimiento para todos los países, en este caso, de Centroamérica. Hay que hacer la salvedad que en cada código se deben cambiar la identificación de los datos que se quieren obtener.
df[df["Country"] == "Costa Rica"]
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | Slug | ISO2 | |
---|---|---|---|
242 | Costa Rica | costa-rica | CR |
url_rt_cr = "https://api.covid19api.com/country/costa-rica/status/confirmed/live"
df_rt_cr = pd.read_json(url_rt_cr)
df_rt_cr
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | CountryCode | Province | City | CityCode | Lat | Lon | Cases | Status | Date | |
---|---|---|---|---|---|---|---|---|---|---|
0 | Costa Rica | CR | 9.75 | -83.75 | 0 | confirmed | 2020-01-22 00:00:00+00:00 | |||
1 | Costa Rica | CR | 9.75 | -83.75 | 0 | confirmed | 2020-01-23 00:00:00+00:00 | |||
2 | Costa Rica | CR | 9.75 | -83.75 | 0 | confirmed | 2020-01-24 00:00:00+00:00 | |||
3 | Costa Rica | CR | 9.75 | -83.75 | 0 | confirmed | 2020-01-25 00:00:00+00:00 | |||
4 | Costa Rica | CR | 9.75 | -83.75 | 0 | confirmed | 2020-01-26 00:00:00+00:00 | |||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
895 | Costa Rica | CR | 9.75 | -83.75 | 904934 | confirmed | 2022-07-05 00:00:00+00:00 | |||
896 | Costa Rica | CR | 9.75 | -83.75 | 904934 | confirmed | 2022-07-06 00:00:00+00:00 | |||
897 | Costa Rica | CR | 9.75 | -83.75 | 904934 | confirmed | 2022-07-07 00:00:00+00:00 | |||
898 | Costa Rica | CR | 9.75 | -83.75 | 904934 | confirmed | 2022-07-08 00:00:00+00:00 | |||
899 | Costa Rica | CR | 9.75 | -83.75 | 904934 | confirmed | 2022-07-09 00:00:00+00:00 |
900 rows × 10 columns
casos_cr = df_rt_cr.set_index('Date')['Cases']
casos_cr.plot(title="Casos de Covid-19 en Costa Rica",kind = "area")
<AxesSubplot:title={'center':'Casos de Covid-19 en Costa Rica'}, xlabel='Date'>
df[df["Country"] == "Nicaragua"]
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | Slug | ISO2 | |
---|---|---|---|
36 | Nicaragua | nicaragua | NI |
url_rt_ni = "https://api.covid19api.com/country/nicaragua/status/confirmed/live"
df_rt_ni = pd.read_json(url_rt_ni)
df_rt_ni
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | CountryCode | Province | City | CityCode | Lat | Lon | Cases | Status | Date | |
---|---|---|---|---|---|---|---|---|---|---|
0 | Nicaragua | NI | 12.87 | -85.21 | 0 | confirmed | 2020-01-22 00:00:00+00:00 | |||
1 | Nicaragua | NI | 12.87 | -85.21 | 0 | confirmed | 2020-01-23 00:00:00+00:00 | |||
2 | Nicaragua | NI | 12.87 | -85.21 | 0 | confirmed | 2020-01-24 00:00:00+00:00 | |||
3 | Nicaragua | NI | 12.87 | -85.21 | 0 | confirmed | 2020-01-25 00:00:00+00:00 | |||
4 | Nicaragua | NI | 12.87 | -85.21 | 0 | confirmed | 2020-01-26 00:00:00+00:00 | |||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
895 | Nicaragua | NI | 12.87 | -85.21 | 14690 | confirmed | 2022-07-05 00:00:00+00:00 | |||
896 | Nicaragua | NI | 12.87 | -85.21 | 14721 | confirmed | 2022-07-06 00:00:00+00:00 | |||
897 | Nicaragua | NI | 12.87 | -85.21 | 14721 | confirmed | 2022-07-07 00:00:00+00:00 | |||
898 | Nicaragua | NI | 12.87 | -85.21 | 14721 | confirmed | 2022-07-08 00:00:00+00:00 | |||
899 | Nicaragua | NI | 12.87 | -85.21 | 14721 | confirmed | 2022-07-09 00:00:00+00:00 |
900 rows × 10 columns
casos_ni = df_rt_ni.set_index('Date')['Cases']
casos_ni.plot(title="Casos de Covid-19 en Nicaragua",kind = "area")
<AxesSubplot:title={'center':'Casos de Covid-19 en Nicaragua'}, xlabel='Date'>
df[df["Country"] == "El Salvador"]
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | Slug | ISO2 | |
---|---|---|---|
139 | El Salvador | el-salvador | SV |
url_rt_sv = "https://api.covid19api.com/country/el-salvador/status/confirmed/live"
df_rt_sv = pd.read_json(url_rt_sv)
df_rt_sv
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | CountryCode | Province | City | CityCode | Lat | Lon | Cases | Status | Date | |
---|---|---|---|---|---|---|---|---|---|---|
0 | El Salvador | SV | 13.79 | -88.9 | 0 | confirmed | 2020-01-22 00:00:00+00:00 | |||
1 | El Salvador | SV | 13.79 | -88.9 | 0 | confirmed | 2020-01-23 00:00:00+00:00 | |||
2 | El Salvador | SV | 13.79 | -88.9 | 0 | confirmed | 2020-01-24 00:00:00+00:00 | |||
3 | El Salvador | SV | 13.79 | -88.9 | 0 | confirmed | 2020-01-25 00:00:00+00:00 | |||
4 | El Salvador | SV | 13.79 | -88.9 | 0 | confirmed | 2020-01-26 00:00:00+00:00 | |||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
895 | El Salvador | SV | 13.79 | -88.9 | 169646 | confirmed | 2022-07-05 00:00:00+00:00 | |||
896 | El Salvador | SV | 13.79 | -88.9 | 169646 | confirmed | 2022-07-06 00:00:00+00:00 | |||
897 | El Salvador | SV | 13.79 | -88.9 | 169646 | confirmed | 2022-07-07 00:00:00+00:00 | |||
898 | El Salvador | SV | 13.79 | -88.9 | 180970 | confirmed | 2022-07-08 00:00:00+00:00 | |||
899 | El Salvador | SV | 13.79 | -88.9 | 169646 | confirmed | 2022-07-09 00:00:00+00:00 |
900 rows × 10 columns
casos_sv = df_rt_sv.set_index('Date')['Cases']
casos_sv.plot(title="Casos de Covid-19 en El Salvador",kind = "area")
<AxesSubplot:title={'center':'Casos de Covid-19 en El Salvador'}, xlabel='Date'>
df[df["Country"] == "Honduras"]
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | Slug | ISO2 | |
---|---|---|---|
91 | Honduras | honduras | HN |
url_rt_hn = "https://api.covid19api.com/country/honduras/status/confirmed/live"
df_rt_hn = pd.read_json(url_rt_hn)
df_rt_hn
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | CountryCode | Province | City | CityCode | Lat | Lon | Cases | Status | Date | |
---|---|---|---|---|---|---|---|---|---|---|
0 | Honduras | HN | 15.2 | -86.24 | 0 | confirmed | 2020-01-22 00:00:00+00:00 | |||
1 | Honduras | HN | 15.2 | -86.24 | 0 | confirmed | 2020-01-23 00:00:00+00:00 | |||
2 | Honduras | HN | 15.2 | -86.24 | 0 | confirmed | 2020-01-24 00:00:00+00:00 | |||
3 | Honduras | HN | 15.2 | -86.24 | 0 | confirmed | 2020-01-25 00:00:00+00:00 | |||
4 | Honduras | HN | 15.2 | -86.24 | 0 | confirmed | 2020-01-26 00:00:00+00:00 | |||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
895 | Honduras | HN | 15.2 | -86.24 | 427718 | confirmed | 2022-07-05 00:00:00+00:00 | |||
896 | Honduras | HN | 15.2 | -86.24 | 427718 | confirmed | 2022-07-06 00:00:00+00:00 | |||
897 | Honduras | HN | 15.2 | -86.24 | 427718 | confirmed | 2022-07-07 00:00:00+00:00 | |||
898 | Honduras | HN | 15.2 | -86.24 | 429408 | confirmed | 2022-07-08 00:00:00+00:00 | |||
899 | Honduras | HN | 15.2 | -86.24 | 429408 | confirmed | 2022-07-09 00:00:00+00:00 |
900 rows × 10 columns
casos_hn = df_rt_hn.set_index('Date')['Cases']
casos_hn.plot(title="Casos de Covid-19 en Honduras",kind = "area")
<AxesSubplot:title={'center':'Casos de Covid-19 en Honduras'}, xlabel='Date'>
df[df["Country"] == "Guatemala"]
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | Slug | ISO2 | |
---|---|---|---|
239 | Guatemala | guatemala | GT |
url_rt_gt = "https://api.covid19api.com/country/guatemala/status/confirmed/live"
df_rt_gt = pd.read_json(url_rt_gt)
df_rt_gt
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Country | CountryCode | Province | City | CityCode | Lat | Lon | Cases | Status | Date | |
---|---|---|---|---|---|---|---|---|---|---|
0 | Guatemala | GT | 15.78 | -90.23 | 0 | confirmed | 2020-01-22 00:00:00+00:00 | |||
1 | Guatemala | GT | 15.78 | -90.23 | 0 | confirmed | 2020-01-23 00:00:00+00:00 | |||
2 | Guatemala | GT | 15.78 | -90.23 | 0 | confirmed | 2020-01-24 00:00:00+00:00 | |||
3 | Guatemala | GT | 15.78 | -90.23 | 0 | confirmed | 2020-01-25 00:00:00+00:00 | |||
4 | Guatemala | GT | 15.78 | -90.23 | 0 | confirmed | 2020-01-26 00:00:00+00:00 | |||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
895 | Guatemala | GT | 15.78 | -90.23 | 922340 | confirmed | 2022-07-05 00:00:00+00:00 | |||
896 | Guatemala | GT | 15.78 | -90.23 | 927473 | confirmed | 2022-07-06 00:00:00+00:00 | |||
897 | Guatemala | GT | 15.78 | -90.23 | 933259 | confirmed | 2022-07-07 00:00:00+00:00 | |||
898 | Guatemala | GT | 15.78 | -90.23 | 939300 | confirmed | 2022-07-08 00:00:00+00:00 | |||
899 | Guatemala | GT | 15.78 | -90.23 | 939300 | confirmed | 2022-07-09 00:00:00+00:00 |
900 rows × 10 columns
casos_gt = df_rt_gt.set_index('Date')['Cases']
casos_gt.plot(title="Casos de Covid-19 en Guatemala",kind = "area")
<AxesSubplot:title={'center':'Casos de Covid-19 en Guatemala'}, xlabel='Date'>
Para plotear dos o más países hay que seguir los siguientes pasos:
Volvemos a identificar las variables previas de lectura de Json de las dos URLs para no tener que repetir el proceso desde arriba al cerrar el documento.
Al igual que antes, se añaden todos los casos de los distintos países en una misma tabla.
pd.concat([casos_pa,casos_cr,casos_ni,casos_hn,casos_sv,casos_gt],axis=1)
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Cases | Cases | Cases | Cases | Cases | Cases | |
---|---|---|---|---|---|---|
Date | ||||||
2020-01-22 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
2020-01-23 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
2020-01-24 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
2020-01-25 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
2020-01-26 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
... | ... | ... | ... | ... | ... | ... |
2022-07-05 00:00:00+00:00 | 925254 | 904934 | 14690 | 427718 | 169646 | 922340 |
2022-07-06 00:00:00+00:00 | 925254 | 904934 | 14721 | 427718 | 169646 | 927473 |
2022-07-07 00:00:00+00:00 | 925254 | 904934 | 14721 | 427718 | 169646 | 933259 |
2022-07-08 00:00:00+00:00 | 932710 | 904934 | 14721 | 429408 | 180970 | 939300 |
2022-07-09 00:00:00+00:00 | 925254 | 904934 | 14721 | 429408 | 169646 | 939300 |
900 rows × 6 columns
Luego se definen la columnas con el país al que le corresponden los datos.
casos_pa_cr_ni_gt_sv_hn = pd.concat([casos_pa,casos_cr,casos_ni,casos_gt,casos_sv,casos_hn],axis=1)
casos_pa_cr_ni_gt_sv_hn.columns= ['Panamá','Costa Rica', 'Nicaragua', 'Guatemala', 'El Salvador', 'Honduras']
casos_pa_cr_ni_gt_sv_hn
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
Panamá | Costa Rica | Nicaragua | Guatemala | El Salvador | Honduras | |
---|---|---|---|---|---|---|
Date | ||||||
2020-01-22 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
2020-01-23 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
2020-01-24 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
2020-01-25 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
2020-01-26 00:00:00+00:00 | 0 | 0 | 0 | 0 | 0 | 0 |
... | ... | ... | ... | ... | ... | ... |
2022-07-05 00:00:00+00:00 | 925254 | 904934 | 14690 | 922340 | 169646 | 427718 |
2022-07-06 00:00:00+00:00 | 925254 | 904934 | 14721 | 927473 | 169646 | 427718 |
2022-07-07 00:00:00+00:00 | 925254 | 904934 | 14721 | 933259 | 169646 | 427718 |
2022-07-08 00:00:00+00:00 | 932710 | 904934 | 14721 | 939300 | 180970 | 429408 |
2022-07-09 00:00:00+00:00 | 925254 | 904934 | 14721 | 939300 | 169646 | 429408 |
900 rows × 6 columns
Finalmente se muestra la tabla con las diferentes columnas. Aquí se pueden apreciar los diferentes casos de Covid19 en varios países de Centroamérica.
casos_pa_cr_ni_gt_sv_hn.plot(title="Cuadro comparativo de casos Covid-19 en los países de Centroamérica")
<AxesSubplot:title={'center':'Cuadro comparativo de casos Covid-19 en los países de Centroamérica'}, xlabel='Date'>