def getDF(threshold): df = pd.read_pickle(filename) df[\'threshold\'] = float(threshold) df.set_index(\'date\')