idx = test_runs.groupby('TestName').Date.agg(['idxmin', 'idxmax']).stack(
    ).unique()
df1 = test_runs.loc[idx]
selected = df1['Date'] < '2017-01-01'
tests = df1.loc[selected, 'TestName']
Filter entries of pandas dataframe based on presence (absence) of entries older than a date