<分区>
我正在尝试找出使用列名列表在 df 中删除列的最快方法。这是一种奇特的特征缩减技术。 这就是我现在正在使用的,它需要永远。非常感谢任何建议。
important2=(important[:-(len(important)-500)])
for i in important:
if i in important2:
pass
else:
df_reduced.drop(i, axis=1, inplace=True)
df_reduced.head()