Hello trying to update values in a dataframe based on multiple conditions. Where there is category that is Gas/Fuel less than $30 I want to change the category to food.
data.loc[60:65,['Category','Debit']]
Category Debit
60 Groceries 38.18
61 Gas/Fuel 7.30
62 Fast Food 9.18
63 Pharmacy 7.03
64 Gas/Fuel 3.16
65 Pharmacy 9.40
for index, row in data.iterrows():
if row[3] == 'Gas/Fuel' and row[4] < 30:
row[3]='Fast Food'