vendredi 13 août 2021

If then else Python

If I have the following dataset how can I create a new field called Article_Title that will use this logic:

if the title is not NaN then copy the contents into Article_Title else if thread_title is not NaN then copy the contents into Article_Title

Screenshot of table

Aucun commentaire:

Enregistrer un commentaire