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 …