Last active
May 20, 2020 20:18
-
-
Save mixmixmix/6f9205d17f5ad19207e2c5431176a86d to your computer and use it in GitHub Desktop.
Revisions
-
mixmixmix revised this gist
May 20, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,6 @@ print(dataset) #Add a row with aggregated values from all regions #calculate and display average values for each column (cases, population, cases per 10 000 population) #print the table -
mixmixmix revised this gist
May 20, 2020 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,14 +2,10 @@ 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 mean values for each numerical column (cases, population, cases per 10 000 population) #print the table -
mixmixmix revised this gist
May 20, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,8 @@ print(dataset) #calculate and display mean values for each numerical column (cases, population, cases per 10 000 population) #print the table // Javascript dataobject = {"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}} -
mixmixmix revised this gist
May 20, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,4 +8,6 @@ print(dataset) #calculate and display mean values for each numerical column (cases, population, cases per 10 000 population) // Javascript dataobject = {"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}} -
mixmixmix created this gist
May 20, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ 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 calculating cases per 10 000 #Add a row with aggregated values from all regions #calculate and display mean values for each numerical column (cases, population, cases per 10 000 population)