Last active
July 25, 2020 16:23
-
-
Save vnegi10/8077a78bbc4d0940641a56d1d94b628a to your computer and use it in GitHub Desktop.
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
countries = ["Italy", "Germany", "India", "United Kingdom"]; | |
y = DataFrame() # empty dataframe | |
for country in countries | |
data_dfr = find_country(data_df,country); # returns a dataframe row | |
data_dfr = DataFrame(data_dfr); # convert dataframe row back to a dataframe | |
rows, cols = size(data_dfr); | |
data_dfl = stack(data_dfr, 5:cols); # convert dataframe into long format | |
y[!,Symbol("$country")] = data_dfl[!,:value] | |
end | |
if "India" in names(y) | |
y[!,:India][141] = 286131 # correction for number of cases reported on 10-06-2020 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment