https://github.com/dedupeio/categorical-distance
:triangular_ruler: Compare categorical variables
https://github.com/dedupeio/categorical-distance
Last synced: 3 months ago
JSON representation
:triangular_ruler: Compare categorical variables
- Host: GitHub
- URL: https://github.com/dedupeio/categorical-distance
- Owner: dedupeio
- Created: 2014-11-20T17:48:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-03-31T20:55:56.000Z (about 6 years ago)
- Last Synced: 2026-01-04T16:01:50.626Z (5 months ago)
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
categorical-distance
====================
Compare categorical variables
Part of the [Dedupe.io](https://dedupe.io/) cloud service and open source toolset for de-duplicating and finding fuzzy matches in your data.
```python
>>> import categorical
>>> categories = ('a', 'b')
>>> comparator = categorical.CategoricalComparator(categories)
>>> comparator('a', 'a')
[ 0. 0.]
>>> comparator('b', 'b')
[ 1. 0.]
>>> comparator('a', 'b')
[ 0. 1.]
>>> comparator('b', 'a')
[ 0. 1.]
```