conditional replacement of row's values in pandas dataframe,df.groupby('ID').cumcount() + 1