Coder Social home page Coder Social logo

Comments (3)

J535D165 avatar J535D165 commented on May 24, 2024

Hello dserban,

Thanks for your feedback and sorry for this bug. I found the solution and will push an update tomorrow.

from recordlinkage.

J535D165 avatar J535D165 commented on May 24, 2024

The bug is solved in version 0.4.0 (install with pip install recordlinkage)

Two things about your example:

  • When you are using Python 2.x, the strings need to be unicode.
  • compare.fuzzy is now compare.string. (both work btw)
from pandas import DataFrame as DF
import jellyfish
import recordlinkage

names = \
    [ {'name': u'Daniel'}
    , {'name': u'Danieel'}
    , {'name': u'Daaniel'}
    , {'name': u'Daniiel'}
    , {'name': u'Alex'}
    , {'name': u'George'}
    , {'name': u'Laura'}
    , {'name': u'Mary'}
    ]
names_df = DF(names)
names_df.index.name = 'aaa'
ps = recordlinkage.Pairs(names_df)
pairs = ps.full()
compare_cl = recordlinkage.Compare(pairs, names_df, names_df)
print compare_cl.string('name', 'name', method='jarowinkler', threshold=0.85)

from recordlinkage.

Shonexu avatar Shonexu commented on May 24, 2024

Hi All,

i encountered the same problem using Python 3.7 and recordlinkage 0.14 . Your advice would be highly appreciated

below is the detail of the error message

ValueError Traceback (most recent call last)
in
----> 1 compare = rl.Compare(candidate_links, bib, grid)

~\AppData\Local\Continuum\anaconda3\lib\site-packages\recordlinkage\base.py in init(self, features, n_jobs, indexing_type, **kwargs)
540
541 # public
--> 542 if n_jobs == -1:
543 self.n_jobs = cpu_count()
544 else:

~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\generic.py in nonzero(self)
1476 raise ValueError("The truth value of a {0} is ambiguous. "
1477 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
-> 1478 .format(self.class.name))
1479
1480 bool = nonzero

ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

from recordlinkage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.