Assume I have a df:
df = pd.DataFrame({'day': range(1, 4),
'apple': range(5, 8),
'orange': range(7, 10),
'pear': range(9, 12),
'purchase': [1, 1, 1],
'cost': [50, 55, 60]})
day apple orange pear purchase cost
1 5 7 9 1 50
2 6 8 10 1 55
3 7 9 11 1 60
How do I get all column names but exclude those which name matches day
, purchase
, & cost
?