df.loc[df['buyer_id'] == 261, 'buyer_id'] = df['buyer_id'].astype(str
    ) + '_' + (df['phone_no'] != df['phone_no'].shift()).cumsum().map('{:02}'
    .format)
how to rename a column value in pandas dataframe on some condition