I have a df, which has many missing values.
I would like to find the variables/columns which has missing values.
Tried below code:
vars_with_na = [var for var in df.columns if df[var].isnull().sum() > 0]
But it is giving below error:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().