Pandas Select DataFrame columns using boolean

后端 未结 5 800
我在风中等你
我在风中等你 2020-12-30 23:05

I want to use a boolean to select the columns with more than 4000 entries from a dataframe comb which has over 1,000 columns. This expression gives me a Boolean

5条回答
  •  轮回少年
    2020-12-30 23:28

    I'm using this, it's cleaner

    comb.values[:,criteria]
    

    credit: https://stackoverflow.com/a/43291257/815677

提交回复
热议问题