Guest User

Untitled

a guest
Jan 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. 100 200 300 400
  2. 0 1 1 0 1
  3. 1 1 1 1 0
  4.  
  5. intermediary_df = df_matrix["100"]
  6.  
  7. File "pandas_libshashtable_class_helper.pxi", line 958, in pandas._libs.hashtable.Int64HashTable.get_item
  8. TypeError: an integer is required
  9.  
  10. During handling of the above exception, another exception occurred:
  11.  
  12. Traceback (most recent call last):
  13. File "A:python projectvenvlibsite-packagespandascoreindexesbase.py", line 3078, in get_loc
  14. return self._engine.get_loc(key)
  15. File "pandas_libsindex.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
  16. File "pandas_libsindex.pyx", line 164, in pandas._libs.index.IndexEngine.get_loc
  17. KeyError: '100'
  18.  
  19. During handling of the above exception, another exception occurred:
  20.  
  21. Traceback (most recent call last):
  22. File "pandas_libsindex.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
  23. File "pandas_libshashtable_class_helper.pxi", line 958, in pandas._libs.hashtable.Int64HashTable.get_item
  24. TypeError: an integer is required
  25.  
  26. During handling of the above exception, another exception occurred:
  27.  
  28. Traceback (most recent call last):
  29. File "A:/python project/testing/testing4.py", line 42, in <module>
  30. intermediary_df = df_matrix["100"]
  31. File "A:python projectvenvlibsite-packagespandascoreframe.py", line 2688, in __getitem__
  32. return self._getitem_column(key)
  33. File "A:python projectvenvlibsite-packagespandascoreframe.py", line 2695, in _getitem_column
  34. return self._get_item_cache(key)
  35. File "A:python projectvenvlibsite-packagespandascoregeneric.py", line 2489, in _get_item_cache
  36. values = self._data.get(item)
  37. File "A:python projectvenvlibsite-packagespandascoreinternals.py", line 4115, in get
  38. loc = self.items.get_loc(item)
  39. File "A:python projectvenvlibsite-packagespandascoreindexesbase.py", line 3080, in get_loc
  40. return self._engine.get_loc(self._maybe_cast_indexer(key))
  41. File "pandas_libsindex.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
  42. File "pandas_libsindex.pyx", line 164, in pandas._libs.index.IndexEngine.get_loc
  43. KeyError: '100'
  44.  
  45. intermediary_df = df_matrix.loc[:,"100"]
  46.  
  47. intermediary_df = df_matrix.iloc[:,100]
Add Comment
Please, Sign In to add comment