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