print('milestone {0} index {1}'.format(milestone, milestone_index))
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()]
slicing pandas dataframe on date range