You can call dropna with arguments subset and how:
df2.dropna(subset=['three', 'four', 'five'], how='all')
As the names suggests:
how='all'requires every column (ofsubset) in the row to beNaNin order to be dropped, as opposed to the default'any'.subsetis those columns to inspect forNaNs.
As @PaulH points out, we can generalise to drop the last k columns with:
subset=df2.columns[k:]
Indeed, we could even do something more complicated if desired:
subset=filter(lambda x: len(x) > 3, df2.columns)