pandas dataframe replace values conditinally code example
Example 1: replace column values pandas
df['column'] = df['column'].str.replace(',','-')
df
Example 2: .replace pandas in for loop
df_media_input['MediaChannel'].replace(replacements, inplace=True)