title: Perform data manipulation for each year found
body: <p>I have a dataframe which lists country relations and years associated. I have created a set of operations that I wish to perform for each year but currently am doing that 1 year at a time individually.</p>
  <p>Is there a way to create sort of a loop or iteration that will start at the lowest year, perform all the operations, then increment up to the next year and repeat itself to the end?</p>
  <p>Below is an example of what my DF looks like, I wish to perform calculations on all rows labeled with 2017, write out to a .csv (named with the year), and then repeat the process for all rows labeled with 2018.</p>
  <p>So with the end result I would hopefully have multiple .csvs labeled something like Output2017.csv, Output2018.csv, etc</p>
  <p><a href="https://i.stack.imgur.com/Hd7MD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hd7MD.png" alt="enter image description here" /></a></p>