how to check if a column is in a dataframe code example
Example 1: check if column exists in dataframe
if 'A' in df.columns:
Example 2: check if list elememnt in dataframe column
if df[df['WK'].isin(wk)]
if 'A' in df.columns:
if df[df['WK'].isin(wk)]