woodwork


Namewoodwork JSON
Version 0.28.0 PyPI version JSON
download
home_page
Summarya data typing library for machine learning
upload_time2024-02-06 19:40:39
maintainer
docs_urlNone
author
requires_python<4,>=3.9
licenseBSD 3-Clause License Copyright (c) 2019, Alteryx, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords data science machine learning typing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center"><img width=50% src="https://alteryx-oss-web-images.s3.amazonaws.com/woodwork.svg" alt="Woodwork" /></p>
<p align="center">
    <a href="https://github.com/alteryx/woodwork/actions/workflows/tests_with_latest_deps.yaml" alt="Tests" target="_blank">
        <img src="https://github.com/alteryx/woodwork/actions/workflows/tests_with_latest_deps.yaml/badge.svg?branch=main" alt="Tests" />
    </a>
    <a href="https://codecov.io/gh/alteryx/woodwork">
        <img src="https://codecov.io/gh/alteryx/woodwork/branch/main/graph/badge.svg?token=KJCKMREBDP"/>
    </a>
    <a href="https://woodwork.alteryx.com/en/latest/?badge=stable" target="_blank">
        <img src="https://readthedocs.com/projects/feature-labs-inc-datatables/badge/?version=stable" alt="Documentation Status" />
    </a>
    <a href="https://badge.fury.io/py/woodwork" target="_blank">
        <img src="https://badge.fury.io/py/woodwork.svg?maxAge=2592000" alt="PyPI Version" />
    </a>
    <a href="https://anaconda.org/conda-forge/woodwork" target="_blank">
        <img src="https://anaconda.org/conda-forge/woodwork/badges/version.svg" alt="Anaconda Version" />
    </a>
    <a href="https://pepy.tech/project/woodwork" target="_blank">
        <img src="https://static.pepy.tech/badge/woodwork/month" alt="PyPI Downloads" />
    </a>
</p>
<hr>

Woodwork provides a common typing namespace for using your existing DataFrames in Featuretools, EvalML, and general ML. A Woodwork
DataFrame stores the physical, logical, and semantic data types present in the data. In addition, it can store metadata about the data, allowing you to store specific information you might need for your application.

## Installation

Install with pip:

```bash
python -m pip install woodwork
```

