mardi 27 octobre 2020

If x and y are true do this, else do this. Pandas

enter code here if fluadf['CLINICAL_STATUS'] = 'DRAFT' and fluadf['CLINICAL_DATE_RECEIVED'] = " / /

" fluadf['CLINICAL_STATUS'].str.replace( 'DRAFT', 'IN TRANSIT') else fluadf['CLINICAL_STATUS'].str.replace( 'DRAFT', 'IN PROCESS')

Not sure if this code makes sense. I am trying to test for two values and if they are both true (clinical status is draft and there is not a date for clinical date received) then change draft to in transit. Else, change draft to in process. I'd really appreciate any help coaching me through this.

Aucun commentaire:

Enregistrer un commentaire