Python Forum
Fuzzy Wuzzy how to get my fuzzyratio displayed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fuzzy Wuzzy how to get my fuzzyratio displayed
#1
Hi, I am a python novice. I am trying to use FuzzyWuzzy to compare the text in 2 columns. I have imported my csv with just the 2 columns I want to compare. I have written this code and it runs:-

def compute_fuzz_ratio():
return fuzz.ratio(['Column1Heading'], ['Column2Heading'])

however when I add df['FuzzRatio'] = df.apply(compute_fuzz_ratio, axis=1) to try and get the ratio displayed in the dataframe I get this error "TypeError: object of type 'float' has no len()" can anyone let me know what I am doing wrong?

Many thanks
Reply


Messages In This Thread
Fuzzy Wuzzy how to get my fuzzyratio displayed - by windingsareuseful - Apr-04-2024, 03:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Table displayed out of order nigelwright7557 3 1,910 Nov-24-2021, 10:07 AM
Last Post: nigelwright7557
  Unexpected output: symbols for derivative not being displayed saucerdesigner 0 2,147 Jun-22-2020, 10:06 PM
Last Post: saucerdesigner
  Auto-copy all displayed "print" results into clipboard? smallabc 1 1,748 Dec-16-2019, 02:10 PM
Last Post: buran
  Percentages displayed as "0.00" Winfried 2 1,887 Nov-15-2019, 05:20 PM
Last Post: Winfried
  implementation fuzzy logic using sckit fuzzy nana_4895 0 2,177 Oct-21-2019, 03:28 AM
Last Post: nana_4895
  Fuzzy match on text columns within dataframe Nsaibot 0 4,396 Aug-27-2018, 10:52 PM
Last Post: Nsaibot
  Exotic stats problem ; mode, fuzzy clusters, etc amyvaulhausen 5 4,057 Aug-06-2018, 04:10 PM
Last Post: Vysero
  Installing fuzzy wuzzy terrancepython11 6 18,548 Mar-25-2017, 06:55 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020