Replace a specific value with another value in a dataframe:
df.replace(originalValue, newValue, inplace=True)
df = df.replace(originalValue, newValue)
Replace values not equal to a given value with another value:
df[df != originalValue] = newValue