Skip to main content

a two-dimensional data object with labeled axes and typing information

Project description

Woodwork

Codecov Documentation Status PyPI Version Anaconda Version PyPI Downloads


Woodwork provides you with a common DataTable object to use with Featuretools, EvalML, and general ML. A DataTable object contains the physical, logical, and semantic data types present in the data. In addition, it can store metadata about the data.

Installation

Install with pip:

python -m pip install woodwork

or from the conda-forge channel on conda:

conda install -c conda-forge woodwork

Example

Below is an example of using Woodwork. In this example, a sample dataset of order items is used to create a Woodwork DataTable, specifying the LogicalType for three of the columns.

import woodwork as ww

data = ww.demo.load_retail(nrows=100, return_dataframe=True)
dt = ww.DataTable(data, name='retail')
dt.set_logical_types({
    'quantity': 'Double',
    'customer_name': 'Categorical',
    'country': 'Categorical'
})
dt.types
                Physical Type     Logical Type Semantic Tag(s)
Data Column
order_id                Int64      WholeNumber       {numeric}
product_id           category      Categorical      {category}
description            string  NaturalLanguage              {}
quantity              float64           Double       {numeric}
order_date     datetime64[ns]         Datetime              {}
unit_price            float64           Double       {numeric}
customer_name        category      Categorical      {category}
country              category      Categorical      {category}
total                 float64           Double       {numeric}

We now have created a Woodwork DataTable with the specified logical types assigned. For columns that did not have a specified logical type value, Woodwork has automatically inferred the logical type based on the underlying data. Additionally, Woodwork has automatically assigned semantic tags to some of the columns, based on the inferred or assigned logical type.

If we wanted to do further analysis on only the columns in this table that have a logical type of Boolean or a semantic tag of numeric we can simply select those columns and access a dataframe containing just those columns:

filtered_df = dt.select(include=['Boolean', 'numeric']).to_dataframe()
filtered_df
    order_id  quantity  unit_price   total  cancelled
0     536365       6.0      4.2075  25.245      False
1     536365       6.0      5.5935  33.561      False
2     536365       8.0      4.5375  36.300      False
3     536365       6.0      5.5935  33.561      False
4     536365       6.0      5.5935  33.561      False
..       ...       ...         ...     ...        ...
95    536378       6.0      4.2075  25.245      False
96    536378     120.0      0.6930  83.160      False
97    536378      24.0      0.9075  21.780      False
98    536378      24.0      0.9075  21.780      False
99    536378      24.0      0.9075  21.780      False

As you can see, Woodwork makes it easy to manage typing information for your data, and provides simple interfaces to access only the data you need based on the logical types or semantic tags. Please refer to the Woodwork documentation for more detail on working with Woodwork tables.

Built at Alteryx Innovation Labs

Alteryx Innovation Labs

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

woodwork-0.0.5.tar.gz (54.2 kB view details)

Uploaded Source

Built Distribution

woodwork-0.0.5-py3-none-any.whl (63.8 kB view details)

Uploaded Python 3

File details

Details for the file woodwork-0.0.5.tar.gz.

File metadata

  • Download URL: woodwork-0.0.5.tar.gz
  • Upload date:
  • Size: 54.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9

File hashes

Hashes for woodwork-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2d0856a8b5b44b0cd8674663466d9194850c1b33832ae49c224ca8bc101e5f4a
MD5 09375fc56cf611b1f0cf6fdba69a4150
BLAKE2b-256 b1f780a86b73c10e99b5b5de14544769b33f9fb76886e7878409e5e7cc42bb93

See more details on using hashes here.

File details

Details for the file woodwork-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: woodwork-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 63.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.9

File hashes

Hashes for woodwork-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 efc51fcd751ea7758fddb608c4fdf7a629eac44271d1648b42d46d8f2204dbf0
MD5 ba0f0264da0669150a38021a0e7b31d2
BLAKE2b-256 2448e90caee8bba15d429cc0fdc01055cef71f9ee5eef5ef3d4f964d68a5c123

See more details on using hashes here.

Supported by

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