AttributeError: 'float' object has no attribute 'find'
www.jscodetips.com › examples › attributeerror-floatThe following code is causing AttributeError: 'float' object has no attribute 'find' and I do not how to fix it: edu = Edu_data # Function to identify degree def degree (x): # if x. find ( 'Bachelor') != -1 or x. find ( "Bachelor's") != -1 or x. find ( 'BS') != -1 or x. find ( 'bs') != -1 or x. find ( 'Bs') != -1 or x. find ( 'Bachelors') != -1 or x. find ( 'Undergraduate') != -1 or x. find ( 'graduated' )!= -1 or x. find ( 'BSE' )!= -1 or x. find ( 'Enginee') != -1 or x. find ( 'BCS') != -1
Why I get AttributeError: 'float' object has no attribute '3f'?
datascience.stackexchange.com › questions › 64521Dec 10, 2019 · Show activity on this post. I am getting this error: AttributeError: 'float' object has no attribute '3f'. I don't understand why I am getting it, I am following the example straight from the book "applied text analysis". The chunk of code in python is: total = sum (words.values ()) for gender, count in words.items (): pcent = (count / total) * 100 nsents = sents [gender] print ( " {0.3f}% {} ( {} sentences)".format (pcent, gender, nsents) )