wrangles


Namewrangles JSON
Version 1.12.0 PyPI version JSON
download
home_pagehttps://github.com/wrangleworks/WranglesPy
SummaryWrangle your data into shape with AI
upload_time2024-10-16 21:41:51
maintainerNone
docs_urlNone
authorWrangleWorks
requires_pythonNone
licenseApache License 2.0
keywords data wrangling
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Wrangles

Full documentation available at [wrangles.io](https://wrangles.io/python).

## What are Wrangles?

Wrangles are a set of modular transformations for data cleaning and enrichment. Each Wrangle is optimized for a particular job, many of which are backed by sophisticated machine learning models.

With Wrangles, you can:
- Extract information from a set of messy descriptions.
- Predict which category items belong to.
- Standardize text data to a desired format.
- Move data from one system to another.
- Much more...

Wrangles are system independent, and allow you to pull data from one system, transform it and push it to another. Wrangles can be incorporated directly into python code, or an automated sequence of wrangles can be run as a recipe.

## Installation

The python package can be installed using [pip](https://pip.pypa.io/en/stable/getting-started/).

```shell
pip install wrangles
```

Once installed, import the package into your code.
```python
import wrangles
```

## Authentication
Some Wrangles use cloud based machine learning models. To use them a WrangleWorks account is required.

> Create a WrangleWorks account: [Register](https://sso.wrangle.works/auth/realms/wrwx/protocol/openid-connect/registrations?client_id=account&response_type=code&scope=openid%20email&redirect_uri=https://sso.wrangle.works/auth/realms/wrwx/account/#/)

There are two ways to provide the credentials:

### Environment Variables
The credentials can be saved as the environment variables:

- `WRANGLES_USER`
- `WRANGLES_PASSWORD`

### Method
The credentials can be provided within the python code using the authenticate method, prior to calling other functions.
```python
wrangles.authenticate('<user>', '<password>')
```

## Usage

### Functions

Wrangles can be used as functions, directly incorporated into python code.

Wrangles broadly accept a single input string, or a list of strings. If a list is provided, the results will be returned in an equivalent list in the same order and length as the original.

```python
# Extract alphanumeric codes from a free text strings - e.g. find all part numbers in a set of product description
>>> import wrangles

>>> wrangles.extract.codes('replacement part ABCD1234ZZ')
['ABCD1234ZZ']

>>> wrangles.extract.codes(['replacement part ABCD1234ZZ', 'NNN555BBB this one has two XYZ789'])
[
    ['ABCD1234ZZ'],
    ['NNN555BBB', 'XYZ789']
]
```

### Recipes

Recipes are written in YAML and allow a series of Wrangles to be run as an automated sequence.

Recipes can be triggered either from python code or a terminal command.
#### Run
```python
# PYTHON
import wrangles
wrangles.recipe.run('recipe.wrgl.yml')
```
```bash
# TERMINAL
wrangles.recipe recipe.wrgl.yml
```
#### Recipe
```yaml
# file: recipe.wrgl.yml
# ---
# Convert a CSV file to an Excel file
# and change the case of a column.
read:
  - file:
      name: file.csv

wrangles:
  - convert.case:
      input: my column
      case: upper

write:
  - file:
      name: file.xlsx
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wrangleworks/WranglesPy",
    "name": "wrangles",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "data, wrangling",
    "author": "WrangleWorks",
    "author_email": "chris@wrangleworks.com",
    "download_url": "https://files.pythonhosted.org/packages/09/dd/a20e272cc704de1a0ce74aedd460b65b38d1455c3cb285e7c421bf24639e/wrangles-1.12.0.tar.gz",
    "platform": null,
    "description": "# Wrangles\n\nFull documentation available at [wrangles.io](https://wrangles.io/python).\n\n## What are Wrangles?\n\nWrangles are a set of modular transformations for data cleaning and enrichment. Each Wrangle is optimized for a particular job, many of which are backed by sophisticated machine learning models.\n\nWith Wrangles, you can:\n- Extract information from a set of messy descriptions.\n- Predict which category items belong to.\n- Standardize text data to a desired format.\n- Move data from one system to another.\n- Much more...\n\nWrangles are system independent, and allow you to pull data from one system, transform it and push it to another. Wrangles can be incorporated directly into python code, or an automated sequence of wrangles can be run as a recipe.\n\n## Installation\n\nThe python package can be installed using [pip](https://pip.pypa.io/en/stable/getting-started/).\n\n```shell\npip install wrangles\n```\n\nOnce installed, import the package into your code.\n```python\nimport wrangles\n```\n\n## Authentication\nSome Wrangles use cloud based machine learning models. To use them a WrangleWorks account is required.\n\n> Create a WrangleWorks account: [Register](https://sso.wrangle.works/auth/realms/wrwx/protocol/openid-connect/registrations?client_id=account&response_type=code&scope=openid%20email&redirect_uri=https://sso.wrangle.works/auth/realms/wrwx/account/#/)\n\nThere are two ways to provide the credentials:\n\n### Environment Variables\nThe credentials can be saved as the environment variables:\n\n- `WRANGLES_USER`\n- `WRANGLES_PASSWORD`\n\n### Method\nThe credentials can be provided within the python code using the authenticate method, prior to calling other functions.\n```python\nwrangles.authenticate('<user>', '<password>')\n```\n\n## Usage\n\n### Functions\n\nWrangles can be used as functions, directly incorporated into python code.\n\nWrangles broadly accept a single input string, or a list of strings. If a list is provided, the results will be returned in an equivalent list in the same order and length as the original.\n\n```python\n# Extract alphanumeric codes from a free text strings - e.g. find all part numbers in a set of product description\n>>> import wrangles\n\n>>> wrangles.extract.codes('replacement part ABCD1234ZZ')\n['ABCD1234ZZ']\n\n>>> wrangles.extract.codes(['replacement part ABCD1234ZZ', 'NNN555BBB this one has two XYZ789'])\n[\n    ['ABCD1234ZZ'],\n    ['NNN555BBB', 'XYZ789']\n]\n```\n\n### Recipes\n\nRecipes are written in YAML and allow a series of Wrangles to be run as an automated sequence.\n\nRecipes can be triggered either from python code or a terminal command.\n#### Run\n```python\n# PYTHON\nimport wrangles\nwrangles.recipe.run('recipe.wrgl.yml')\n```\n```bash\n# TERMINAL\nwrangles.recipe recipe.wrgl.yml\n```\n#### Recipe\n```yaml\n# file: recipe.wrgl.yml\n# ---\n# Convert a CSV file to an Excel file\n# and change the case of a column.\nread:\n  - file:\n      name: file.csv\n\nwrangles:\n  - convert.case:\n      input: my column\n      case: upper\n\nwrite:\n  - file:\n      name: file.xlsx\n```\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Wrangle your data into shape with AI",
    "version": "1.12.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/wrangleworks/WranglesPy/issues",
        "Documentation": "https://wrangles.io/python",
        "Homepage": "https://github.com/wrangleworks/WranglesPy",
        "Source Code": "https://github.com/wrangleworks/WranglesPy"
    },
    "split_keywords": [
        "data",
        " wrangling"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c94c03057dd841cfd0f326fbfcc2a5f15c56e4e97493dd2b5eb943b74b74e4be",
                "md5": "692edfed5e922ffd5b7b4c719c89846a",
                "sha256": "224a13df95f52fed624bb763e78a3fb8817d50665b87d3c2f400223e1fde3244"
            },
            "downloads": -1,
            "filename": "wrangles-1.12.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "692edfed5e922ffd5b7b4c719c89846a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 120150,
            "upload_time": "2024-10-16T21:41:50",
            "upload_time_iso_8601": "2024-10-16T21:41:50.337852Z",
            "url": "https://files.pythonhosted.org/packages/c9/4c/03057dd841cfd0f326fbfcc2a5f15c56e4e97493dd2b5eb943b74b74e4be/wrangles-1.12.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09dda20e272cc704de1a0ce74aedd460b65b38d1455c3cb285e7c421bf24639e",
                "md5": "1ea2cbc9b365b65d55847e7d1383400d",
                "sha256": "c0b94c4cdcef5399ff54b7f5d593b6edf54da35f928de0aeaa6f321745b95c00"
            },
            "downloads": -1,
            "filename": "wrangles-1.12.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1ea2cbc9b365b65d55847e7d1383400d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 97371,
            "upload_time": "2024-10-16T21:41:51",
            "upload_time_iso_8601": "2024-10-16T21:41:51.559805Z",
            "url": "https://files.pythonhosted.org/packages/09/dd/a20e272cc704de1a0ce74aedd460b65b38d1455c3cb285e7c421bf24639e/wrangles-1.12.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-16 21:41:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wrangleworks",
    "github_project": "WranglesPy",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "wrangles"
}
        
Elapsed time: 0.37078s