pandas-fuzz


Namepandas-fuzz JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
SummaryExtension for `pandas` to use `rapidfuzz` for fuzzy matching.
upload_time2024-11-02 16:00:13
maintainerNone
docs_urlNone
authorChristoph Dörrer
requires_python<4.0,>=3.9
licenseMIT
keywords pandas rapidfuzz
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pandas-fuzz

[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pandas_fuzz)](https://pypi.org/project/pandas_fuzz/)
[![PyPI](https://img.shields.io/pypi/v/pandas_fuzz)](https://pypi.org/project/pandas_fuzz/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/pandas_fuzz)](https://pypi.org/project/pandas_fuzz/)
[![PyPI - License](https://img.shields.io/pypi/l/pandas_fuzz)](https://raw.githubusercontent.com/d-chris/pandas_fuzz/main/LICENSE)
[![GitHub Workflow Test)](https://img.shields.io/github/actions/workflow/status/d-chris/pandas_fuzz/pytest.yml?logo=github&label=pytest)](https://github.com/d-chris/pandas_fuzz/actions/workflows/pytest.yml)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fd-chris.github.io%2Fpandas_fuzz&up_message=pdoc&logo=github&label=documentation)](https://d-chris.github.io/pandas_fuzz)
[![GitHub tag (with filter)](https://img.shields.io/github/v/tag/d-chris/pandas_fuzz?logo=github&label=github)](https://github.com/d-chris/pandas_fuzz)
[![codecov](https://codecov.io/gh/d-chris/pandas_fuzz/graph/badge.svg?token=XLHILYJB00)](https://codecov.io/gh/d-chris/pandas_fuzz)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](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

[![PyPI - pandas](https://img.shields.io/pypi/v/pandas?logo=pandas&logoColor=white&label=pandas)](https://pypi.org/project/pandas/)
[![PyPI - Version](https://img.shields.io/pypi/v/rapidfuzz?logo=pypi&logoColor=white&label=rapidfuzz)](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[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pandas_fuzz)](https://pypi.org/project/pandas_fuzz/)\n[![PyPI](https://img.shields.io/pypi/v/pandas_fuzz)](https://pypi.org/project/pandas_fuzz/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pandas_fuzz)](https://pypi.org/project/pandas_fuzz/)\n[![PyPI - License](https://img.shields.io/pypi/l/pandas_fuzz)](https://raw.githubusercontent.com/d-chris/pandas_fuzz/main/LICENSE)\n[![GitHub Workflow Test)](https://img.shields.io/github/actions/workflow/status/d-chris/pandas_fuzz/pytest.yml?logo=github&label=pytest)](https://github.com/d-chris/pandas_fuzz/actions/workflows/pytest.yml)\n[![Website](https://img.shields.io/website?url=https%3A%2F%2Fd-chris.github.io%2Fpandas_fuzz&up_message=pdoc&logo=github&label=documentation)](https://d-chris.github.io/pandas_fuzz)\n[![GitHub tag (with filter)](https://img.shields.io/github/v/tag/d-chris/pandas_fuzz?logo=github&label=github)](https://github.com/d-chris/pandas_fuzz)\n[![codecov](https://codecov.io/gh/d-chris/pandas_fuzz/graph/badge.svg?token=XLHILYJB00)](https://codecov.io/gh/d-chris/pandas_fuzz)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](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[![PyPI - pandas](https://img.shields.io/pypi/v/pandas?logo=pandas&logoColor=white&label=pandas)](https://pypi.org/project/pandas/)\n[![PyPI - Version](https://img.shields.io/pypi/v/rapidfuzz?logo=pypi&logoColor=white&label=rapidfuzz)](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"
}
        
Elapsed time: 0.34313s