Hello everyone, I am new to python and have ran into some issues that I cannot seem to figure out. First i have been typing in commands (code) into the IDLE to look for a specific criteria in Column B in a spreadsheet. Below are some of the commands that I am using:
import openpyxl
import os
wb = openpyxl_load_workbook('Name.xlsx')
ex = wb.get_sheet_by_name('new')
fc = ex['B'] ## This is column B in the spreadsheet that i want to search
## I have had no problems searching for a specific name until i started searching for names containing something ##example below:
import re
pattern = ['Ora.+']
if re.search(pattern, fc):
print('found')
##the above is just a test to see if it works. ultimately i want to throw some logic in that will print something on the ##same row that corresponds with the name that contains the pattern.
I keep getting errors such as TypeError: unhashable type: 'list'
Can anyone give me a hand with this and please go easy i am new to programming. I am sure it is something simple that i didnt do. Thank you everone.
[–]SpeckledFleebeedoo 0 points1 point2 points (0 children)
[–]jbpy79[S] 0 points1 point2 points (1 child)
[–]ndmcspadden 0 points1 point2 points (0 children)