I am working with Covid-19 dataset and have used pivot function below:
url = 'https://opendata.ecdc.europa.eu/covid19/casedistribution/csv'
data = pd.read_csv(url,parse_dates=['dateRep'],index_col=['dateRep'])
data.head()
data.index.name = "date"
data = data.drop(['day', 'month', 'year','geoId','countryterritoryCode','continentExp'], axis = 1)
data = data.rename(columns={'countriesAndTerritories': 'country', 'popData2019':'population', 'continentExp' : 'continent' })
df_pivot = data.pivot(index = 'date', columns = 'country', values = 'cases').fillna(0)
df_pivot`
When I look at US cases on 2020-01-04 the number in pivoted data frame is "24998.0" which is incorrect (it should be 0). I will appreciate any suggestions.Thanks.
