TypeError Traceback (most recent call last)
Cell In[1], line 14
12 monthly_payment = {}
13 for insurance, rates in proportion.items():
—> 14 unit_payment = sum(rate * base_salary for rate in rates.values() if ‘单位’ in rate)
15 personal_payment = sum(rate * base_salary for rate in rates.values() if ‘个人’ in rate)
16 monthly_payment[insurance] = {‘单位’: unit_payment, ‘个人’: personal_payment}
Cell In[1], line 14, in <genexpr>(.0)
12 monthly_payment = {}
13 for insurance, rates in proportion.items():
—> 14 unit_payment = sum(rate * base_salary for rate in rates.values() if ‘单位’ in rate)
15 personal_payment = sum(rate * base_salary for rate in rates.values() if ‘个人’ in rate)
16 monthly_payment[insurance] = {‘单位’: unit_payment, ‘个人’: personal_payment}
TypeError: argument of type ‘float’ is not iterable