- featuretools.demo.load_retail(id='demo_retail_data', nrows=None, return_single_table=False)¶
Returns the retail entityset example. The original dataset can be found here.
We have also made some modifications to the data. We changed the column names, converted the
customer_idto a unique fake
customer_name, dropped duplicates, added columns for
cancelledand converted amounts from GBP to USD. You can download the modified CSV in gz compressed (7 MB) or uncompressed (43 MB) formats.
id (str) – Id to assign to EntitySet.
nrows (int) – Number of rows to load of the underlying CSV. If None, load all.
return_single_table (bool) – If True, return a CSV rather than an EntitySet. Default is False.
In : import featuretools as ft In : es = ft.demo.load_retail() In : es Out: Entityset: demo_retail_data DataFrames: orders (shape = [22190, 3]) products (shape = [3684, 3]) customers (shape = [4372, 2]) order_products (shape = [401704, 7])
Load in subset of data
In : es = ft.demo.load_retail(nrows=1000) In : es Out: Entityset: demo_retail_data DataFrames: orders (shape = [67, 5]) products (shape = [606, 3]) customers (shape = [50, 2]) order_products (shape = [1000, 7])