This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
datadict = {'region': {0: 'Region A', 1: 'Region B', 2: 'Region C', 3: 'Region D', 4: 'Region E', 5: 'Region F'}, 'cases': {0: 139, 1: 20, 2: 432, 3: 511, 4: 21, 5: 11}, 'population': {0: 123000, 1: 56329, 2: 70459, 3: 234299, 4: 1478, 5: 2566}} | |
dataset = pd.DataFrame(datadict) | |
print(dataset) | |
#Add a column with values of cases per 10 000 citizens | |
#Add a row with aggregated values from all regions | |
#calculate and display average values for each column (cases, population, cases per 10 000 population) |