我有一个pandas数据框,它有一列整数。我想要包含大于10的数字的行。我可以通过以下操作来判断真假,但不能判断实际值:
df['ints'] = df['ints'] > 10
我不经常使用Python,所以我用它来绕圈子。
我花了20分钟在谷歌上搜索,但一直找不到我需要的。。。。
编辑:
observationID recordKey gridReference siteKey siteName featureKey startDate endDate pTaxonVersionKey taxonName authority commonName ints
0 463166539 1767 SM90 NaN NaN 150161 12/02/2006 12/02/2006 NBNSYS0100004720 Pipistrellus pygmaeus (Leach, 1825) Soprano Pipistrelle 2006
1 463166623 4325 TL65 NaN NaN 168651 21/12/2008 21/12/2008 NHMSYS0020001355 Pipistrellus pipistrellus sensu stricto (Schreber, 1774) Common Pipistrelle 2008
2 463166624 4326 TL65 NaN NaN 168651 18/01/2009 18/01/2009 NHMSYS0020001355 Pipistrellus pipistrellus sensu stricto (Schreber, 1774) Common Pipistrelle 2009
3 463166625 4327 TL65 NaN NaN 168651 15/02/2009 15/02/2009 NHMSYS0020001355 Pipistrellus pipistrellus sensu stricto (Schreber, 1774) Common Pipistrelle 2009
4 463166626 4328 TL65 NaN NaN 168651 19/12/2009 19/12/2009 NHMSYS0020001355 Pipistrellus pipistrellus sensu stricto (Schreber, 1774) Common Pipistrelle 2009
样品测向:
只显示那些
b > 10
行满足
b > 10
条件的行的最小值(对于所有列)满足
b > 10
条件的行的最小值(对于b
列)更新:从Pandas 0.20.1the .ix indexer is deprecated, in favor of the more strict .iloc and .loc indexers开始。
相关问题 更多 >
编程相关推荐