Name | pandas-fuzz JSON |
Version |
0.1.4
JSON |
| download |
home_page | None |
Summary | Extension for `pandas` to use `rapidfuzz` for fuzzy matching. |
upload_time | 2024-11-02 16:00:13 |
maintainer | None |
docs_url | None |
author | Christoph Dörrer |
requires_python | <4.0,>=3.9 |
license | MIT |
keywords |
pandas
rapidfuzz
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pandas-fuzz
[](https://pypi.org/project/pandas_fuzz/)
[](https://pypi.org/project/pandas_fuzz/)
[](https://pypi.org/project/pandas_fuzz/)
[](https://raw.githubusercontent.com/d-chris/pandas_fuzz/main/LICENSE)
[](https://github.com/d-chris/pandas_fuzz/actions/workflows/pytest.yml)
[](https://d-chris.github.io/pandas_fuzz)
[](https://github.com/d-chris/pandas_fuzz)
[](https://codecov.io/gh/d-chris/pandas_fuzz)
[](https://github.com/pre-commit/pre-commit)
---
Extension for `pandas` to use `rapidfuzz` for fuzzy matching.
## Requirements
- Python 3.9 or later
- On Windows the [Visual C++ 2019 redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) is required
## Installation
```bash
pip install pandas_fuzz
```
## Usage
To register the extension make sure to import `pandas_fuzz` before using it`.
```python
import pandas as pd
import pandas_fuzz
```
Alternatively, you can import `pandas` from `pandas_fuzz` directly.
```python
from pandas_fuzz import pandas as pd
```
## rapidfuzz.fuzz
`pandas_fuzz` integrates the following functions from `rapidfuzz.fuzz` into `pandas`. These functions are available in the `fuzz` namespace for both `pandas.Series` and `pandas.DataFrame`.
- `rapidfuzz.fuzz.ratio`
- `rapidfuzz.fuzz.partial_ratio`
- `rapidfuzz.fuzz.partial_ratio_alignment`
- `rapidfuzz.fuzz.token_sort_ratio`
- `rapidfuzz.fuzz.token_set_ratio`
- `rapidfuzz.fuzz.token_ratio`
- `rapidfuzz.fuzz.partial_token_sort_ratio`
- `rapidfuzz.fuzz.partial_token_set_ratio`
- `rapidfuzz.fuzz.partial_token_ratio`
- `rapidfuzz.fuzz.WRatio`
- `rapidfuzz.fuzz.QRatio`
## pandas.Series
apply `fuzz.ratio` element wise to `pd.Series`.
```python
>>> pd.Series(["this is a test", "this is a test!"]).fuzz.ratio("this is a test!")
0 96.551724
1 100.000000
dtype: float64
```
## pandas.DataFrame
apply `fuzz.ratio` row wise to columns `s1` and `s2`
```python
>>> pd.DataFrame({
"s1": ["this is a test", "this is a test!"],
"s2": ["this is a test", "this is a test!"]
}).fuzz.ratio("s1", "s2")
0 100.0
1 100.0
dtype: float64
```
## Dependencies
[](https://pypi.org/project/pandas/)
[](https://pypi.org/project/rapidfuzz/)
---
Raw data
{
"_id": null,
"home_page": null,
"name": "pandas-fuzz",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "pandas, rapidfuzz",
"author": "Christoph D\u00f6rrer",
"author_email": "d-chris@web.de",
"download_url": "https://files.pythonhosted.org/packages/07/31/dec799c353332627e8e224166b1965b1d26a21b31b3d9a351c7e8732f4d4/pandas_fuzz-0.1.4.tar.gz",
"platform": null,
"description": "# pandas-fuzz\n\n[](https://pypi.org/project/pandas_fuzz/)\n[](https://pypi.org/project/pandas_fuzz/)\n[](https://pypi.org/project/pandas_fuzz/)\n[](https://raw.githubusercontent.com/d-chris/pandas_fuzz/main/LICENSE)\n[](https://github.com/d-chris/pandas_fuzz/actions/workflows/pytest.yml)\n[](https://d-chris.github.io/pandas_fuzz)\n[](https://github.com/d-chris/pandas_fuzz)\n[](https://codecov.io/gh/d-chris/pandas_fuzz)\n[](https://github.com/pre-commit/pre-commit)\n\n---\n\nExtension for `pandas` to use `rapidfuzz` for fuzzy matching.\n\n## Requirements\n\n- Python 3.9 or later\n- On Windows the [Visual C++ 2019 redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) is required\n\n## Installation\n\n```bash\npip install pandas_fuzz\n```\n\n## Usage\n\nTo register the extension make sure to import `pandas_fuzz` before using it`.\n\n```python\nimport pandas as pd\nimport pandas_fuzz\n```\n\nAlternatively, you can import `pandas` from `pandas_fuzz` directly.\n\n```python\nfrom pandas_fuzz import pandas as pd\n```\n\n## rapidfuzz.fuzz\n\n`pandas_fuzz` integrates the following functions from `rapidfuzz.fuzz` into `pandas`. These functions are available in the `fuzz` namespace for both `pandas.Series` and `pandas.DataFrame`.\n\n- `rapidfuzz.fuzz.ratio`\n- `rapidfuzz.fuzz.partial_ratio`\n- `rapidfuzz.fuzz.partial_ratio_alignment`\n- `rapidfuzz.fuzz.token_sort_ratio`\n- `rapidfuzz.fuzz.token_set_ratio`\n- `rapidfuzz.fuzz.token_ratio`\n- `rapidfuzz.fuzz.partial_token_sort_ratio`\n- `rapidfuzz.fuzz.partial_token_set_ratio`\n- `rapidfuzz.fuzz.partial_token_ratio`\n- `rapidfuzz.fuzz.WRatio`\n- `rapidfuzz.fuzz.QRatio`\n\n## pandas.Series\n\napply `fuzz.ratio` element wise to `pd.Series`.\n\n```python\n>>> pd.Series([\"this is a test\", \"this is a test!\"]).fuzz.ratio(\"this is a test!\")\n0 96.551724\n1 100.000000\ndtype: float64\n```\n\n## pandas.DataFrame\n\napply `fuzz.ratio` row wise to columns `s1` and `s2`\n\n```python\n>>> pd.DataFrame({\n \"s1\": [\"this is a test\", \"this is a test!\"],\n \"s2\": [\"this is a test\", \"this is a test!\"]\n}).fuzz.ratio(\"s1\", \"s2\")\n0 100.0\n1 100.0\ndtype: float64\n```\n\n## Dependencies\n\n[](https://pypi.org/project/pandas/)\n[](https://pypi.org/project/rapidfuzz/)\n\n---\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Extension for `pandas` to use `rapidfuzz` for fuzzy matching.",
"version": "0.1.4",
"project_urls": {
"documentation": "https://d-chris.github.io/pandas_fuzz",
"repository": "https://github.com/d-chris/pandas_fuzz"
},
"split_keywords": [
"pandas",
" rapidfuzz"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "365023ab0e7f2b6b8f87d4a95ec8efe88f5c851999e68a77506035db89e01f51",
"md5": "c2874c8b9700b48c878065333d53d0a7",
"sha256": "c510b25c7cdff3958b0c3fa823f63408e3821f81779eebb497e7c7c4e27aaa59"
},
"downloads": -1,
"filename": "pandas_fuzz-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c2874c8b9700b48c878065333d53d0a7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 6403,
"upload_time": "2024-11-02T16:00:11",
"upload_time_iso_8601": "2024-11-02T16:00:11.692658Z",
"url": "https://files.pythonhosted.org/packages/36/50/23ab0e7f2b6b8f87d4a95ec8efe88f5c851999e68a77506035db89e01f51/pandas_fuzz-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0731dec799c353332627e8e224166b1965b1d26a21b31b3d9a351c7e8732f4d4",
"md5": "2e089c25a7b8cc18394d2d99f6ceb14a",
"sha256": "081dd8b00bb735f6f09e1ac48e20fce1c7e3951043296786a7733c505cdc65ac"
},
"downloads": -1,
"filename": "pandas_fuzz-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "2e089c25a7b8cc18394d2d99f6ceb14a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 6769,
"upload_time": "2024-11-02T16:00:13",
"upload_time_iso_8601": "2024-11-02T16:00:13.107387Z",
"url": "https://files.pythonhosted.org/packages/07/31/dec799c353332627e8e224166b1965b1d26a21b31b3d9a351c7e8732f4d4/pandas_fuzz-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-02 16:00:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "d-chris",
"github_project": "pandas_fuzz",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "pandas-fuzz"
}