use*_*903 5 python dataframe pandas
我有一个以下形式的 pandas 数据框:
其中“it”、“their”和“charact”是索引。如何根据索引选择一个值?当我尝试以下操作时:
corpus_df.iloc['it',1]
Run Code Online (Sandbox Code Playgroud)
我收到错误:
ValueError: Location based indexing can only have [integer, integer slice (START point is INCLUDED, END point is EXCLUDED), listlike of integers, boolean array] types
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13078 次 |
| 最近记录: |