I have a DataFrame named df as
Order Number Status
1 1668 Undelivered
2 19771 Undelivered
3 100032108 Undelivered
4
An example of replace method to replace values only in the specified column C2 and get result as DataFrame type.
import pandas as pd
df = pd.DataFrame({'C1':['X', 'Y', 'X', 'Y'], 'C2':['Y', 'Y', 'X', 'X']})
C1 C2
0 X Y
1 Y Y
2 X X
3 Y X
df.replace({'C2': {'X': True, 'Y': False}})
C1 C2
0 X False
1 Y False
2 X True
3 Y True