Hello everyone,
In my Dataset I have environmental data concerning different countries in different years.
I.e. small sample
(string) (int)
country_year Totcount
USA1995 .1313796
USA1996 .1248367
USA1997 .1275357
ITA1995 .0151587
ITA1996 .0149385
ITA1997 .0147819
DEU1995 .015136
DEU1996 .0265344
DEU1997 .0147217
DNK1995 .0029698
DNK1996 .002934
DNK1997 .0027339
...
What I am looking for, without success so far, is to write a script that allows me to sum the values in the var "Totcount" per year according to certain list of countries that I wish. More specifically, out of this small example I wrote, what I would like to obtain is the sum per year of "Totcount" by an hypothetical list "european countries", in this case, composed by ITA, DEU and DNK, such that I can obtain ITA1995+DEU1995+DNK1995, ITA1996+DEU1996+DNK1996 ITA1997+DEU1997+DNK1997 etc. without considering the USA data.
Thank you very much in advance,
Riccardo
In my Dataset I have environmental data concerning different countries in different years.
I.e. small sample
(string) (int)
country_year Totcount
USA1995 .1313796
USA1996 .1248367
USA1997 .1275357
ITA1995 .0151587
ITA1996 .0149385
ITA1997 .0147819
DEU1995 .015136
DEU1996 .0265344
DEU1997 .0147217
DNK1995 .0029698
DNK1996 .002934
DNK1997 .0027339
...
What I am looking for, without success so far, is to write a script that allows me to sum the values in the var "Totcount" per year according to certain list of countries that I wish. More specifically, out of this small example I wrote, what I would like to obtain is the sum per year of "Totcount" by an hypothetical list "european countries", in this case, composed by ITA, DEU and DNK, such that I can obtain ITA1995+DEU1995+DNK1995, ITA1996+DEU1996+DNK1996 ITA1997+DEU1997+DNK1997 etc. without considering the USA data.
Thank you very much in advance,
Riccardo
Comment