or from the conda-forge channel on [conda](https://anaconda.org/conda-forge/woodwork):

```bash
conda install -c conda-forge woodwork
```

### Add-ons
**Update checker** - Receive automatic notifications of new Woodwork releases
```bash
python -m pip install "woodwork[updater]"
```

## Example

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

```python
import pandas as pd
import woodwork as ww

df = pd.read_csv("https://oss.alteryx.com/datasets/online-retail-logs-2018-08-28.csv")
df.ww.init(name='retail')
df.ww.set_types(logical_types={
    'quantity': 'Integer',
    'customer_name': 'PersonFullName',
    'country': 'Categorical',
    'order_id': 'Categorical',
    'description': 'NaturalLanguage',
})
df.ww
```

```
                   Physical Type     Logical Type Semantic Tag(s)
Column
order_id                category      Categorical    ['category']
product_id              category      Categorical    ['category']
description               string  NaturalLanguage              []
quantity                   int64          Integer     ['numeric']
order_date        datetime64[ns]         Datetime              []
unit_price               float64           Double     ['numeric']
customer_name             string   PersonFullName              []
country                 category      Categorical    ['category']
total                    float64           Double     ['numeric']
cancelled                   bool          Boolean              []
```

We now have initialized Woodwork on the DataFrame 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:

```python
filtered_df = df.ww.select(include=['Boolean', 'numeric'])
filtered_df
```

```
    quantity  unit_price   total  cancelled
0          6      4.2075  25.245      False
1          6      5.5935  33.561      False
2          8      4.5375  36.300      False
3          6      5.5935  33.561      False
4          6      5.5935  33.561      False
..       ...         ...     ...        ...
95         6      4.2075  25.245      False
96       120      0.6930  83.160      False
97        24      0.9075  21.780      False
98        24      0.9075  21.780      False
99        24      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](https://woodwork.alteryx.com/) for more detail on working with a Woodwork DataFrame.

## Support
The Woodwork community is happy to provide support to users of Woodwork. Project support can be found in four places depending on the type of question:
1. For usage questions, use [Stack Overflow](https://stackoverflow.com/questions/tagged/woodwork) with the `woodwork` tag.
2. For bugs, issues, or feature requests start a [Github issue](https://github.com/alteryx/woodwork/issues).
3. For discussion regarding development on the core library, use [Slack](https://join.slack.com/t/alteryx-oss/shared_invite/zt-182tyvuxv-NzIn6eiCEf8TBziuKp0bNA).
4. For everything else, the core developers can be reached by email at open_source_support@alteryx.com

## Built at Alteryx

**Woodwork** is an open source project built by [Alteryx](https://www.alteryx.com). To see the other open source projects we’re working on visit [Alteryx Open Source](https://www.alteryx.com/open-source). If building impactful data science pipelines is important to you or your business, please get in touch.

<p align="center">
  <a href="https://www.alteryx.com/open-source">
    <img src="https://alteryx-oss-web-images.s3.amazonaws.com/OpenSource_Logo-01.png" alt="Alteryx Open Source" width="800"/>
  </a>
</p>

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "woodwork",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<4,>=3.9",
    "maintainer_email": "\"Alteryx, Inc.\" <open_source_support@alteryx.com>",
    "keywords": "data science,machine learning,typing",
    "author": "",
    "author_email": "\"Alteryx, Inc.\" <open_source_support@alteryx.com>",
    "download_url": "https://files.pythonhosted.org/packages/13/ba/b075a2f5fe41c32f76a2f358ca2541ad5edce36626a9741c26825a10534d/woodwork-0.28.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\"><img width=50% src=\"https://alteryx-oss-web-images.s3.amazonaws.com/woodwork.svg\" alt=\"Woodwork\" /></p>\n<p align=\"center\">\n    <a href=\"https://github.com/alteryx/woodwork/actions/workflows/tests_with_latest_deps.yaml\" alt=\"Tests\" target=\"_blank\">\n        <img src=\"https://github.com/alteryx/woodwork/actions/workflows/tests_with_latest_deps.yaml/badge.svg?branch=main\" alt=\"Tests\" />\n    </a>\n    <a href=\"https://codecov.io/gh/alteryx/woodwork\">\n        <img src=\"https://codecov.io/gh/alteryx/woodwork/branch/main/graph/badge.svg?token=KJCKMREBDP\"/>\n    </a>\n    <a href=\"https://woodwork.alteryx.com/en/latest/?badge=stable\" target=\"_blank\">\n        <img src=\"https://readthedocs.com/projects/feature-labs-inc-datatables/badge/?version=stable\" alt=\"Documentation Status\" />\n    </a>\n    <a href=\"https://badge.fury.io/py/woodwork\" target=\"_blank\">\n        <img src=\"https://badge.fury.io/py/woodwork.svg?maxAge=2592000\" alt=\"PyPI Version\" />\n    </a>\n    <a href=\"https://anaconda.org/conda-forge/woodwork\" target=\"_blank\">\n        <img src=\"https://anaconda.org/conda-forge/woodwork/badges/version.svg\" alt=\"Anaconda Version\" />\n    </a>\n    <a href=\"https://pepy.tech/project/woodwork\" target=\"_blank\">\n        <img src=\"https://static.pepy.tech/badge/woodwork/month\" alt=\"PyPI Downloads\" />\n    </a>\n</p>\n<hr>\n\nWoodwork provides a common typing namespace for using your existing DataFrames in Featuretools, EvalML, and general ML. A Woodwork\nDataFrame stores the physical, logical, and semantic data types present in the data. In addition, it can store metadata about the data, allowing you to store specific information you might need for your application.\n\n## Installation\n\nInstall with pip:\n\n```bash\npython -m pip install woodwork\n```\n\nor from the conda-forge channel on [conda](https://anaconda.org/conda-forge/woodwork):\n\n```bash\nconda install -c conda-forge woodwork\n```\n\n### Add-ons\n**Update checker** - Receive automatic notifications of new Woodwork releases\n```bash\npython -m pip install \"woodwork[updater]\"\n```\n\n## Example\n\nBelow is an example of using Woodwork. In this example, a sample dataset of order items is used to create a Woodwork `DataFrame`, specifying the `LogicalType` for five of the columns.\n\n```python\nimport pandas as pd\nimport woodwork as ww\n\ndf = pd.read_csv(\"https://oss.alteryx.com/datasets/online-retail-logs-2018-08-28.csv\")\ndf.ww.init(name='retail')\ndf.ww.set_types(logical_types={\n    'quantity': 'Integer',\n    'customer_name': 'PersonFullName',\n    'country': 'Categorical',\n    'order_id': 'Categorical',\n    'description': 'NaturalLanguage',\n})\ndf.ww\n```\n\n```\n                   Physical Type     Logical Type Semantic Tag(s)\nColumn\norder_id                category      Categorical    ['category']\nproduct_id              category      Categorical    ['category']\ndescription               string  NaturalLanguage              []\nquantity                   int64          Integer     ['numeric']\norder_date        datetime64[ns]         Datetime              []\nunit_price               float64           Double     ['numeric']\ncustomer_name             string   PersonFullName              []\ncountry                 category      Categorical    ['category']\ntotal                    float64           Double     ['numeric']\ncancelled                   bool          Boolean              []\n```\n\nWe now have initialized Woodwork on the DataFrame 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.\n\nIf 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:\n\n```python\nfiltered_df = df.ww.select(include=['Boolean', 'numeric'])\nfiltered_df\n```\n\n```\n    quantity  unit_price   total  cancelled\n0          6      4.2075  25.245      False\n1          6      5.5935  33.561      False\n2          8      4.5375  36.300      False\n3          6      5.5935  33.561      False\n4          6      5.5935  33.561      False\n..       ...         ...     ...        ...\n95         6      4.2075  25.245      False\n96       120      0.6930  83.160      False\n97        24      0.9075  21.780      False\n98        24      0.9075  21.780      False\n99        24      0.9075  21.780      False\n```\n\nAs 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](https://woodwork.alteryx.com/) for more detail on working with a Woodwork DataFrame.\n\n## Support\nThe Woodwork community is happy to provide support to users of Woodwork. Project support can be found in four places depending on the type of question:\n1. For usage questions, use [Stack Overflow](https://stackoverflow.com/questions/tagged/woodwork) with the `woodwork` tag.\n2. For bugs, issues, or feature requests start a [Github issue](https://github.com/alteryx/woodwork/issues).\n3. For discussion regarding development on the core library, use [Slack](https://join.slack.com/t/alteryx-oss/shared_invite/zt-182tyvuxv-NzIn6eiCEf8TBziuKp0bNA).\n4. For everything else, the core developers can be reached by email at open_source_support@alteryx.com\n\n## Built at Alteryx\n\n**Woodwork** is an open source project built by [Alteryx](https://www.alteryx.com). To see the other open source projects we\u2019re working on visit [Alteryx Open Source](https://www.alteryx.com/open-source). If building impactful data science pipelines is important to you or your business, please get in touch.\n\n<p align=\"center\">\n  <a href=\"https://www.alteryx.com/open-source\">\n    <img src=\"https://alteryx-oss-web-images.s3.amazonaws.com/OpenSource_Logo-01.png\" alt=\"Alteryx Open Source\" width=\"800\"/>\n  </a>\n</p>\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2019, Alteryx, Inc. All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "a data typing library for machine learning",
    "version": "0.28.0",
    "project_urls": {
        "Changes": "https://woodwork.alteryx.com/en/latest/release_notes.html",
        "Chat": "https://join.slack.com/t/alteryx-oss/shared_invite/zt-182tyvuxv-NzIn6eiCEf8TBziuKp0bNA",
        "Documentation": "https://woodwork.alteryx.com",
        "Issue Tracker": "https://github.com/alteryx/woodwork/issues",
        "Source Code": "https://github.com/alteryx/woodwork/",
        "Twitter": "https://twitter.com/alteryxoss"
    },
    "split_keywords": [
        "data science",
        "machine learning",
        "typing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8576f04c73667a442b49f12374aec1d7526de31ab1ae74e79f06aff0e010ec28",
                "md5": "3f1ddefa454f25e99550a8763955c14a",
                "sha256": "401fd2948530f7de100fbf4b25f025ebc04df97ca264b7f6ba4efbcb97300d1b"
            },
            "downloads": -1,
            "filename": "woodwork-0.28.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3f1ddefa454f25e99550a8763955c14a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.9",
            "size": 236370,
            "upload_time": "2024-02-06T19:40:36",
            "upload_time_iso_8601": "2024-02-06T19:40:36.283723Z",
            "url": "https://files.pythonhosted.org/packages/85/76/f04c73667a442b49f12374aec1d7526de31ab1ae74e79f06aff0e010ec28/woodwork-0.28.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13bab075a2f5fe41c32f76a2f358ca2541ad5edce36626a9741c26825a10534d",
                "md5": "bf47cb67091cf02848c91b59c8047e0f",
                "sha256": "0a8db4b1c7822b01c9243fbf66819943ecc4a118e5e98424a12a9b9800d42bf0"
            },
            "downloads": -1,
            "filename": "woodwork-0.28.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bf47cb67091cf02848c91b59c8047e0f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.9",
            "size": 192343,
            "upload_time": "2024-02-06T19:40:39",
            "upload_time_iso_8601": "2024-02-06T19:40:39.621440Z",
            "url": "https://files.pythonhosted.org/packages/13/ba/b075a2f5fe41c32f76a2f358ca2541ad5edce36626a9741c26825a10534d/woodwork-0.28.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-06 19:40:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "alteryx",
    "github_project": "woodwork",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "woodwork"
}
        
Elapsed time: 0.20037s