i want to map the the AQI column with AQI_Bucket column in pandas dataframe i tried it using for loop but couldnt get it
for aqi in df['AQI']:
col1,col2 = df['AQI'],df['AQI_Bucket']
_col1,_col2 = col1[0],col2[0]
if df[aqi] == df['AQI_Bucket']:
if pd.isnull(_col2):
if _col1 in range(51):
_col2 = "Good"
elif _col1 in range(51, 101):
_col2 = "Satisfactory"
elif _col1 in range(101,201):
_col2 = "Moderate"
elif _col1 in range(201, 301):
_col2 = "Poor"
elif _col1 in range(301, 401):
_col2 == "Very Poor"
elif _col1 in range(401, 500):
_col2 == "Severe"