python中pandas DataFrame对象修改值问题

2024-12-18 04:46:05
推荐回答(1个)
回答1:

In [36]: list(df['state']).index('ohio')
Out[36]: 0

In [37]: list(df['state']).index('nevada')
Out[37]: 1