KeyError: "None of [Index...are in the [index]" #1110
-
Hello, I have an error message that prevents me from working with my script. I want to create a geometry column with this line of code: KeyError Traceback (most recent call last) File ~\Anaconda3\envs\geo_env\lib\site-packages\pandas\core\indexing.py:712, in _LocationIndexer.setitem(self, key, value) File ~\Anaconda3\envs\geo_env\lib\site-packages\pandas\core\indexing.py:661, in _LocationIndexer._get_setitem_indexer(self, key) File ~\Anaconda3\envs\geo_env\lib\site-packages\pandas\core\indexing.py:799, in _LocationIndexer._convert_tuple(self, key) File ~\Anaconda3\envs\geo_env\lib\site-packages\pandas\core\indexing.py:1291, in _LocIndexer._convert_to_indexer(self, key, axis) File ~\Anaconda3\envs\geo_env\lib\site-packages\pandas\core\indexing.py:1327, in _LocIndexer._get_listlike_indexer(self, key, axis) File ~\Anaconda3\envs\geo_env\lib\site-packages\pandas\core\indexes\base.py:5782, in Index._get_indexer_strict(self, key, axis_name) File ~\Anaconda3\envs\geo_env\lib\site-packages\pandas\core\indexes\base.py:5842, in Index._raise_if_missing(self, key, indexer, axis_name) KeyError: "None of [Index([('g', 'e', 'o', 'm', 'e', 't', 'r', 'y', '', 'x'), ('g', 'e', 'o', 'm', 'e', 't', 'r', 'y', '', 'x')], dtype='object')] are in the [index]" can you help me to solve this error ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@Mhdx20 This seems a usage question related to pandas or geopandas, but you posting in the Fiona project (for reading/writing data with GDAL). I would recommend asking such question at https://stackoverflow.com/. Also, it will help to provide a reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), because right now, without seeing what your data looks like, it is hard to guess what is going wrong. |
Beta Was this translation helpful? Give feedback.
@Mhdx20 This seems a usage question related to pandas or geopandas, but you posting in the Fiona project (for reading/writing data with GDAL).
I would recommend asking such question at https://stackoverflow.com/. Also, it will help to provide a reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), because right now, without seeing what your data looks like, it is hard to guess what is going wrong.