How can I select the columns in the dataframe which the column names is not belong to a list?
For example:
I have the following input and I would like to select columns which columns names does not belong to b
#input
a=pd.DataFrame({
'0':[10,10,10,10,10],
'1':[2,3,8,10,11],
'2':[0,1,2,3,4],
'3':[13,12,14,14,13],
'4':[15,13,17,18,19],
'5':[10,2,3,4,6]
})
b=[2,3,4]
#output
output=pd.DataFrame({
'0':[10,10,10,10,10],
'1':[2,3,8,10,11],
'5':[10,2,3,4,6]
})