mardi 10 mars 2020

Adding two variables in if statement and for loop [closed]

I would want to add one more condition in if loop for eg: if row !="N" and year(2020) and month(january) how to declare the same in for loop

   for row in df['Infill_flag_p_month']:
if row !="N" :
    state_infill_pmonth.append(1)
  else:
    state_infill_pmonth.append(0) 
      df['state_infill_pmonth'] = state_infill_pmonth

Aucun commentaire:

Enregistrer un commentaire