Winning jeopardy (Answer error)

Screen Link:

My Code: <!–

import re
def normalize(q_a):
q_a = re.sub('[^\w\s]','',q_a.lower())
return q_a 

What I expected to happen: Normalization of Question and answer columns

What actually happened: key error question

KeyError: ‘Question’

<!--Enter other details below:
while performing the same technique on my desktop i am able to get the question columns normalized while getting an error with the answer columns
that is ( AttributeError: 'float' object has no attribute 'lower') -->

This means you don’t have a column with the name Question. Recheck Step 1, there were some column cleaning you were supposed to do.
In Step 1

Some of the column names have spaces in front.


Thank You it helped me!!

1 Like