Skip to main content

Wrangle your data into shape with AI

Project description

Wrangles

Full documentation available at wrangles.io.

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.

pip install wrangles

Once installed, import the package into your code.

import wrangles

Authentication

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

Create a WrangleWorks account: Register

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.

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.

# 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
import wrangles
wrangles.recipe.run('recipe.wrgl.yml')
# TERMINAL
wrangles.recipe recipe.wrgl.yml

Recipe

# 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wrangles-1.19.1.tar.gz (153.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wrangles-1.19.1-py3-none-any.whl (179.5 kB view details)

Uploaded Python 3

File details

Details for the file wrangles-1.19.1.tar.gz.

File metadata

  • Download URL: wrangles-1.19.1.tar.gz
  • Upload date:
  • Size: 153.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for wrangles-1.19.1.tar.gz
Algorithm Hash digest
SHA256 b9b7afddf5f29406cc43e04c58b1f5f0e50f61b22f6f50e015e44acad2d17f20
MD5 a151e6f8952710beb2f6e8c45433778f
BLAKE2b-256 64f376c2498007b082250ee359a191c5b15e5c9c99a0e20f2e3c8d5e3c52c0dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for wrangles-1.19.1.tar.gz:

Publisher: publish-tagged.yml on wrangleworks/WranglesPY

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wrangles-1.19.1-py3-none-any.whl.

File metadata

  • Download URL: wrangles-1.19.1-py3-none-any.whl
  • Upload date:
  • Size: 179.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for wrangles-1.19.1-py3-none-any.whl
Algorithm Hash digest
SHA256 453c04d802d6cefcc84d210adc8d6319fe0c12ca104ec8f4acd41a0f16e763fe
MD5 ab777f694be89a47396d4cd9c560a776
BLAKE2b-256 4a75376183c536a56b7bb6f5d4ce69a6f86e1d95ee2b753edaf408fb9afc1b39

See more details on using hashes here.

Provenance

The following attestation bundles were made for wrangles-1.19.1-py3-none-any.whl:

Publisher: publish-tagged.yml on wrangleworks/WranglesPY

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page