Mar-17-2020, 10:05 AM
Hello All,
I have an excel sheet with 6 columns: app_name,app_owner,bus_owner,it_lead,app_maintainer,last_updater.
Here column 2 to 6 are people names in the mentioned order.
For a given app_name, there can be names in one or more columns.
Here is a sample test data:
app_name,app_owner,bus_owner,it_lead,app_maintainer,last_updater
CRM,Tom,Hanks,Tim,Bob,Venkat
SAP,NaN,Carpenter,Velu,Karen,Lisa
eCRM,NaN,NaN,Mani,Pinky,Waren
mSales,NaN,NaN,NaN,Rosy,Lily
Mzone,NaN,NaN,NaN,NaN,Matt
I need to print the people name for app_name as input.
So, if value is present in app_owner then it should be printed, else check next column which is bus_owner for value and so on.
Expected output for the test data should be:
CRM,Tom
SAP,Carpenter
eCRM,Mani
mSales,Rosy
Mzone,Matt
I am trying to use panda's where function, but no luck.
Any help is very much appreciated.
I have an excel sheet with 6 columns: app_name,app_owner,bus_owner,it_lead,app_maintainer,last_updater.
Here column 2 to 6 are people names in the mentioned order.
For a given app_name, there can be names in one or more columns.
Here is a sample test data:
app_name,app_owner,bus_owner,it_lead,app_maintainer,last_updater
CRM,Tom,Hanks,Tim,Bob,Venkat
SAP,NaN,Carpenter,Velu,Karen,Lisa
eCRM,NaN,NaN,Mani,Pinky,Waren
mSales,NaN,NaN,NaN,Rosy,Lily
Mzone,NaN,NaN,NaN,NaN,Matt
I need to print the people name for app_name as input.
So, if value is present in app_owner then it should be printed, else check next column which is bus_owner for value and so on.
Expected output for the test data should be:
CRM,Tom
SAP,Carpenter
eCRM,Mani
mSales,Rosy
Mzone,Matt
I am trying to use panda's where function, but no luck.
Any help is very much appreciated.