human
Replacing few values in a pandas dataframe column with another value
assistant
Here is some code to replacing 'ABC' and 'AB' values in column 'BrandName' of dataframe `df` with 'A'

df['BrandName'].replace(['ABC', 'AB'], 'A')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.