I would like to create a column that is the sum of columns A + B / C * 100, in order to get a column that is a percentage, yet when I run the code:
# Create new column that displays the % of the population that has a long-term health issue.
for i, row in health_issues.iterrows():
health_issues.loc[i, 'PC_LTHP'] = (row['LTHP_littl'] + row['LTHP_lot']) / row['residents'] * 100
print(health_issues.columns.values)
No new column is created - I am not sure what the issue is, is the code not working as a new column needs to actually exist prior to this? Would appreciate any help!