Aug-13-2019, 11:16 PM
It would be better, if I had original data, or you provide minimal reproducible example.
It seems everything works fine for me, look at the following example:
It seems everything works fine for me, look at the following example:
import pandas as pd df = pd.DataFrame({'x': [1, 2, 3], 'y':['one', '?', 'two']}) df.loc[df.y.str.contains('?', regex=False), 'y'] = pd.np.nan