I think that books
is a Pandas Series, but fuzzywuzzy.process.extractOne
expects a list of strings as the second argument. So you may try to convert books to a list before passing it to process.extractOne
writing:
books = pd1["title"].str.strip().str.lower().tolist()