Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 100 200 300 400
- 0 1 1 0 1
- 1 1 1 1 0
- intermediary_df = df_matrix["100"]
- File "pandas_libshashtable_class_helper.pxi", line 958, in pandas._libs.hashtable.Int64HashTable.get_item
- TypeError: an integer is required
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "A:python projectvenvlibsite-packagespandascoreindexesbase.py", line 3078, in get_loc
- return self._engine.get_loc(key)
- File "pandas_libsindex.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
- File "pandas_libsindex.pyx", line 164, in pandas._libs.index.IndexEngine.get_loc
- KeyError: '100'
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "pandas_libsindex.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
- File "pandas_libshashtable_class_helper.pxi", line 958, in pandas._libs.hashtable.Int64HashTable.get_item
- TypeError: an integer is required
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "A:/python project/testing/testing4.py", line 42, in <module>
- intermediary_df = df_matrix["100"]
- File "A:python projectvenvlibsite-packagespandascoreframe.py", line 2688, in __getitem__
- return self._getitem_column(key)
- File "A:python projectvenvlibsite-packagespandascoreframe.py", line 2695, in _getitem_column
- return self._get_item_cache(key)
- File "A:python projectvenvlibsite-packagespandascoregeneric.py", line 2489, in _get_item_cache
- values = self._data.get(item)
- File "A:python projectvenvlibsite-packagespandascoreinternals.py", line 4115, in get
- loc = self.items.get_loc(item)
- File "A:python projectvenvlibsite-packagespandascoreindexesbase.py", line 3080, in get_loc
- return self._engine.get_loc(self._maybe_cast_indexer(key))
- File "pandas_libsindex.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
- File "pandas_libsindex.pyx", line 164, in pandas._libs.index.IndexEngine.get_loc
- KeyError: '100'
- intermediary_df = df_matrix.loc[:,"100"]
- intermediary_df = df_matrix.iloc[:,100]
Add Comment
Please, Sign In to add comment