Python Replace Characters In Dataframe Group By Two