Looks ugly:
df_cut = df_new[
(
(df_new['l_ext']==31) |
(df_new['l_ext']==22) |
(df_new['l_ext']==30) |
(df_new['l_ext']==25) |
(df_new['l_ext']==64)
)
]
Does not work:
df_cut = df_new[(df_new['l_ext'] in [31, 22, 30, 25, 64])]
Is there an elegant and working solution of the above "problem"?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…