I have a Dataframe with a Country column as well as year columns (spanning from 1960 - 2015). I wish to create a new Dataframe only containing the Country and the columns within the last ten years.
I have managed to get the last ten years into a Dataframe but not the Countries they correspond to.
df = df[['Country', '%d' % i for i in range(2006, 2016)]]
From the code above, I get returned a syntax error. What am I doing wrong?