Ao executar esta acusando esse erro.
KeyError Traceback (most recent call last)
Cell In[25], line 1
----> 1 dados_aux = pd.DataFrame(dados[['Tipo Agregado', 'Valor m2', 'Valor Bruto', 'Valor Bruto m2']])
File ~\anaconda3\envs\andrew_pandas\lib\site-packages\pandas\core\frame.py:3811, in DataFrame.__getitem__(self, key)
3809 if is_iterator(key):
3810 key = list(key)
-> 3811 indexer = self.columns._get_indexer_strict(key, "columns")[1]
3813 # take() does not accept boolean indexers
3814 if getattr(indexer, "dtype", None) == bool:
File ~\anaconda3\envs\andrew_pandas\lib\site-packages\pandas\core\indexes\base.py:6113, in Index._get_indexer_strict(self, key, axis_name)
6110 else:
6111 keyarr, indexer, new_indexer = self._reindex_non_unique(keyarr)
-> 6113 self._raise_if_missing(keyarr, indexer, axis_name)
6115 keyarr = self.take(indexer)
6116 if isinstance(key, Index):
6117 # GH 42790 - Preserve name from an Index
File ~\anaconda3\envs\andrew_pandas\lib\site-packages\pandas\core\indexes\base.py:6176, in Index._raise_if_missing(self, key, indexer, axis_name)
6173 raise KeyError(f"None of [{key}] are in the [{axis_name}]")
6175 not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique())
-> 6176 raise KeyError(f"{not_found} not in index")
KeyError: "['Tipo Agregado'] not in index"