从数据框中选择单个值

Selecting a single value from a dataframe

如何通过 pandas 库 select 单个值并将其分配给变量

import pandas as pd
returns = [0.0322, 0.3211, 0.0032]
symbols = ['A', 'B', 'C']

retdf = pd.DataFrame(returns, index=symbols, columns=['ret'])
retdf = retdf.ret.nlargest(1)
print(retdf)

产出

B    0.3211

我怎样才能selectB

'B'是索引,可以参考下

print(retdf.index[0])