pandas changing cell values based on another cell,b = df[(df['time'] > X) & (df['time'] < Y)]