Replace string in Column based on Condition pandas code example
Example 1: find and replace string dataframe
df['range'] = df['range'].str.replace(',','-')
Example 2: replace values in a column by condition python
df.loc[df['employrate'] > 70, 'employrate'] = 7