if milestone_index < len(milestones_list) - 1:
    x = df[milestones_df.index[milestone_index]:milestones_df.index[
        milestone_index + 1]]
else:
    x = df[milestones_df.index[milestone_index]:df.index.max()]
n = str(int(x.index.min())) + '-' + str(int(x.index.max()))
slicing pandas dataframe on date range