python - pandas出毛病了,重装也不行
天蓬老师
天蓬老师 2017-04-18 10:27:52
0
1
975
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pandas\indexes\base.py", line 2134, in get_loc
    return self._engine.get_loc(key)
  File "pandas\index.pyx", line 132, in pandas.index.IndexEngine.get_loc (pandas\index.c:4433)
  File "pandas\index.pyx", line 154, in pandas.index.IndexEngine.get_loc (pandas\index.c:4279)
  File "pandas\src\hashtable_class_helper.pxi", line 732, in pandas.hashtable.PyObjectHashTable.get_item (pandas\hashtable.c:13742)
  File "pandas\src\hashtable_class_helper.pxi", line 740, in pandas.hashtable.PyObjectHashTable.get_item (pandas\hashtable.c:13696)
KeyError: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/Administrator/PycharmProjects/untitled/test.py", line 5, in <module>
    code = today_data[0]
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pandas\core\frame.py", line 2059, in __getitem__
    return self._getitem_column(key)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pandas\core\frame.py", line 2066, in _getitem_column
    return self._get_item_cache(key)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pandas\core\generic.py", line 1386, in _get_item_cache
    values = self._data.get(item)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pandas\core\internals.py", line 3543, in get
    loc = self.items.get_loc(item)
  File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\pandas\indexes\base.py", line 2136, in get_loc
    return self._engine.get_loc(self._maybe_cast_indexer(key))
  File "pandas\index.pyx", line 132, in pandas.index.IndexEngine.get_loc (pandas\index.c:4433)
  File "pandas\index.pyx", line 154, in pandas.index.IndexEngine.get_loc (pandas\index.c:4279)
  File "pandas\src\hashtable_class_helper.pxi", line 732, in pandas.hashtable.PyObjectHashTable.get_item (pandas\hashtable.c:13742)
  File "pandas\src\hashtable_class_helper.pxi", line 740, in pandas.hashtable.PyObjectHashTable.get_item (pandas\hashtable.c:13696)
KeyError: 0

这个错误我也是一脸懵,安装各种依赖库,卸载重装都不行,求大神指导

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

全員に返信(1)
Peter_Zhu

さまざまなデータ処理パッケージが付属しており、追加のインストールを必要としない Python ディストリビューション Anaconda を使用することをお勧めします。
このディストリビューションは、pip のインストールによって引き起こされる依存関係エラーを効果的に回避できる conda パッケージ管理ツールを使用します。
パッケージが比較的大きいので、インストールする必要があると思われる場合は、追加のダウンロードとインストールが必要な Miniconda の合理化されたバージョンを試すことができます。

condaを使用したダウンロード速度が遅い場合は、清華のミラー、清華condaミラー構成を使用できます

いいねを押す +0
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!