Meijian/Genetic-Algorithm-and-Machine-learing

help!!!

Opened this issue · 2 comments

您好,我是一名研究相关方向的在读研究生,在运行您的代码时遇到了一些问题,想跟您进一步沟通一下,不知道能否获得您的联系方式,跟您探讨一下这个方法的实现问题,万分感谢~

这个是我很久前的项目了,你有什么问题?我尽量回答。

运行您的代码时,不知道什么原因报错如下,能请您帮我解答一下吗?

Traceback (most recent call last):
File "E:\GA种群算法\Genetic-Algorithm-and-Machine-learing-master\GaCreator.py", line 280, in
popFit=reproduction(Pop1,1000)
File "E:\GA种群算法\Genetic-Algorithm-and-Machine-learing-master\GaCreator.py", line 208, in reproduction
scores=fitEstimator(curPop)
File "E:\GA种群算法\Genetic-Algorithm-and-Machine-learing-master\GaCreator.py", line 143, in fitEstimator
tmp=pd.DataFrame(data=oriData[d])
File "E:\anaconda\lib\site-packages\pandas\core\frame.py", line 3464, in getitem
indexer = self.loc._get_listlike_indexer(key, axis=1)[1]
File "E:\anaconda\lib\site-packages\pandas\core\indexing.py", line 1314, in _get_listlike_indexer
self._validate_read_indexer(keyarr, indexer, axis)
File "E:\anaconda\lib\site-packages\pandas\core\indexing.py", line 1374, in _validate_read_indexer
raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Int64Index([ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,\n ...\n 191, 192, 193, 194, 195, 196, 197, 198, 199, 200],\n dtype='int64', length=199)] are in the [columns]"