I'm trying to drop all the columns in a pandas dataframe, except for these few, but when I run this code all the columns are dropped. The dataset is so big, that it would be tedious to list them all, any ideas?:
for columns in df:
if not columns == 'Carbohydrates' or columns == 'Description' or columns == '1st Household Weight' or columns == 'Sugar Total' or columns == 'Kilocalories':
df = df.drop(columns, axis = 1)