我收到此错误消息。我阅读了与此错误相关的所有答案,但不幸的是,我无法解决此错误。 main_df是47760 * 12数组
IndexError
Traceback (most recent call last)
<ipython-input-30-38e962ed60a4> in <module>()
78 times=sorted(main_df.index.values)
79 print(main_df.index)
---> 80 last_5pct=sorted(main_df.index.values)[-int(0.05*len(times))]
81 validation_main_df = main_df[(main_df.index >= last_5pct)]
82 main_df = main_df(main_df.index < last_5pct)
IndexError: list index out of range