You can try:
# specific columns
cols = ['col1','col2']
df[df.drop(cols, axis=1).isna().all(1)]
That would not check if you have data in cols
. If you require that, you can do:
other_nan = df.drop(cols, axis=1).isna().all(1)
chosen_notna = df[cols].notna().any(1)
df[other_nan & chosen_notna]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…