# reconciler
<!-- badges: start -->
[![license](https://img.shields.io/badge/license-BSD%202--Clause-green)](https://github.com/jvfe/reconciler/blob/master/LICENSE)
[![pytest status](https://github.com/jvfe/reconciler/workflows/reconciler/badge.svg)](https://github.com/jvfe/reconciler/actions)
<!-- badges: end -->
`reconciler` is a python package to reconcile tabular data with various reconciliation services, such as
[Wikidata](https://www.wikidata.org/wiki/Wikidata:Main_Page), working similarly to what [OpenRefine](https://openrefine.org/)
does, but entirely within Python, using Pandas.
## Quickstart
You can install the latest version of reconciler from PyPI with:
``` bash
pip install reconciler
```
Then to use it:
```python
from reconciler import reconcile
import pandas as pd
# A DataFrame with a column you want to reconcile.
test_df = pd.DataFrame(
{
"City": ["Rio de Janeiro", "São Paulo", "São Paulo", "Natal"],
}
)
# Reconcile against type city (Q515), getting the best match for each item.
reconciled = reconcile(test_df["City"], type_id="Q515")
```
The resulting dataframe would look like this:
| id | match | name | score | type | type_id | input_value |
|:--------|:--------|:---------------|--------:|:-----------------------|:-----------|:---------------|
| Q8678 | True | Rio de Janeiro | 100 | city | Q515 | Rio de Janeiro |
| Q174 | True | São Paulo | 100 | city | Q515 | São Paulo |
| Q131620 | True | Natal | 100 | municipality of Brazil | Q3184121 | Natal |
Check out the [documentation](https://jvfe.github.io/reconciler/) for more advanced usage and to learn [how to contribute](https://jvfe.github.io/reconciler/contributing/).
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共13个文件
py:4个
txt:4个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:reconciler-0.1.2.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
reconciler-0.1.2.tar.gz (13个子文件)
reconciler-0.1.2
PKG-INFO 3KB
reconciler
__init__.py 203B
reconcile.py 3KB
webutils.py 4KB
setup.cfg 382B
reconciler.egg-info
PKG-INFO 3KB
requires.txt 21B
not-zip-safe 1B
SOURCES.txt 300B
top_level.txt 11B
dependency_links.txt 1B
setup.py 1KB
README.md 2KB
共 13 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功