I have a list:
list = ['firstname', 'lastname', 'email', 'phonenumber']
I want to iterate for this list as:
import pandas as pd
df = pd.read_csv(filepath)
df[ pd.notnull(df[firstname]) | pd.notnull(df[lastname]) |
pd.notnull(df[email]) | pd.notnull(df[phonenumber])]
How do I perform the above process using a loop?