【发布时间】:2019-09-18 09:59:35
【问题描述】:
我需要在 pandas 数据框中的列表中打印不包括 NaN 的 True 值。
dfa.where(dfa['Group']=='|Demographics')['Group']
【问题讨论】:
-
你想要
dfa.loc[dfa['Group']=='|Demographics', 'Group']吗?如果您只想要布尔数组,只需使用:dfa['Group']=='|Demographics'
标签: python pandas python-2.7