votes up 1

key of type tuple not found and not a MultiIndex

Package:
pandas
github stars 30911
Exception Class:
KeyError

Raise code

values[key] = value
            else:
                # GH#12862 adding a new key to the Series
                self.loc[key] = value

        except TypeError as err:
            if isinstance(key, tuple) and not isinstance(self.index, MultiIndex):
                raise KeyError(
                    "key of type tuple not found and not a MultiIndex"
                ) from err

            if com.is_bool_indexer(key):
                key = check_bool_indexer(self.index, key)
                key = np.asarray(key, dtype=bool)
                try:
                

NO FIXES YET

Just press the button and we will add solution
to this exception as soon as possible

* As many users press the button, the faster we create a fix

Add a possible fix

Please authorize to post fix