#Create column in df called 'Year' which extracts the year from the 'Date' column data['Year'] = (data['Date']).dt.to_period('A')