Pandas replace a value with another value or replace values not equal to a given value

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