dimanche 10 juillet 2016

Display merged values using a condition, while including NaN values


I have a resultant dataset (called Result) after merging two datasets. I want to display only those rows from Result where company_name1 is equal to company_name2. The output is stored in Result1.This can be done as follows:

  • Result1=Result[Result.company_name1==Result.company_name2]

The above statement works fine. The problem is -

There are few rows in Result where either company_name1 or company_name2 is NaN, and those rows won't become part of Result1. My requirement is to over pass the condition in all such cases and also include those rows in Result1. How do I incorporate that condition?


Aucun commentaire:

Enregistrer un commentaire