当我尝试运行 python manage.py runserver 时出现此错误

时间:2021-04-25 08:23:48

标签: python django tensorflow1.15

File "C:\Users\Dev\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\indexes\base.py", line 3080, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas\_libs\index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\hashtable_class_helper.pxi", line 4554, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas\_libs\hashtable_class_helper.pxi", line 4562, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Date'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\Python Projects\MTE\Fitness Tracker\Analyze Your Runkeeper Fitness Data\datasets\Fitness Data.py", line 29, in <module>
    datesss=df_run[(df_run['Date'] > '01-01-2013') & (df_run['Date'] <= '31-12-2018')]
  File "C:\Users\Dev\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\frame.py", line 3024, in __getitem__
    indexer = self.columns.get_loc(key)
  File "C:\Users\Dev\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\indexes\base.py", line 3082, in get_loc
    raise KeyError(key) from err
KeyError: 'Date'

0 个答案:

没有答案