剔除一列
df.loc[:, df.columns != 'b']
剔除多列
df.loc[:, ~df.columns.isin(['col1', 'col2'])]
补充:不太喜欢用drop,它也可以的
参考
python - How to select all columns except one in pandas? - Stack Overflow
标签:loc,df,cols,剔除,pandas,columns From: https://www.cnblogs.com/ministep/p/16966484.html