I'm sorry, because I am new here and in the system, I believe that what you asked me is below
_______________________
PROGRAM
import pandas as pd
lista_meses = ['Janeiro', 'Fevereiro', 'Marco']
for mes in lista_meses:
print(mes)
tabela_vendas = pd.read_excel(f'{mes}.xls')
print(tabela_vendas)
if (tabela_vendas['Vendas'] > 1000).any():
ERROR
"C:\Users\Pichau\PycharmProjects\Analise Bonus Viagem\venv\Scripts\python.exe" "C:\Program Files\JetBrains\PyCharm Community Edition 2022.1.2\plugins\python-ce\helpers\pydev\pydevconsole.py" --mode=client --port=50368
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['C:\\Users\\Pichau\\PycharmProjects\\Analise Bonus Viagem', 'C:/Users/Pichau/PycharmProjects/Analise Bonus Viagem'])
PyDev console: starting.
Python 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)] on win32
runfile('C:/Users/Pichau/PycharmProjects/Analise Bonus Viagem/main.py', wdir='C:/Users/Pichau/PycharmProjects/Analise Bonus Viagem')
Janeiro
Unnamed: 0 Unnamed: 1
0 Vendedor Vendas
1 Vendedor 1 10005
2 Vendedor 2 250
3 Vendedor 3 300
4 Vendedor 4 22
5 Vendedor 5 258
6 Vendedor 6 5
7 Vendedor 7 555
8 Vendedor 8 457
9 Vendedor 9 44
10 Vendedor 10 335
11 Vendedor 11 888
12 Vendedor 12 6
13 Vendedor 13 333
14 Vendedor 14 887
15 Vendedor 15 998
16 Vendedor 16 987
17 Vendedor 17 658
18 Vendedor 18 156
19 Vendedor 19 325
20 Vendedor 20 545
Traceback (most recent call last):
File "C:\Users\Pichau\PycharmProjects\Analise Bonus Viagem\venv\lib\site-packages\pandas\core\indexes\base.py", line 3621, in get_loc
return self._engine.get_loc(casted_key)
File "pandas\_libs\index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas\_libs\hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Vendas'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Pichau\AppData\Local\Programs\Python\Python39\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition 2022.1.2\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2022.1.2\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/Pichau/PycharmProjects/Analise Bonus Viagem/main.py", line 18, in <module>
if (tabela_vendas['Vendas'] > 1000).any():
File "C:\Users\Pichau\PycharmProjects\Analise Bonus Viagem\venv\lib\site-packages\pandas\core\frame.py", line 3505, in __getitem__
indexer = self.columns.get_loc(key)
File "C:\Users\Pichau\PycharmProjects\Analise Bonus Viagem\venv\lib\site-packages\pandas\core\indexes\base.py", line 3623, in get_loc
raise KeyError(key) from err
KeyError: 'Vendas'