正确的方法来反转pandas.DataFrame?
这是我的代码: import pandas as pd data = pd.DataFrame({'Odd':[1,3,5,6,7,9], 'Even':[0,2,4,6,8,10]}) for i in reversed(data): print(data['Odd'], data['Even']) 当我运行此代码时,出现以下错误: Traceback (most recent call last): File "C:\Python33\lib\site-packages\pandas\core\generic.py", line 665, in _get_item_cache return cache[item] KeyError: 5 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\*****\Documents\******\********\****.py", line 5, in …