它的一个列看起来像是在重复它的一个列:
Year President Party Value
0 1920 Woodrow Wilson Democratic NaN
1 1921 Warren G. Harding Republican 0.127172
2 1922 Warren G. Harding Republican 0.217386
我的代码如下:
^{pr2}$但由于If语句,我一直得到以下错误:
IndexError: only integers, slices (
:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indices.
感谢您建议。很多提前谢谢!在
设置
这段代码应该会给你想要的输出
输出:
^{pr2}$相关问题 更多 >
编程相关推荐