Exception while running the PAA script
suri02 opened this issue · comments
Hi
I'm facing this below error, when trying run the paa script file. Can anyone please help me on this?
Traceback (most recent call last):
File "C:\Users\laptop\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\indexes\base.py", line 3080, in get_loc
return self._engine.get_loc(casted_key)
File "pandas_libs\index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\hashtable_class_helper.pxi", line 4554, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas_libs\hashtable_class_helper.pxi", line 4562, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Keywords'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:/Python Tasks/Test Script.py", line 102, in
for i in df['Keywords']:
File "C:\Users\laptop\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\frame.py", line 3024, in getitem
indexer = self.columns.get_loc(key)
File "C:\Users\laptop\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\indexes\base.py", line 3082, in get_loc
raise KeyError(key) from err
KeyError: 'Keywords'
Thank you,
suresh
It looks like you deleted the column name(Keywords) on keywords.xlsx. Make sure that column A row 1 is set to be Keywords.
E.g:
Keywords
Netflix Stock
Uber Stock
Disney Stock
Facebook Stock
Tesla Stock
It looks like you deleted the column name(Keywords) on keywords.xlsx. Make sure that column A row 1 is set to be Keywords.
E.g:
Keywords
Netflix Stock
Uber Stock
Disney Stock
Facebook Stock
Tesla Stock
Hi @sundios
Thank you, Yeah I missed the header in the excel document.
Thanks
Suresh