0
我有熊猫系列设置是这样的:更改浮点索引值的字符串索引值熊猫系列
1 357
0 212
Name: target, dtype: int64
当我用这个代码:
data=data.reindex(index=['A','B'])
我的结果是:
A NaN
B NaN
Name: target, dtype: float64
但我试图做到这一点:
A 357
B 212
Name: target, dtype: int64
那么,我犯了什么错误?