I have a pandas dataframe df and I would like to drop columns which have a mean greater than 10 and less than 2. How can I do it without a loop?
I tried this without a loop
df=df.drop(df.mean(axis=1)>10 and df.mean(axis=1)<2)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…