In [ ]:
In [2]:
import pandas as pd
import numpy as np
In [3]:
%run -i readData.py
Shape aisles: (134, 2)
Shape departments: (21, 2)
Shape order_products__prior: (32434489, 4)
Shape order_products__train: (1384617, 4)
Shape orders: (3421083, 7)
Shape products: (49688, 4)
In [14]:
allDsCombine = [aisles, departments, order_products__prior,order_products__train, orders, products]
In [30]:
#print all datasets
for ds in allDsCombine:
print(ds.head())
print("-"*100)
aisle_id aisle
0 1 prepared soups salads
1 2 specialty cheeses
2 3 energy granola bars
3 4 instant foods
4 5 marinades meat preparation
----------------------------------------------------------------------------------------------------
department_id department
0 1 frozen
1 2 other
2 3 bakery
3 4 produce
4 5 alcohol
----------------------------------------------------------------------------------------------------
order_id product_id add_to_cart_order reordered
0 2 33120 1 1
1 2 28985 2 1
2 2 9327 3 0
3 2 45918 4 1
4 2 30035 5 0
----------------------------------------------------------------------------------------------------
order_id product_id add_to_cart_order reordered
0 1 49302 1 1
1 1 11109 2 1
2 1 10246 3 0
3 1 49683 4 0
4 1 43633 5 1
----------------------------------------------------------------------------------------------------
order_id user_id eval_set order_number order_dow order_hour_of_day \
0 2539329 1 prior 1 2 8
1 2398795 1 prior 2 3 7
2 473747 1 prior 3 3 12
3 2254736 1 prior 4 4 7
4 431534 1 prior 5 4 15
days_since_prior_order
0 NaN
1 15.0
2 21.0
3 29.0
4 28.0
----------------------------------------------------------------------------------------------------
product_id product_name aisle_id \
0 1 Chocolate Sandwich Cookies 61
1 2 All-Seasons Salt 104
2 3 Robust Golden Unsweetened Oolong Tea 94
3 4 Smart Ones Classic Favorites Mini Rigatoni Wit... 38
4 5 Green Chile Anytime Sauce 5
department_id
0 19
1 13
2 7
3 1
4 13
----------------------------------------------------------------------------------------------------
In [ ]:
Content source: jakobbs/instacart
Similar notebooks: