I am trying to filter the rows of a DataFrame according to the below conditions and want to replace the values by a new value of a column. The error I am getting is:
TypeError: unsupported operand type(s) for &: 'float' and 'bool'
The picture of df is in link.
data1=data.loc[data['dob_years']==0] & data.loc[data['income_type']=='retiree']
replace value of dob_years==0 by 60.0