In [2]: df
Out[2]:
    A  B
0  p1  1
1  p1  2
2  p3  3
3  p2  4

In [3]: df.loc[df['B'] == 3, 'A']
Out[3]:
2    p3
Name: A, dtype: object

In [4]: df.loc[df['B'] == 3, 'A'].iloc[0]
Out[4]: 'p3'

df[df['B']3]['A']
df[df['B']
3]['A'].values

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2021-09-14
  • 2022-12-23
  • 2021-09-29
  • 2021-08-14
猜你喜欢
  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
  • 2022-02-06
  • 2022-12-23
  • 2021-12-20
  • 2021-11-24
相关资源
相似解决方案