Woodwork is a library that helps with data typing of 2-dimensional tabular data structures.

It provides a DataTable object, which contains the physical, logical, and semantic data types. It can be used with Featuretools, EvalML, and general machine learning applications where logical and semantic typing information is important.

Woodwork provides simple interfaces for adding and updating logical and semantic typing information, as well as selecting data columns based on the types.

Quick Start

Below is an example of using a Woodwork DataTable to automatically infer the Logical Types for a data structure and select columns with specific types.

import woodwork as ww

data = ww.demo.load_retail(nrows=100, return_dataframe=True)

dt = ww.DataTable(data, name="retail")
Physical Type Logical Type Semantic Tag(s)
Data Column
order_product_id Int64 WholeNumber {numeric}
order_id Int64 WholeNumber {numeric}
product_id category Categorical {category}
description string NaturalLanguage {}
quantity Int64 WholeNumber {numeric}
order_date datetime64[ns] Datetime {}
unit_price float64 Double {numeric}
customer_name string NaturalLanguage {}
country string NaturalLanguage {}
total float64 Double {numeric}
cancelled boolean Boolean {}
filtered_dt = dt.select(include=['numeric', 'Boolean'])
total order_id quantity cancelled order_product_id unit_price
0 25.245 536365 6 False 0 4.2075
1 33.561 536365 6 False 1 5.5935
2 36.300 536365 8 False 2 4.5375
3 33.561 536365 6 False 3 5.5935
4 33.561 536365 6 False 4 5.5935