Hello Data Scientists,
Disclaimer: I am a Beginner learning Python and at the same time just trying out a lot of things.
I am doing some data extraction on a file with with weekly deaths in Switzerland between the years of 2010 - 2019 (to be found at https://opendata.swiss/en/). I narrowed down the age group of 0-64, now I am separating this group into deaths per year.
I find it cumbersome to repeat assigning the variable to an operator. I wondered if there would be any way to define a function and input a list. Maybe it would be even nicer to have some operation extract the years from the file itself and work it out automatically.
I tried to follow a template and as you can see I get a lot of error messages. Probably I am doing it all wrong?
Please let me know if you have any suggestions and how solve it and thank you very much for taking the time to ponder my question! :)