Being that you would have to create a new dataframe with the information coming from those dates below.
import pandas as pd
import numpy as np
import datetime
%matplotlib inline
races = pd.read_csv('races.csv')
results = pd.read_csv('results.csv')
last10M = pd.merge(results, races, how='outer', on='raceId')
start = datetime.datetime(int(2008), int(4), 20)
end = datetime.datetime(int(2008), int(4), 20)
I'm stuck in this last part, the dates I've already done, I'm just missing the filtering of the 'last10M' dataframe. The 'last10M' dataframe would have to be filtered in the 'date' field from 2008 to 2018