xxxxxxxxxx
>>> pd.Series(['foo', 'fuz', np.nan]).str.replace('f.', 'ba', regex=True)
0 bao
1 baz
2 NaN
dtype: object
xxxxxxxxxx
df['prod_type'] = df['prod_type'].replace({'respon':'responsive', 'r':'responsive'})
xxxxxxxxxx
import re
# Note the regex compilation prior to calling the function (optional in re.sub())
>>> regex_pat = re.compile(r'FUZ', flags=re.IGNORECASE)
>>> pd.Series(['foo', 'fuz', np.nan]).str.replace(regex_pat, 'bar', regex=True)
0 foo
1 bar
2 NaN
dtype: object