After looking at several posts here, every post explains how to replace yes/no in a column with 1/0, but the datatype of those numbers remain 'object' and is not float or int (even after I use astype(int)), so I can't do further operation with them. My code is below. Anyone knows how to convert datatype now from object to float or int?
df['Inter Plan'].replace({'no': 0, 'yes': 1}).astype(int)
print(df['Inter Plan'].dtypes)