Code
import sys
sys.path.insert(0 , "." )
import os
from datetime import date
from pathlib import Path
import polars as pl
import ibis
from ibis import _
from python.db_connection import get_db_connection
from python.google_sheets import google_sheets_env, google_can_write, google_write_sheet
from great_tables import GT
# Connect to database
con = get_db_connection()
# =============================================================================
# DATE CONSTANTS
# =============================================================================
# Event time T = 2025-01-28 (first day of CNY break)
# Rush window: [T-14, T-1] = 14 days before CNY break
# Baseline: 8 weeks (56 days) prior to and including 2025-01-10
# Gap: Jan 11-13 for supplier coordination
BASELINE_START = "20241116"
BASELINE_END = "20250110"
RUSH_START = "20250114"
RUSH_END = "20250127"
# Baseline is 56 days (8 weeks), divide by 4 to get 2-week equivalent
BASELINE_NORMALIZATION_FACTOR = 4
# =============================================================================
# BASE IBIS TABLES
# =============================================================================
# Delivery tables
sales_orders = con.table("sales_orders" , database= "cosmos_sync" )
sales_order_lines = con.table("sales_order_lines" , database= "cosmos_sync" )
customers = con.table("customers" , database= "cosmos_sync" )
products = con.table("product_information" , database= "cosmos_sync" )
# Retail tables
retail_sales = con.table("retail_sales" , database= "cosmos_sync" )
retail_sale_lines = con.table("retail_sale_lines" , database= "cosmos_sync" )
# Store lookup (exclude 00 - warehouse)
STORE_NAMES = {
"01" : "Pingtung City" ,
"02" : "Chaozhou" ,
"03" : "Hengchun" ,
"04" : "Donggang" ,
}
# =============================================================================
# EXCLUDED ITEMS
# =============================================================================
# Exclude special order items (product names ending with #)
excluded_items = (
products
.filter (_.product_name.endswith("#" ))
.select("product_code" )
.to_polars()
["product_code" ]
.to_list()
)
print (f"Excluded special order items (# suffix): { len (excluded_items)} " )
Excluded special order items (# suffix): 6179
Analysis Overview
This analysis calculates SKU-level lift factors to prepare for the CNY 2026 rush. We compare:
Baseline Period : Nov 16, 2024 - Jan 10, 2025 (8 weeks, normalized to 2 weeks)
Rush Window : Jan 14-27, 2025 (2 weeks before CNY break)
Note : Special order items (products with # suffix in name) are excluded from this analysis.
Baseline Period Calculations (Ibis)
Code
# Customer-SKU quantity during baseline period using Ibis
# Filter out special order items (# suffix)
baseline_customer_sku_ibis = (
sales_orders
.filter (_.confirmed_code == "Y" )
.filter (_.order_date >= BASELINE_START)
.filter (_.order_date <= BASELINE_END)
.join(
sales_order_lines,
["order_type" , "order_number" ]
)
.filter (~ _.item_code.isin(excluded_items))
.group_by(["customer_code" , "item_code" ])
.agg(
total_qty= _.quantity.cast("float64" ).sum (),
total_revenue= _.pretax_subtotal.cast("float64" ).sum ()
)
.to_polars()
)
# Normalize to 2-week equivalent
baseline_customer_sku = baseline_customer_sku_ibis.with_columns([
(pl.col("total_qty" ) / BASELINE_NORMALIZATION_FACTOR).alias("baseline_qty" ),
(pl.col("total_revenue" ) / BASELINE_NORMALIZATION_FACTOR).alias("baseline_revenue" )
]).select(["customer_code" , "item_code" , "baseline_qty" , "baseline_revenue" ])
print (f"Baseline customer-SKU pairs: { len (baseline_customer_sku):,} " )
print (f"Unique customers in baseline: { baseline_customer_sku['customer_code' ]. n_unique():,} " )
Baseline customer-SKU pairs: 15,970
Unique customers in baseline: 1,421
Code
# Customer total revenue during baseline period (for revenue lift)
baseline_customer_revenue = (
baseline_customer_sku
.group_by("customer_code" )
.agg(pl.col("baseline_revenue" ).sum ().alias("baseline_total_revenue" ))
)
print (f"Baseline customers with revenue: { len (baseline_customer_revenue):,} " )
Baseline customers with revenue: 1,421
Rush Period Calculations (Ibis)
Code
# Customer-SKU quantity during rush period using Ibis
# Filter out special order items (# suffix)
rush_customer_sku = (
sales_orders
.filter (_.confirmed_code == "Y" )
.filter (_.order_date >= RUSH_START)
.filter (_.order_date <= RUSH_END)
.join(
sales_order_lines,
["order_type" , "order_number" ]
)
.filter (~ _.item_code.isin(excluded_items))
.group_by(["customer_code" , "item_code" ])
.agg(
rush_qty= _.quantity.cast("float64" ).sum (),
rush_revenue= _.pretax_subtotal.cast("float64" ).sum ()
)
.to_polars()
)
print (f"Rush customer-SKU pairs: { len (rush_customer_sku):,} " )
print (f"Unique customers in rush: { rush_customer_sku['customer_code' ]. n_unique():,} " )
Rush customer-SKU pairs: 10,219
Unique customers in rush: 1,136
Code
# Customer total revenue during rush period
rush_customer_revenue = (
rush_customer_sku
.group_by("customer_code" )
.agg(pl.col("rush_revenue" ).sum ().alias("rush_total_revenue" ))
)
print (f"Rush customers with revenue: { len (rush_customer_revenue):,} " )
Rush customers with revenue: 1,136
Lift Calculations
Code
# Identify customers active in baseline vs rush-only
baseline_customers = set (baseline_customer_revenue["customer_code" ].to_list())
rush_customers = set (rush_customer_revenue["customer_code" ].to_list())
# Customers active in baseline (can calculate lift)
baseline_active_customers = baseline_customers & rush_customers
# Rush-only customers (no lift calculation)
rush_only_customers = rush_customers - baseline_customers
print (f"Customers active in both periods: { len (baseline_active_customers):,} " )
print (f"Rush-only customers (new): { len (rush_only_customers):,} " )
Customers active in both periods: 1,068
Rush-only customers (new): 68
Code
# Join baseline and rush at customer-SKU level
# Only include customers who were active in baseline
customer_sku_lift = (
rush_customer_sku
.filter (pl.col("customer_code" ).is_in(list (baseline_active_customers)))
.join(
baseline_customer_sku,
on= ["customer_code" , "item_code" ],
how= "left"
)
.with_columns([
pl.col("baseline_qty" ).fill_null(0.0 ),
pl.col("baseline_revenue" ).fill_null(0.0 )
])
)
# Calculate lift factor with cap for new SKUs
# If baseline_qty is 0, cap lift at 1.5
customer_sku_lift = customer_sku_lift.with_columns([
pl.when(pl.col("baseline_qty" ) > 0 )
.then(pl.col("rush_qty" ) / pl.col("baseline_qty" ))
.otherwise(pl.lit(1.5 )) # Cap for SKUs not ordered in baseline
.alias("qty_lift_factor" )
])
print (f"Customer-SKU pairs with lift: { len (customer_sku_lift):,} " )
print (f"SKU pairs with capped lift (new in rush): { (customer_sku_lift['baseline_qty' ] == 0 ). sum ():,} " )
Customer-SKU pairs with lift: 9,956
SKU pairs with capped lift (new in rush): 1,493
Code
# Customer-level revenue lift
customer_revenue_lift = (
rush_customer_revenue
.filter (pl.col("customer_code" ).is_in(list (baseline_active_customers)))
.join(
baseline_customer_revenue,
on= "customer_code" ,
how= "left"
)
.with_columns([
(pl.col("rush_total_revenue" ) / pl.col("baseline_total_revenue" )).alias("revenue_lift_factor" )
])
)
print (f"Customers with revenue lift: { len (customer_revenue_lift):,} " )
Customers with revenue lift: 1,068
Code
# Rush-only customers data
rush_only_data = (
rush_customer_revenue
.filter (pl.col("customer_code" ).is_in(list (rush_only_customers)))
)
rush_only_customer_count = len (rush_only_data)
rush_only_total_revenue = rush_only_data["rush_total_revenue" ].sum ()
print (f"Rush-only customers: { rush_only_customer_count:,} " )
print (f"Rush-only total revenue: TWD { rush_only_total_revenue:,.0f} " )
Rush-only customers: 68
Rush-only total revenue: TWD 384,538
Results
Code
# Load lookup tables for display
customers_lookup = (
customers
.select("customer_code" , "trade_name" , "delivery_route" )
.to_polars()
)
products_lookup = (
products
.select(product_code= "product_code" , product_name= "product_name" )
.to_polars()
.rename({"product_code" : "item_code" })
)
Customer-SKU Lift Table (Sample of 10 Customers)
Code
# Select 10 sample customers with meaningful lift data
# Choose customers with both baseline and rush activity
sample_customers = (
customer_revenue_lift
.filter (pl.col("baseline_total_revenue" ) > 0 )
.filter (pl.col("rush_total_revenue" ) > 0 )
.sort("rush_total_revenue" , descending= True )
.head(10 )
["customer_code" ]
.to_list()
)
print (f"Selected { len (sample_customers)} sample customers for display" )
Selected 10 sample customers for display
Code
# Customer-SKU lift table for sample customers with names
sample_sku_lift = (
customer_sku_lift
.filter (pl.col("customer_code" ).is_in(sample_customers))
.join(customers_lookup, on= "customer_code" , how= "left" )
.join(products_lookup, on= "item_code" , how= "left" )
.select(["customer_code" , "trade_name" , "item_code" , "product_name" ,
"baseline_qty" , "rush_qty" , "qty_lift_factor" ])
.sort(["customer_code" , "qty_lift_factor" ], descending= [False , True ])
)
(
GT(sample_sku_lift)
.tab_header(
title= "Customer-SKU Quantity Lift (Ibis)" ,
subtitle= "Sample of 10 customers, all SKUs"
)
.fmt_number("baseline_qty" , decimals= 1 )
.fmt_number("rush_qty" , decimals= 1 )
.fmt_number("qty_lift_factor" , decimals= 2 )
.cols_label(
customer_code= "Customer Code" ,
trade_name= "Customer Name" ,
item_code= "SKU" ,
product_name= "Product Name" ,
baseline_qty= "Baseline Qty (2wk)" ,
rush_qty= "Rush Qty" ,
qty_lift_factor= "Lift Factor"
)
)
Sample of 10 customers, all SKUs
0190012
宵歸暝-屏東總店
53056
冷凍熟鍋貼(禾)1500g(約50粒).
1.8
24.0
13.71
0190012
宵歸暝-屏東總店
54061
強匠卡拉雞腿堡(辣味)10片.
2.2
30.0
13.33
0190012
宵歸暝-屏東總店
53103
乳酪餅(良晟) 14*14(15片)
2.0
24.0
12.00
0190012
宵歸暝-屏東總店
51130
香雞城小肉豆1K.
6.8
72.0
10.67
0190012
宵歸暝-屏東總店
54060
強匠卡拉雞腿堡(原味)10片.
3.5
30.0
8.57
0190012
宵歸暝-屏東總店
51401
吉康燻雞肉片1k
2.5
20.0
8.00
0190012
宵歸暝-屏東總店
53027
紅龍雞塊 1K.
8.2
50.0
6.06
0190012
宵歸暝-屏東總店
54056
香酥蛋餅(藍袋)30入
10.0
60.0
6.00
0190012
宵歸暝-屏東總店
51438
家州黑胡椒里肌豬排(白盤)20片
3.0
18.0
6.00
0190012
宵歸暝-屏東總店
59127
主廚漢堡肉 20片
1.2
6.0
4.80
0190012
宵歸暝-屏東總店
53043
炸大熱狗25支
1.5
7.0
4.67
0190012
宵歸暝-屏東總店
51518
8吋原味墨西哥薄餅45g*12片
15.0
60.0
4.00
0190012
宵歸暝-屏東總店
44062
愛心屋韓式泡菜3K
2.0
8.0
4.00
0190012
宵歸暝-屏東總店
23361
肉鬆 3K
0.2
1.0
4.00
0190012
宵歸暝-屏東總店
53045
祥哥冷凍蘿蔔糕12片.(白)
17.5
70.0
4.00
0190012
宵歸暝-屏東總店
51263
麥肯洋蔥圈907g
4.0
16.0
4.00
0190012
宵歸暝-屏東總店
54008
Hisun搖滾雞球1K(約80顆)
4.8
18.0
3.79
0190012
宵歸暝-屏東總店
51172
安美燻腸 1000g.
4.8
17.0
3.58
0190012
宵歸暝-屏東總店
54021
奇津阿在伯手工蔥抓餅10入.
12.0
40.0
3.33
0190012
宵歸暝-屏東總店
51171
安美熱狗50條.
5.2
17.0
3.24
0190012
宵歸暝-屏東總店
51045
味你好冷凍熟水餃(約200粒)
3.8
11.0
2.93
0190012
宵歸暝-屏東總店
51284
馬鈴薯條(HISUN) 2K.
13.5
36.0
2.67
0190012
宵歸暝-屏東總店
41042
四海沙拉(大) 3k
2.2
6.0
2.67
0190012
宵歸暝-屏東總店
51466
Hisun鬆餅(5片)原味
12.0
25.0
2.08
0190012
宵歸暝-屏東總店
41020
紐西蘭安佳奶油(無添加鹽) 454g
1.0
2.0
2.00
0190012
宵歸暝-屏東總店
22428
田園全脂保久純牛乳 1公升.
30.0
60.0
2.00
0190012
宵歸暝-屏東總店
51144
香讚黑椒雞堡50片
0.0
3.0
1.50
0190012
宵歸暝-屏東總店
41032
寶宏pizza絲 1k(雙色).
15.0
10.0
0.67
0370002
劉太太-漁船
11012
品味咖啡 600g.
155.0
700.0
4.52
0610012
繁華市場1.4
43044
HAPPY千島風味沙拉500g
0.2
2.0
8.00
0610012
繁華市場1.4
72229
四杯架 50個
0.2
2.0
8.00
0610012
繁華市場1.4
21140
金杯軟質牛奶巧克力 20K
0.2
1.0
4.00
0610012
繁華市場1.4
51144
香讚黑椒雞堡50片
0.2
1.0
4.00
0610012
繁華市場1.4
21287
梨山藍莓醬3.2K
0.2
1.0
4.00
0610012
繁華市場1.4
23168
品高蕃茄包10g*250包
2.0
8.0
4.00
0610012
繁華市場1.4
24070
一品酥油(紅酥)素 16k
0.2
1.0
4.00
0610012
繁華市場1.4
51318
立基冷凍起酥片12*13(約26片)
0.2
1.0
4.00
0610012
繁華市場1.4
53022
正點(原味)雞球 1K
3.8
10.0
2.67
0610012
繁華市場1.4
56013
每天豬柳 1K
0.8
2.0
2.67
0610012
繁華市場1.4
11002
草莓風味調味粉 1K
4.0
10.0
2.50
0610012
繁華市場1.4
54020
奇津一口珍珠餃200粒
3.5
8.0
2.29
0610012
繁華市場1.4
31101
三代450g
5.8
12.0
2.09
0610012
繁華市場1.4
21280
梨山草莓醬3.2k
0.5
1.0
2.00
0610012
繁華市場1.4
23141
可果美蕃茄醬 3.33k.
0.5
1.0
2.00
0610012
繁華市場1.4
51321
丹麥土司10片.
1.0
2.0
2.00
0610012
繁華市場1.4
31099
二代紅450g
15.0
30.0
2.00
0610012
繁華市場1.4
41029
安佳84片乳酪990g(紅).
1.0
2.0
2.00
0610012
繁華市場1.4
54011
奇津熟鍋貼1500g(約50粒)
4.2
8.0
1.88
0610012
繁華市場1.4
53211
日規薯餅20片.
5.5
10.0
1.82
0610012
繁華市場1.4
51142
香雞城卡啦雞腿(大)辣 10片.
5.5
10.0
1.82
0610012
繁華市場1.4
51141
香雞城卡啦雞腿(大)原 10片.
1.8
3.0
1.71
0610012
繁華市場1.4
51396
圓型披薩(夏威夷)120g.
10.5
18.0
1.71
0610012
繁華市場1.4
51397
圓型披薩(燻雞)120g.
10.5
18.0
1.71
0610012
繁華市場1.4
51171
安美熱狗50條.
23.2
38.0
1.63
0610012
繁華市場1.4
51330
金品濃縮米漿 1.5k
11.8
19.0
1.62
0610012
繁華市場1.4
59142
香酥雞塊(HISUN) 3K.
7.5
12.0
1.60
0610012
繁華市場1.4
51309
黃金花枝堡50g*20片
1.2
2.0
1.60
0610012
繁華市場1.4
41006
亞柏奶精 1公升.
79.5
126.0
1.58
0610012
繁華市場1.4
41061
四季沙拉3K
5.8
9.0
1.57
0610012
繁華市場1.4
51035
南周抓肉餅 10片
4.5
7.0
1.56
0610012
繁華市場1.4
59133
安心大火腿1.8K
3.2
5.0
1.54
0610012
繁華市場1.4
21260
香蒜抹醬(上焱) 800g
0.0
2.0
1.50
0610012
繁華市場1.4
51466
Hisun鬆餅(5片)原味
0.0
5.0
1.50
0610012
繁華市場1.4
21266
梨山花生醬2.8K
2.0
3.0
1.50
0610012
繁華市場1.4
25888
伊植麥玉米粒(易開)340g.
0.0
24.0
1.50
0610012
繁華市場1.4
72300
六杯架 50個
0.0
1.0
1.50
0610012
繁華市場1.4
26068
雙魚座鮪魚185g.
0.0
72.0
1.50
0610012
繁華市場1.4
56041
抓餅(禾)10片.
14.5
21.0
1.45
0610012
繁華市場1.4
22168
馬玉山杏仁粉600g
14.5
21.0
1.45
0610012
繁華市場1.4
51265
金酥3/8脆薯2.04K.
6.2
9.0
1.44
0610012
繁華市場1.4
56019
鮮肉湯包(禾) 50入
27.2
39.0
1.43
0610012
繁華市場1.4
53044
可口芋籤糕1.2K
5.8
7.0
1.22
0610012
繁華市場1.4
51109
台畜原味甲霸大熱狗20支
4.2
5.0
1.18
0610012
繁華市場1.4
57064
厚切蘿蔔糕 1K
17.0
20.0
1.18
0610012
繁華市場1.4
56017
翡翠抓餅(禾)10片.
12.8
14.0
1.10
0610012
繁華市場1.4
51371
Hisun鬆餅(5片)
7.5
5.0
0.67
0610046
永和-潭頭-1.4
59011
一品漢堡100片
1.2
6.0
4.80
0610046
永和-潭頭-1.4
41029
安佳84片乳酪990g(紅).
0.2
1.0
4.00
0610046
永和-潭頭-1.4
92503
氫氧化鈉(粒鹼) 1K
6.2
25.0
4.00
0610046
永和-潭頭-1.4
23144
可果美Q早餐蕃茄醬(軟袋)1K
2.0
5.0
2.50
0610046
永和-潭頭-1.4
25888
伊植麥玉米粒(易開)340g.
42.0
96.0
2.29
0610046
永和-潭頭-1.4
59142
香酥雞塊(HISUN) 3K.
11.5
24.0
2.09
0610046
永和-潭頭-1.4
22020
特調咖啡紅茶(免濾)100g*5包.
40.0
80.0
2.00
0610046
永和-潭頭-1.4
11001
咖啡風味調味粉 1k(棕).
48.0
96.0
2.00
0610046
永和-潭頭-1.4
23452
牛頭牌沙茶醬易開3k
2.5
5.0
2.00
0610046
永和-潭頭-1.4
23502
好媽媽鮪魚三明治185g.
72.0
144.0
2.00
0610046
永和-潭頭-1.4
21269
梨山花生醬800g
2.0
4.0
2.00
0610046
永和-潭頭-1.4
31011
168奶精(不含乳(奶)) 1k.
33.0
60.0
1.82
0610046
永和-潭頭-1.4
21290
梨山藍莓果醬900g
2.0
3.0
1.50
0610046
永和-潭頭-1.4
23626
一番香Q意麵50入
0.0
4.0
1.50
0610046
永和-潭頭-1.4
56041
抓餅(禾)10片.
35.0
50.0
1.43
0610046
永和-潭頭-1.4
21283
梨山草莓果醬900g
3.0
4.0
1.33
0610046
永和-潭頭-1.4
53211
日規薯餅20片.
9.2
11.0
1.19
0610046
永和-潭頭-1.4
21229
福汎椰香奶酥 1.8K
1.0
1.0
1.00
0610046
永和-潭頭-1.4
51262
一品熱狗 50支
30.0
30.0
1.00
0610046
永和-潭頭-1.4
57012
富統優質小火腿1K(120片)
4.5
4.0
0.89
0610046
永和-潭頭-1.4
12205
黑砂糖蜜 6k
1.8
1.0
0.57
0610046
永和-潭頭-1.4
23504
烹大師鰹魚調味料(日本)1k
3.5
2.0
0.57
0610046
永和-潭頭-1.4
51109
台畜原味甲霸大熱狗20支
2.2
1.0
0.44
1010037
美美早餐店(鹽埔)-1.4
31035
葡萄乾600g
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
41018
香Q蛋餅皮(原)30入.(紅字)
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
54043
強匠煙燻雞肉片1公斤
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
51515
金品千層蛋餅皮 25片.
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
53021
正點起司雞排10入
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
53006
A里堡(丹麥麵包) 6入
0.5
2.0
4.00
1010037
美美早餐店(鹽埔)-1.4
31101
三代450g
6.5
24.0
3.69
1010037
美美早餐店(鹽埔)-1.4
31044
玉米粉1k
1.8
6.0
3.43
1010037
美美早餐店(鹽埔)-1.4
25888
伊植麥玉米粒(易開)340g.
24.0
72.0
3.00
1010037
美美早餐店(鹽埔)-1.4
21131
金鑽巧克力塗抹醬 3k
1.5
4.0
2.67
1010037
美美早餐店(鹽埔)-1.4
31099
二代紅450g
22.5
60.0
2.67
1010037
美美早餐店(鹽埔)-1.4
51341
金品(黑胡椒)肉醬義大利麵 310g.
10.0
25.0
2.50
1010037
美美早餐店(鹽埔)-1.4
22168
馬玉山杏仁粉600g
2.0
5.0
2.50
1010037
美美早餐店(鹽埔)-1.4
51130
香雞城小肉豆1K.
2.5
6.0
2.40
1010037
美美早餐店(鹽埔)-1.4
11002
草莓風味調味粉 1K
1.2
3.0
2.40
1010037
美美早餐店(鹽埔)-1.4
24236
聯泰太白粉 1000g
2.8
6.0
2.18
1010037
美美早餐店(鹽埔)-1.4
53102
紅龍卡啦雞腿堡(原味) 10片.
1.5
3.0
2.00
1010037
美美早餐店(鹽埔)-1.4
51701
立芳牛肉漢堡60g*20片
1.5
3.0
2.00
1010037
美美早餐店(鹽埔)-1.4
21135
素食金香酥油3k(白桶)
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
53022
正點(原味)雞球 1K
3.5
7.0
2.00
1010037
美美早餐店(鹽埔)-1.4
23188
豪味辣椒膏 5L
1.0
2.0
2.00
1010037
美美早餐店(鹽埔)-1.4
23168
品高蕃茄包10g*250包
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
31060
杏仁片 500g
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
53103
乳酪餅(良晟) 14*14(15片)
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
23001
四海鹽酥粉600g
2.5
5.0
2.00
1010037
美美早餐店(鹽埔)-1.4
22020
特調咖啡紅茶(免濾)100g*5包.
20.0
40.0
2.00
1010037
美美早餐店(鹽埔)-1.4
51284
馬鈴薯條(HISUN) 2K.
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
51172
安美燻腸 1000g.
4.8
9.0
1.89
1010037
美美早餐店(鹽埔)-1.4
51035
南周抓肉餅 10片
3.2
6.0
1.85
1010037
美美早餐店(鹽埔)-1.4
56013
每天豬柳 1K
2.8
5.0
1.82
1010037
美美早餐店(鹽埔)-1.4
53211
日規薯餅20片.
5.8
10.0
1.74
1010037
美美早餐店(鹽埔)-1.4
56017
翡翠抓餅(禾)10片.
3.5
6.0
1.71
1010037
美美早餐店(鹽埔)-1.4
23141
可果美蕃茄醬 3.33k.
1.8
3.0
1.71
1010037
美美早餐店(鹽埔)-1.4
53007
黃金牛角(丹麥麵包) 6入.
1.8
3.0
1.71
1010037
美美早餐店(鹽埔)-1.4
41006
亞柏奶精 1公升.
57.0
97.0
1.70
1010037
美美早餐店(鹽埔)-1.4
51395
圓型披薩(總匯)120g.
7.2
12.0
1.66
1010037
美美早餐店(鹽埔)-1.4
23504
烹大師鰹魚調味料(日本)1k
1.2
2.0
1.60
1010037
美美早餐店(鹽埔)-1.4
56041
抓餅(禾)10片.
7.0
11.0
1.57
1010037
美美早餐店(鹽埔)-1.4
51396
圓型披薩(夏威夷)120g.
12.8
20.0
1.57
1010037
美美早餐店(鹽埔)-1.4
53100
紅龍卡啦雞腿堡(辣味) 10片.
16.0
25.0
1.56
1010037
美美早餐店(鹽埔)-1.4
23186
豪味豆油膏5L
3.2
5.0
1.54
1010037
美美早餐店(鹽埔)-1.4
41029
安佳84片乳酪990g(紅).
3.2
5.0
1.54
1010037
美美早餐店(鹽埔)-1.4
51351
金品義大利肉醬麵310g.
16.2
25.0
1.54
1010037
美美早餐店(鹽埔)-1.4
53057
奶皇包60g*12粒
2.0
3.0
1.50
1010037
美美早餐店(鹽埔)-1.4
51180
安美三明治火腿1.8K
0.0
3.0
1.50
1010037
美美早餐店(鹽埔)-1.4
41061
四季沙拉3K
6.0
9.0
1.50
1010037
美美早餐店(鹽埔)-1.4
51466
Hisun鬆餅(5片)原味
0.0
1.0
1.50
1010037
美美早餐店(鹽埔)-1.4
59163
切片培根 1K
2.8
4.0
1.45
1010037
美美早餐店(鹽埔)-1.4
51330
金品濃縮米漿 1.5k
11.0
16.0
1.45
1010037
美美早餐店(鹽埔)-1.4
51371
Hisun鬆餅(5片)
4.2
6.0
1.41
1010037
美美早餐店(鹽埔)-1.4
51171
安美熱狗50條.
18.5
26.0
1.41
1010037
美美早餐店(鹽埔)-1.4
26068
雙魚座鮪魚185g.
36.0
48.0
1.33
1010037
美美早餐店(鹽埔)-1.4
23611
寶馬牌粉絲 2700g
0.8
1.0
1.33
1010037
美美早餐店(鹽埔)-1.4
23452
牛頭牌沙茶醬易開3k
0.8
1.0
1.33
1010037
美美早餐店(鹽埔)-1.4
22293
台糖二砂 25K
2.2
3.0
1.33
1010037
美美早餐店(鹽埔)-1.4
22107
飛燕煉乳 375g.
1.5
2.0
1.33
1010037
美美早餐店(鹽埔)-1.4
51311
紅龍香檸雞柳條 1K(約28條)
5.5
7.0
1.27
1010037
美美早餐店(鹽埔)-1.4
51265
金酥3/8脆薯2.04K.
9.5
12.0
1.26
1010037
美美早餐店(鹽埔)-1.4
53112
香香雞米花1K.
8.2
10.0
1.21
1010037
美美早餐店(鹽埔)-1.4
23630
味之素1K
1.8
2.0
1.14
1010037
美美早餐店(鹽埔)-1.4
21266
梨山花生醬2.8K
1.8
2.0
1.14
1010037
美美早餐店(鹽埔)-1.4
51321
丹麥土司10片.
3.2
3.0
0.92
1010037
美美早餐店(鹽埔)-1.4
51318
立基冷凍起酥片12*13(約26片)
1.2
1.0
0.80
1010037
美美早餐店(鹽埔)-1.4
57064
厚切蘿蔔糕 1K
5.5
4.0
0.73
1010037
美美早餐店(鹽埔)-1.4
51065
卜蜂高級雞肉火腿(切片)1.8k
4.2
3.0
0.71
1010047
四海-新庄1.4
41029
安佳84片乳酪990g(紅).
0.2
1.0
4.00
1010047
四海-新庄1.4
51109
台畜原味甲霸大熱狗20支
26.0
56.0
2.15
1010047
四海-新庄1.4
22020
特調咖啡紅茶(免濾)100g*5包.
40.0
80.0
2.00
1010047
四海-新庄1.4
21131
金鑽巧克力塗抹醬 3k
1.0
2.0
2.00
1010047
四海-新庄1.4
21229
福汎椰香奶酥 1.8K
1.0
2.0
2.00
1010047
四海-新庄1.4
23141
可果美蕃茄醬 3.33k.
0.5
1.0
2.00
1010047
四海-新庄1.4
51130
香雞城小肉豆1K.
5.0
10.0
2.00
1010047
四海-新庄1.4
11002
草莓風味調味粉 1K
6.0
12.0
2.00
1010047
四海-新庄1.4
25888
伊植麥玉米粒(易開)340g.
90.0
144.0
1.60
1010047
四海-新庄1.4
51121
台畜培根A1k
10.0
16.0
1.60
1010047
四海-新庄1.4
59142
香酥雞塊(HISUN) 3K.
27.2
42.0
1.54
1010047
四海-新庄1.4
23502
好媽媽鮪魚三明治185g.
48.0
72.0
1.50
1010047
四海-新庄1.4
51261
麥肯橢圓薯餅2.26K(約34片)
0.0
6.0
1.50
1010047
四海-新庄1.4
31011
168奶精(不含乳(奶)) 1k.
36.0
48.0
1.33
1010047
四海-新庄1.4
53100
紅龍卡啦雞腿堡(辣味) 10片.
43.8
55.0
1.26
1010047
四海-新庄1.4
11001
咖啡風味調味粉 1k(棕).
69.0
84.0
1.22
1010047
四海-新庄1.4
51171
安美熱狗50條.
50.0
55.0
1.10
1010047
四海-新庄1.4
56041
抓餅(禾)10片.
65.0
70.0
1.08
1010047
四海-新庄1.4
57012
富統優質小火腿1K(120片)
3.8
4.0
1.07
1010047
四海-新庄1.4
53211
日規薯餅20片.
23.0
24.0
1.04
1010047
四海-新庄1.4
59011
一品漢堡100片
2.2
1.0
0.44
1310027
隘寮早點1.4
25888
伊植麥玉米粒(易開)340g.
12.0
72.0
6.00
1310027
隘寮早點1.4
23001
四海鹽酥粉600g
1.5
8.0
5.33
1310027
隘寮早點1.4
23361
肉鬆 3K
1.5
8.0
5.33
1310027
隘寮早點1.4
23150
可果美蕃茄醬 4.5k.
0.5
2.0
4.00
1310027
隘寮早點1.4
41189
HISUN起司片84片.
0.8
3.0
4.00
1310027
隘寮早點1.4
54021
奇津阿在伯手工蔥抓餅10入.
14.5
44.0
3.03
1310027
隘寮早點1.4
51121
台畜培根A1k
1.0
3.0
3.00
1310027
隘寮早點1.4
54061
強匠卡拉雞腿堡(辣味)10片.
102.0
300.0
2.94
1310027
隘寮早點1.4
21266
梨山花生醬2.8K
0.8
2.0
2.67
1310027
隘寮早點1.4
51452
家州黑胡椒腿肉排1K
1.5
4.0
2.67
1310027
隘寮早點1.4
51701
立芳牛肉漢堡60g*20片
0.8
2.0
2.67
1310027
隘寮早點1.4
11055
原味奶酥700g
1.2
3.0
2.40
1310027
隘寮早點1.4
51077
卜蜂業務用雞塊3k
8.0
16.0
2.00
1310027
隘寮早點1.4
51085
卜蜂早餐雞堡50g*50片
1.0
2.0
2.00
1310027
隘寮早點1.4
54060
強匠卡拉雞腿堡(原味)10片.
6.5
13.0
2.00
1310027
隘寮早點1.4
59131
安心熱狗100支
14.0
25.0
1.79
1310027
隘寮早點1.4
53042
四海蘿蔔糕 12片(紅)
7.5
13.0
1.73
1310027
隘寮早點1.4
51265
金酥3/8脆薯2.04K.
8.0
12.0
1.50
1310027
隘寮早點1.4
71175
易昇6585通用蓋(750)/50個
0.0
5.0
1.50
1310027
隘寮早點1.4
71181
8511蓋(850湯杯) 50個
0.0
5.0
1.50
1310027
隘寮早點1.4
71218
520cc紙湯杯50入
0.0
40.0
1.50
1310027
隘寮早點1.4
71407
750紙湯杯 (白) 50個
0.0
24.0
1.50
1310027
隘寮早點1.4
71409
紙850湯杯(白) 50入
0.0
24.0
1.50
1310027
隘寮早點1.4
21227
福汎巧克力3K
1.5
2.0
1.33
1310027
隘寮早點1.4
51261
麥肯橢圓薯餅2.26K(約34片)
0.8
1.0
1.33
1310027
隘寮早點1.4
21622
奇異鳥奶精(313) 25k
1.0
1.0
1.00
2510038
好野早午餐-佳冬2.5
21144
正香軒巧克力3k
0.2
2.0
8.00
2510038
好野早午餐-佳冬2.5
53134
洋蔥圈1K
0.5
2.0
4.00
2510038
好野早午餐-佳冬2.5
56054
正點黑胡椒雞堡20片
2.5
7.0
2.80
2510038
好野早午餐-佳冬2.5
24074
乳瑪琳(大) 440g
0.8
2.0
2.67
2510038
好野早午餐-佳冬2.5
56056
日式香酥魚堡 25入
1.5
4.0
2.67
2510038
好野早午餐-佳冬2.5
53112
香香雞米花1K.
12.8
28.0
2.20
2510038
好野早午餐-佳冬2.5
53103
乳酪餅(良晟) 14*14(15片)
4.8
10.0
2.11
2510038
好野早午餐-佳冬2.5
13007
鍋燒湯粉1k
1.5
3.0
2.00
2510038
好野早午餐-佳冬2.5
21229
福汎椰香奶酥 1.8K
1.0
2.0
2.00
2510038
好野早午餐-佳冬2.5
22106
耐司果醇味煉乳375g
2.5
5.0
2.00
2510038
好野早午餐-佳冬2.5
23627
一番香Q雞絲50入
1.0
2.0
2.00
2510038
好野早午餐-佳冬2.5
52183
唐辛子帶環腿排220g*5片
2.0
4.0
2.00
2510038
好野早午餐-佳冬2.5
21283
梨山草莓果醬900g
1.0
2.0
2.00
2510038
好野早午餐-佳冬2.5
59147
日式大豬排120G*50片
0.5
1.0
2.00
2510038
好野早午餐-佳冬2.5
71890
三明治袋p
1.5
3.0
2.00
2510038
好野早午餐-佳冬2.5
51709
澳洲優質牛肉堡 80g
32.0
60.0
1.88
2510038
好野早午餐-佳冬2.5
59016
卡啦脆魚條 1K(約27入)
3.2
6.0
1.85
2510038
好野早午餐-佳冬2.5
96195
小磨坊西式胡椒鹽1K
2.8
5.0
1.82
2510038
好野早午餐-佳冬2.5
51518
8吋原味墨西哥薄餅45g*12片
15.0
27.0
1.80
2510038
好野早午餐-佳冬2.5
54008
Hisun搖滾雞球1K(約80顆)
2.2
4.0
1.78
2510038
好野早午餐-佳冬2.5
71414
1000cc紙湯杯50個
2.2
4.0
1.78
2510038
好野早午餐-佳冬2.5
71931
BO塑膠盒 1H100個
3.5
6.0
1.71
2510038
好野早午餐-佳冬2.5
72305
橡皮圈(中)#16條
1.8
3.0
1.71
2510038
好野早午餐-佳冬2.5
71181
8511蓋(850湯杯) 50個
4.2
7.0
1.65
2510038
好野早午餐-佳冬2.5
51311
紅龍香檸雞柳條 1K(約28條)
5.5
9.0
1.64
2510038
好野早午餐-佳冬2.5
53056
冷凍熟鍋貼(禾)1500g(約50粒).
11.0
18.0
1.64
2510038
好野早午餐-佳冬2.5
51365
讚岐烏龍麵240g*5片
6.2
10.0
1.60
2510038
好野早午餐-佳冬2.5
53119
經典雞塊1K
20.5
32.0
1.56
2510038
好野早午餐-佳冬2.5
43044
HAPPY千島風味沙拉500g
5.2
8.0
1.52
2510038
好野早午餐-佳冬2.5
23671
五木原味拉麵 65g
24.0
36.0
1.50
2510038
好野早午餐-佳冬2.5
71409
紙850湯杯(白) 50入
2.0
3.0
1.50
2510038
好野早午餐-佳冬2.5
71413
防油L漢堡紙袋 500張(200*200mm)
0.0
12.0
1.50
2510038
好野早午餐-佳冬2.5
51261
麥肯橢圓薯餅2.26K(約34片)
2.0
3.0
1.50
2510038
好野早午餐-佳冬2.5
21266
梨山花生醬2.8K
2.8
4.0
1.45
2510038
好野早午餐-佳冬2.5
41047
每天沙拉3K
13.8
19.0
1.38
2510038
好野早午餐-佳冬2.5
22250
涼水舖-冷泡茶 50入
1.5
2.0
1.33
2510038
好野早午餐-佳冬2.5
11002
草莓風味調味粉 1K
3.0
4.0
1.33
2510038
好野早午餐-佳冬2.5
51263
麥肯洋蔥圈907g
1.5
2.0
1.33
2510038
好野早午餐-佳冬2.5
25888
伊植麥玉米粒(易開)340g.
72.0
96.0
1.33
2510038
好野早午餐-佳冬2.5
21862
天仁免濾茉香綠茶 75g
3.0
4.0
1.33
2510038
好野早午餐-佳冬2.5
23932
龍口粉絲(快煮型)3K
0.8
1.0
1.33
2510038
好野早午餐-佳冬2.5
51706
立芳黑胡椒漢堡薄片50g*20片.
9.8
13.0
1.33
2510038
好野早午餐-佳冬2.5
23732
崁頂芝麻醬包40g
27.0
36.0
1.33
2510038
好野早午餐-佳冬2.5
41006
亞柏奶精 1公升.
28.2
36.0
1.27
2510038
好野早午餐-佳冬2.5
21754
喜多顆粒柳橙濃糖果漿 2.4k
3.2
4.0
1.23
2510038
好野早午餐-佳冬2.5
53021
正點起司雞排10入
5.0
6.0
1.20
2510038
好野早午餐-佳冬2.5
57055
馬芬堡 20入
6.0
7.0
1.17
2510038
好野早午餐-佳冬2.5
51321
丹麥土司10片.
15.0
16.0
1.07
2510038
好野早午餐-佳冬2.5
71825
超薄袋半斤
3.0
3.0
1.00
2510038
好野早午餐-佳冬2.5
53041
炸小熱狗50支(胖胖狗)
1.0
1.0
1.00
2510038
好野早午餐-佳冬2.5
72341
4寸叉包
1.0
1.0
1.00
2510038
好野早午餐-佳冬2.5
71951
小圓盒L003 100入
2.2
2.0
0.89
2510038
好野早午餐-佳冬2.5
51172
安美燻腸 1000g.
4.5
4.0
0.89
2510038
好野早午餐-佳冬2.5
24506
鳳冠牌整片鳳梨 565g
3.5
3.0
0.86
2510038
好野早午餐-佳冬2.5
71891
0號夾鏈袋 10入
1.2
1.0
0.80
2510038
好野早午餐-佳冬2.5
53007
黃金牛角(丹麥麵包) 6入.
3.2
2.0
0.62
2510038
好野早午餐-佳冬2.5
51309
黃金花枝堡50g*20片
1.8
1.0
0.57
5870001
新月牛角烘焙食品行
23361
肉鬆 3K
12.0
36.0
3.00
5870001
新月牛角烘焙食品行
41210
新月優質沙拉(袋)3K
182.0
301.0
1.65
5890006
夭巴ㄔㄚˋ1.4
13007
鍋燒湯粉1k
4.0
32.0
8.00
5890006
夭巴ㄔㄚˋ1.4
21134
瑪雅琳3k(白桶)
0.2
2.0
8.00
5890006
夭巴ㄔㄚˋ1.4
51518
8吋原味墨西哥薄餅45g*12片
5.0
40.0
8.00
5890006
夭巴ㄔㄚˋ1.4
54008
Hisun搖滾雞球1K(約80顆)
2.5
17.0
6.80
5890006
夭巴ㄔㄚˋ1.4
22144
冬瓜糖 6K(普).
0.8
5.0
6.67
5890006
夭巴ㄔㄚˋ1.4
51706
立芳黑胡椒漢堡薄片50g*20片.
1.2
8.0
6.40
5890006
夭巴ㄔㄚˋ1.4
22236
台糖特砂 25K
0.5
3.0
6.00
5890006
夭巴ㄔㄚˋ1.4
23154
可果美快餐用蕃茄醬 3.15k
0.5
3.0
6.00
5890006
夭巴ㄔㄚˋ1.4
51010
麥肯四角薯餅2.26K(約34片)
0.5
3.0
6.00
5890006
夭巴ㄔㄚˋ1.4
54060
強匠卡拉雞腿堡(原味)10片.
3.8
20.0
5.33
5890006
夭巴ㄔㄚˋ1.4
11055
原味奶酥700g
1.0
5.0
5.00
5890006
夭巴ㄔㄚˋ1.4
24245
憶霖OK醬油膏10g*200入
1.0
5.0
5.00
5890006
夭巴ㄔㄚˋ1.4
23168
品高蕃茄包10g*250包
1.2
6.0
4.80
5890006
夭巴ㄔㄚˋ1.4
51263
麥肯洋蔥圈907g
2.8
12.0
4.36
5890006
夭巴ㄔㄚˋ1.4
54061
強匠卡拉雞腿堡(辣味)10片.
5.2
22.0
4.19
5890006
夭巴ㄔㄚˋ1.4
51130
香雞城小肉豆1K.
3.0
12.0
4.00
5890006
夭巴ㄔㄚˋ1.4
23925
好滋味油膏4200公克
0.5
2.0
4.00
5890006
夭巴ㄔㄚˋ1.4
51438
家州黑胡椒里肌豬排(白盤)20片
3.0
12.0
4.00
5890006
夭巴ㄔㄚˋ1.4
31011
168奶精(不含乳(奶)) 1k.
9.0
36.0
4.00
5890006
夭巴ㄔㄚˋ1.4
53043
炸大熱狗25支
0.5
2.0
4.00
5890006
夭巴ㄔㄚˋ1.4
51171
安美熱狗50條.
4.2
16.0
3.76
5890006
夭巴ㄔㄚˋ1.4
32062
亞薩阿薩母紅茶600g
7.5
28.0
3.73
5890006
夭巴ㄔㄚˋ1.4
54057
黃金手工蔥抓餅10片.
5.8
19.0
3.30
5890006
夭巴ㄔㄚˋ1.4
23001
四海鹽酥粉600g
1.2
4.0
3.20
5890006
夭巴ㄔㄚˋ1.4
51190
安美煙燻大火腿 1K
1.2
4.0
3.20
5890006
夭巴ㄔㄚˋ1.4
23452
牛頭牌沙茶醬易開3k
1.2
4.0
3.20
5890006
夭巴ㄔㄚˋ1.4
41189
HISUN起司片84片.
3.2
10.0
3.08
5890006
夭巴ㄔㄚˋ1.4
21131
金鑽巧克力塗抹醬 3k
1.0
3.0
3.00
5890006
夭巴ㄔㄚˋ1.4
51433
港式菠蘿 6入
10.2
30.0
2.93
5890006
夭巴ㄔㄚˋ1.4
51172
安美燻腸 1000g.
2.8
8.0
2.91
5890006
夭巴ㄔㄚˋ1.4
54043
強匠煙燻雞肉片1公斤
3.5
10.0
2.86
5890006
夭巴ㄔㄚˋ1.4
51466
Hisun鬆餅(5片)原味
6.0
17.0
2.83
5890006
夭巴ㄔㄚˋ1.4
21266
梨山花生醬2.8K
0.8
2.0
2.67
5890006
夭巴ㄔㄚˋ1.4
53045
祥哥冷凍蘿蔔糕12片.(白)
14.0
36.0
2.57
5890006
夭巴ㄔㄚˋ1.4
23838
維力媽媽拉麵 70g*6入.
60.0
150.0
2.50
5890006
夭巴ㄔㄚˋ1.4
51012
HISUN四角薯餅20片1260g
5.8
13.0
2.26
5890006
夭巴ㄔㄚˋ1.4
41018
香Q蛋餅皮(原)30入.(紅字)
11.0
24.0
2.18
5890006
夭巴ㄔㄚˋ1.4
51284
馬鈴薯條(HISUN) 2K.
9.0
18.0
2.00
5890006
夭巴ㄔㄚˋ1.4
22106
耐司果醇味煉乳375g
12.0
24.0
2.00
5890006
夭巴ㄔㄚˋ1.4
41042
四海沙拉(大) 3k
1.5
3.0
2.00
5890006
夭巴ㄔㄚˋ1.4
22084
福汎巧克力糖漿680g.
0.0
4.0
1.50
5890006
夭巴ㄔㄚˋ1.4
41032
寶宏pizza絲 1k(雙色).
0.0
20.0
1.50
5890006
夭巴ㄔㄚˋ1.4
25888
伊植麥玉米粒(易開)340g.
0.0
24.0
1.50
5890006
夭巴ㄔㄚˋ1.4
23197
品高辣椒醬包10g*250包
0.0
3.0
1.50
Customer Revenue Lift Table (Same 10 Customers)
Code
# Revenue lift for sample customers with names
sample_revenue_lift = (
customer_revenue_lift
.filter (pl.col("customer_code" ).is_in(sample_customers))
.join(customers_lookup, on= "customer_code" , how= "left" )
.select(["customer_code" , "trade_name" , "baseline_total_revenue" , "rush_total_revenue" , "revenue_lift_factor" ])
.sort("rush_total_revenue" , descending= True )
)
(
GT(sample_revenue_lift)
.tab_header(
title= "Customer Revenue Lift (Ibis)" ,
subtitle= "Same 10 sample customers"
)
.fmt_currency(["baseline_total_revenue" , "rush_total_revenue" ], currency= "TWD" , decimals= 0 , use_subunits= False )
.fmt_number("revenue_lift_factor" , decimals= 2 )
.cols_label(
customer_code= "Customer Code" ,
trade_name= "Customer Name" ,
baseline_total_revenue= "Baseline Revenue (2wk)" ,
rush_total_revenue= "Rush Revenue" ,
revenue_lift_factor= "Lift Factor"
)
)
Same 10 sample customers
1010047
四海-新庄1.4
NT$71,340
NT$102,599
1.44
0190012
宵歸暝-屏東總店
NT$37,794
NT$99,235
2.63
1310027
隘寮早點1.4
NT$36,503
NT$96,497
2.64
5890006
夭巴ㄔㄚˋ1.4
NT$25,736
NT$95,435
3.71
0370002
劉太太-漁船
NT$19,633
NT$88,667
4.52
1010037
美美早餐店(鹽埔)-1.4
NT$49,094
NT$86,019
1.75
0610012
繁華市場1.4
NT$50,812
NT$82,711
1.63
5870001
新月牛角烘焙食品行
NT$42,009
NT$75,863
1.81
2510038
好野早午餐-佳冬2.5
NT$41,984
NT$73,131
1.74
0610046
永和-潭頭-1.4
NT$40,292
NT$71,567
1.78
Rush-Only Customers Summary
Code
# Summary of rush-only customers
rush_only_summary = pl.DataFrame({
"Metric" : ["Number of Rush-Only Customers" , "Total Revenue (TWD)" ],
"Value" : [f" { rush_only_customer_count:,} " , f" { rush_only_total_revenue:,.0f} " ]
})
(
GT(rush_only_summary)
.tab_header(
title= "Rush-Only Customers (Ibis)" ,
subtitle= "Customers active only during the rush window (no baseline activity)"
)
)
Customers active only during the rush window (no baseline activity)
Number of Rush-Only Customers
68
Total Revenue (TWD)
384,538
Summary Statistics
Code
# Overall summary
avg_qty_lift = customer_sku_lift["qty_lift_factor" ].mean()
median_qty_lift = customer_sku_lift["qty_lift_factor" ].median()
avg_revenue_lift = customer_revenue_lift["revenue_lift_factor" ].mean()
median_revenue_lift = customer_revenue_lift["revenue_lift_factor" ].median()
# Store for comparison
ibis_summary = {
"baseline_sku_pairs" : len (baseline_customer_sku),
"rush_sku_pairs" : len (rush_customer_sku),
"baseline_customers" : baseline_customer_sku['customer_code' ].n_unique(),
"rush_customers" : rush_customer_sku['customer_code' ].n_unique(),
"lift_sku_pairs" : len (customer_sku_lift),
"lift_customers" : len (customer_revenue_lift),
"rush_only_customers" : rush_only_customer_count,
"rush_only_revenue" : rush_only_total_revenue,
"avg_qty_lift" : avg_qty_lift,
"median_qty_lift" : median_qty_lift,
"avg_revenue_lift" : avg_revenue_lift,
"median_revenue_lift" : median_revenue_lift
}
summary_stats = pl.DataFrame({
"Metric" : [
"Avg SKU Quantity Lift" ,
"Median SKU Quantity Lift" ,
"Avg Customer Revenue Lift" ,
"Median Customer Revenue Lift" ,
"Customers with Lift Data" ,
"Rush-Only Customers"
],
"Value" : [
f" { avg_qty_lift:.2f} x" ,
f" { median_qty_lift:.2f} x" ,
f" { avg_revenue_lift:.2f} x" ,
f" { median_revenue_lift:.2f} x" ,
f" { len (customer_revenue_lift):,} " ,
f" { rush_only_customer_count:,} "
]
})
(
GT(summary_stats)
.tab_header(
title= "CNY Rush Lift Summary Statistics (Ibis)" ,
subtitle= f"Baseline: { BASELINE_START} - { BASELINE_END} | Rush: { RUSH_START} - { RUSH_END} "
)
)
Baseline: 20241116-20250110 | Rush: 20250114-20250127
Avg SKU Quantity Lift
2.78x
Median SKU Quantity Lift
1.60x
Avg Customer Revenue Lift
infx
Median Customer Revenue Lift
1.63x
Customers with Lift Data
1,068
Rush-Only Customers
68
SKU-Level Lift Factors
These SKU-level lift factors can be applied to customer-SKU pairs where the customer was not active during the baseline period.
Code
# Calculate SKU-level baseline quantities (aggregated across all customers)
sku_baseline = (
baseline_customer_sku
.group_by("item_code" )
.agg(pl.col("baseline_qty" ).sum ().alias("baseline_qty" ))
)
print (f"SKUs in baseline: { len (sku_baseline):,} " )
Code
# Calculate SKU-level rush quantities (aggregated across all customers)
sku_rush = (
rush_customer_sku
.group_by("item_code" )
.agg(pl.col("rush_qty" ).sum ().alias("rush_qty" ))
)
print (f"SKUs in rush: { len (sku_rush):,} " )
Code
# Calculate SKU-level lift factors
# Join baseline and rush SKU totals
sku_lift = (
sku_rush
.join(sku_baseline, on= "item_code" , how= "left" )
.with_columns([
pl.col("baseline_qty" ).fill_null(0.0 )
])
.with_columns([
pl.when(pl.col("baseline_qty" ) > 0 )
.then(pl.col("rush_qty" ) / pl.col("baseline_qty" ))
.otherwise(pl.lit(1.5 )) # Cap for SKUs not in baseline
.alias("sku_lift_factor" )
])
)
print (f"SKUs with lift factors: { len (sku_lift):,} " )
print (f"SKUs with capped lift (new in rush): { (sku_lift['baseline_qty' ] == 0 ). sum ():,} " )
print (f"Avg SKU lift factor: { sku_lift['sku_lift_factor' ]. mean():.2f} x" )
print (f"Median SKU lift factor: { sku_lift['sku_lift_factor' ]. median():.2f} x" )
SKUs with lift factors: 781
SKUs with capped lift (new in rush): 14
Avg SKU lift factor: 1.98x
Median SKU lift factor: 1.50x
Sample SKU Lift Factors
Code
# Sample 10 SKUs with lift factors, sorted by rush quantity
sample_sku_lift_factors = (
sku_lift
.join(products_lookup, on= "item_code" , how= "left" )
.select(["item_code" , "product_name" , "baseline_qty" , "rush_qty" , "sku_lift_factor" ])
.sort("rush_qty" , descending= True )
.head(10 )
)
(
GT(sample_sku_lift_factors)
.tab_header(
title= "SKU-Level Lift Factors" ,
subtitle= "Top 10 SKUs by rush quantity (for use when customer not in training data)"
)
.fmt_number("baseline_qty" , decimals= 1 )
.fmt_number("rush_qty" , decimals= 1 )
.fmt_number("sku_lift_factor" , decimals= 2 )
.cols_label(
item_code= "SKU" ,
product_name= "Product Name" ,
baseline_qty= "Baseline Qty (2wk)" ,
rush_qty= "Rush Qty" ,
sku_lift_factor= "Lift Factor"
)
)
Top 10 SKUs by rush quantity (for use when customer not in training data)
25888
伊植麥玉米粒(易開)340g.
7,113.0
11,199.0
1.57
26068
雙魚座鮪魚185g.
2,603.8
3,482.0
1.34
69620
開店設計費
3,383.2
3,203.0
0.95
43599
一番烏龍麵 200g.
2,309.5
3,111.0
1.35
51171
安美熱狗50條.
1,191.5
1,719.0
1.44
41006
亞柏奶精 1公升.
1,130.2
1,652.0
1.46
51352
金品玉米濃湯250g.
858.0
1,411.0
1.64
22020
特調咖啡紅茶(免濾)100g*5包.
862.0
1,375.0
1.60
44052
黑胡椒醬包140g.
932.5
1,340.0
1.44
54021
奇津阿在伯手工蔥抓餅10入.
918.2
1,238.0
1.35
Overall Revenue Lift
Total delivery revenue lift for customers active during the baseline period.
Code
# Calculate total baseline revenue (normalized to 2 weeks) for baseline-active customers
total_baseline_revenue = baseline_customer_revenue.filter (
pl.col("customer_code" ).is_in(list (baseline_active_customers))
)["baseline_total_revenue" ].sum ()
# Calculate total rush revenue for baseline-active customers
total_rush_revenue = rush_customer_revenue.filter (
pl.col("customer_code" ).is_in(list (baseline_active_customers))
)["rush_total_revenue" ].sum ()
# Overall revenue lift factor
overall_revenue_lift = total_rush_revenue / total_baseline_revenue
print (f"Total Baseline Revenue (2wk normalized): TWD { total_baseline_revenue:,.0f} " )
print (f"Total Rush Revenue: TWD { total_rush_revenue:,.0f} " )
print (f"Overall Revenue Lift Factor: { overall_revenue_lift:.2f} x" )
Total Baseline Revenue (2wk normalized): TWD 6,520,427
Total Rush Revenue: TWD 10,354,476
Overall Revenue Lift Factor: 1.59x
Code
# Display overall revenue summary
overall_revenue_summary = pl.DataFrame({
"Period" : ["Baseline (2wk normalized)" , "Rush Window" , "Lift Factor" ],
"Revenue (TWD)" : [
f" { total_baseline_revenue:,.0f} " ,
f" { total_rush_revenue:,.0f} " ,
f" { overall_revenue_lift:.2f} x"
]
})
(
GT(overall_revenue_summary)
.tab_header(
title= "Total Delivery Revenue Lift" ,
subtitle= "Customers active during baseline period only"
)
.cols_label(
Period= "Period" ,
** {"Revenue (TWD)" : "Value" }
)
)
Customers active during baseline period only
Baseline (2wk normalized)
6,520,427
Rush Window
10,354,476
Lift Factor
1.59x
Rush-Only Customer Factor
To estimate revenue from customers who will be active during 2026 rush but not active during 2026 baseline, we calculate a factor based on 2025 patterns:
\[\text{Rush-Only Factor} = \frac{\text{2025 Rush Revenue from Customers Active Only During Rush}}{\text{2025 Rush Revenue from Customers Active During Baseline}}\]
This factor represents the additional revenue contribution from “new” customers who appear only during the rush period.
Code
# Calculate rush-only customer factor
# Numerator: Rush revenue from customers NOT active during baseline (rush-only)
# Denominator: Rush revenue from customers active during baseline
rush_only_factor = rush_only_total_revenue / total_rush_revenue
print (f"2025 Rush Revenue from Rush-Only Customers: TWD { rush_only_total_revenue:,.0f} " )
print (f"2025 Rush Revenue from Baseline-Active Customers: TWD { total_rush_revenue:,.0f} " )
print (f"Rush-Only Factor: { rush_only_factor:.4f} ( { rush_only_factor* 100 :.2f} %)" )
2025 Rush Revenue from Rush-Only Customers: TWD 384,538
2025 Rush Revenue from Baseline-Active Customers: TWD 10,354,476
Rush-Only Factor: 0.0371 (3.71%)
Code
# Display rush-only factor summary
rush_only_factor_summary = pl.DataFrame({
"Metric" : [
"Rush Revenue - Customers Active Only During Rush" ,
"Rush Revenue - Customers Active During Baseline" ,
"Rush-Only Factor"
],
"Value" : [
f"TWD { rush_only_total_revenue:,.0f} " ,
f"TWD { total_rush_revenue:,.0f} " ,
f" { rush_only_factor:.4f} ( { rush_only_factor* 100 :.2f} %)"
]
})
(
GT(rush_only_factor_summary)
.tab_header(
title= "Rush-Only Customer Factor (2025)" ,
subtitle= "For estimating 2026 rush revenue from customers not in 2026 baseline"
)
)
For estimating 2026 rush revenue from customers not in 2026 baseline
Rush Revenue - Customers Active Only During Rush
TWD 384,538
Rush Revenue - Customers Active During Baseline
TWD 10,354,476
Rush-Only Factor
0.0371 (3.71%)
Interpretation : For every TWD 1 of rush revenue from baseline-active customers, we can expect approximately TWD {rush_only_factor:.4f} additional revenue from customers who appear only during the rush period.
2026 Predictions
Adjusted Lift Factors
The 2026 CNY break is longer than 2025, so customers may stock up more. We adjust lift factors:
\[L_{adjusted} = (\max(1, \min(L, 1.5)) - 1) \times \frac{9}{6} + 1\]
This ensures: - Lift is capped at 1.5 to avoid unreasonable one-off values (e.g., customer opening new shop during CNY) - Lift is floored at 1.0 to ensure rush quantity is at least as much as baseline
Code
# Adjustment function for longer 2026 CNY break
def adjust_lift(lift_factor):
"""Adjust lift factor with cap and floor: L_adjusted = (max(1, min(L, 1.5)) - 1) * 9/6 + 1"""
# Cap at 1.5, floor at 1.0, then apply 9/6 adjustment
capped = pl.when(lift_factor > 1.5 ).then(1.5 ).otherwise(lift_factor)
floored = pl.when(capped < 1.0 ).then(1.0 ).otherwise(capped)
return (floored - 1 ) * (9 / 6 ) + 1
def adjust_lift_scalar(lift_factor):
"""Scalar version for single values"""
capped = min (lift_factor, 1.5 )
floored = max (capped, 1.0 )
return (floored - 1 ) * (9 / 6 ) + 1
# Calculate adjusted lift factors
adjusted_overall_revenue_lift = adjust_lift_scalar(overall_revenue_lift)
# Adjusted customer-SKU lift factors
customer_sku_lift_adjusted = customer_sku_lift.with_columns([
adjust_lift(pl.col("qty_lift_factor" )).alias("qty_lift_factor_adjusted" )
])
# Adjusted customer revenue lift factors
customer_revenue_lift_adjusted = customer_revenue_lift.with_columns([
adjust_lift(pl.col("revenue_lift_factor" )).alias("revenue_lift_factor_adjusted" )
])
# Adjusted SKU-level lift factors
sku_lift_adjusted = sku_lift.with_columns([
adjust_lift(pl.col("sku_lift_factor" )).alias("sku_lift_factor_adjusted" )
])
print (f"Original overall revenue lift: { overall_revenue_lift:.2f} x" )
print (f"Adjusted overall revenue lift: { adjusted_overall_revenue_lift:.2f} x" )
print (f"Original median customer-SKU lift: { customer_sku_lift['qty_lift_factor' ]. median():.2f} x" )
print (f"Adjusted median customer-SKU lift: { customer_sku_lift_adjusted['qty_lift_factor_adjusted' ]. median():.2f} x" )
Original overall revenue lift: 1.59x
Adjusted overall revenue lift: 1.75x
Original median customer-SKU lift: 1.60x
Adjusted median customer-SKU lift: 1.75x
2026 Baseline Period
Code
# 2026 baseline: 8 weeks (56 days) ending on 2026-01-09
BASELINE_2026_END = "20260109"
# 2026-01-09 - 55 days = 2025-11-15
BASELINE_2026_START = "20251115"
print (f"2026 Baseline Period: { BASELINE_2026_START} to { BASELINE_2026_END} " )
2026 Baseline Period: 20251115 to 20260109
Code
# Customer-SKU quantity during 2026 baseline period
baseline_2026_customer_sku = (
sales_orders
.filter (_.confirmed_code == "Y" )
.filter (_.order_date >= BASELINE_2026_START)
.filter (_.order_date <= BASELINE_2026_END)
.join(
sales_order_lines,
["order_type" , "order_number" ]
)
.filter (~ _.item_code.isin(excluded_items))
.group_by(["customer_code" , "item_code" ])
.agg(
total_qty= _.quantity.cast("float64" ).sum (),
total_revenue= _.pretax_subtotal.cast("float64" ).sum ()
)
.to_polars()
)
# Normalize to 2-week equivalent
baseline_2026_customer_sku = baseline_2026_customer_sku.with_columns([
(pl.col("total_qty" ) / BASELINE_NORMALIZATION_FACTOR).alias("baseline_qty_2026" ),
(pl.col("total_revenue" ) / BASELINE_NORMALIZATION_FACTOR).alias("baseline_revenue_2026" )
]).select(["customer_code" , "item_code" , "baseline_qty_2026" , "baseline_revenue_2026" ])
print (f"2026 Baseline customer-SKU pairs: { len (baseline_2026_customer_sku):,} " )
print (f"2026 Unique customers: { baseline_2026_customer_sku['customer_code' ]. n_unique():,} " )
2026 Baseline customer-SKU pairs: 15,862
2026 Unique customers: 1,341
Code
# Customer total revenue during 2026 baseline period
baseline_2026_customer_revenue = (
baseline_2026_customer_sku
.group_by("customer_code" )
.agg(pl.col("baseline_revenue_2026" ).sum ().alias("baseline_total_revenue_2026" ))
)
print (f"2026 Baseline customers with revenue: { len (baseline_2026_customer_revenue):,} " )
2026 Baseline customers with revenue: 1,341
Identify 2025 vs 2026 Customers
Code
# Customers in 2025 training data (baseline active)
customers_2025 = set (baseline_customer_revenue["customer_code" ].to_list())
# Customers in 2026 baseline
customers_2026 = set (baseline_2026_customer_revenue["customer_code" ].to_list())
# Returning customers (in both 2025 and 2026)
returning_customers = customers_2025 & customers_2026
# New customers (in 2026 but not in 2025 baseline)
new_customers_2026 = customers_2026 - customers_2025
print (f"Returning customers (in both years): { len (returning_customers):,} " )
print (f"New customers in 2026: { len (new_customers_2026):,} " )
Returning customers (in both years): 1,147
New customers in 2026: 194
Apply Adjusted Lift Factors to 2026 Baseline
Code
# For RETURNING customers: apply customer-SKU adjusted lift factors
# Join 2026 baseline with 2025 customer-SKU lift factors
predictions_returning = (
baseline_2026_customer_sku
.filter (pl.col("customer_code" ).is_in(list (returning_customers)))
.join(
customer_sku_lift_adjusted.select(["customer_code" , "item_code" , "qty_lift_factor_adjusted" ]),
on= ["customer_code" , "item_code" ],
how= "left"
)
.join(
sku_lift_adjusted.select(["item_code" , "sku_lift_factor_adjusted" ]),
on= "item_code" ,
how= "left"
)
)
# Apply lift factors:
# 1. If customer-SKU lift exists, use it
# 2. Else if SKU lift exists, use it (new SKU for this customer)
# 3. Else use adjusted overall revenue lift (completely new SKU)
predictions_returning = predictions_returning.with_columns([
pl.coalesce([
pl.col("qty_lift_factor_adjusted" ),
pl.col("sku_lift_factor_adjusted" ),
pl.lit(adjusted_overall_revenue_lift)
]).alias("applied_lift" )
])
# Calculate predicted rush quantities
predictions_returning = predictions_returning.with_columns([
(pl.col("baseline_qty_2026" ) * pl.col("applied_lift" )).alias("predicted_rush_qty" ),
(pl.col("baseline_revenue_2026" ) * pl.col("applied_lift" )).alias("predicted_rush_revenue" )
])
print (f"Returning customer predictions: { len (predictions_returning):,} " )
print (f"Using customer-SKU lift: { predictions_returning['qty_lift_factor_adjusted' ]. is_not_null(). sum ():,} " )
print (f"Using SKU-only lift: { (predictions_returning['qty_lift_factor_adjusted' ].is_null() & predictions_returning['sku_lift_factor_adjusted' ].is_not_null()). sum ():,} " )
print (f"Using overall revenue lift: { (predictions_returning['qty_lift_factor_adjusted' ].is_null() & predictions_returning['sku_lift_factor_adjusted' ].is_null()). sum ():,} " )
Returning customer predictions: 14,315
Using customer-SKU lift: 7,257
Using SKU-only lift: 6,705
Using overall revenue lift: 353
Code
# For NEW customers: apply SKU-only adjusted lift factors
predictions_new = (
baseline_2026_customer_sku
.filter (pl.col("customer_code" ).is_in(list (new_customers_2026)))
.join(
sku_lift_adjusted.select(["item_code" , "sku_lift_factor_adjusted" ]),
on= "item_code" ,
how= "left"
)
)
# Apply lift factors:
# 1. If SKU lift exists, use it
# 2. Else use adjusted overall revenue lift (completely new SKU)
predictions_new = predictions_new.with_columns([
pl.coalesce([
pl.col("sku_lift_factor_adjusted" ),
pl.lit(adjusted_overall_revenue_lift)
]).alias("applied_lift" )
])
# Calculate predicted rush quantities
predictions_new = predictions_new.with_columns([
(pl.col("baseline_qty_2026" ) * pl.col("applied_lift" )).alias("predicted_rush_qty" ),
(pl.col("baseline_revenue_2026" ) * pl.col("applied_lift" )).alias("predicted_rush_revenue" )
])
print (f"New customer predictions: { len (predictions_new):,} " )
print (f"Using SKU-only lift: { predictions_new['sku_lift_factor_adjusted' ]. is_not_null(). sum ():,} " )
print (f"Using overall revenue lift: { predictions_new['sku_lift_factor_adjusted' ]. is_null(). sum ():,} " )
New customer predictions: 1,547
Using SKU-only lift: 1,478
Using overall revenue lift: 69
Predictions for Sample Customers (Returning)
Code
# Predictions for the same 10 sample customers from earlier
sample_predictions_returning = (
predictions_returning
.filter (pl.col("customer_code" ).is_in(sample_customers))
.join(customers_lookup, on= "customer_code" , how= "left" )
.join(products_lookup, on= "item_code" , how= "left" )
.select([
"customer_code" , "trade_name" , "item_code" , "product_name" ,
"baseline_qty_2026" , "applied_lift" , "predicted_rush_qty"
])
.sort(["customer_code" , "predicted_rush_qty" ], descending= [False , True ])
)
(
GT(sample_predictions_returning)
.tab_header(
title= "2026 Rush Predictions - Returning Customers" ,
subtitle= "Same 10 sample customers from 2025 analysis"
)
.fmt_number("baseline_qty_2026" , decimals= 1 )
.fmt_number("applied_lift" , decimals= 2 )
.fmt_number("predicted_rush_qty" , decimals= 1 )
.cols_label(
customer_code= "Customer Code" ,
trade_name= "Customer Name" ,
item_code= "SKU" ,
product_name= "Product Name" ,
baseline_qty_2026= "2026 Baseline Qty (2wk)" ,
applied_lift= "Adjusted Lift" ,
predicted_rush_qty= "Predicted Rush Qty"
)
)
Same 10 sample customers from 2025 analysis
0190012
宵歸暝-屏東總店
22428
田園全脂保久純牛乳 1公升.
33.0
1.75
57.8
0190012
宵歸暝-屏東總店
23838
維力媽媽拉麵 70g*6入.
22.5
1.75
39.4
0190012
宵歸暝-屏東總店
53045
祥哥冷凍蘿蔔糕12片.(白)
20.0
1.75
35.0
0190012
宵歸暝-屏東總店
54056
香酥蛋餅(藍袋)30入
10.0
1.75
17.5
0190012
宵歸暝-屏東總店
51284
馬鈴薯條(HISUN) 2K.
7.5
1.75
13.1
0190012
宵歸暝-屏東總店
51518
8吋原味墨西哥薄餅45g*12片
5.0
1.75
8.8
0190012
宵歸暝-屏東總店
54021
奇津阿在伯手工蔥抓餅10入.
4.0
1.75
7.0
0190012
宵歸暝-屏東總店
53103
乳酪餅(良晟) 14*14(15片)
4.0
1.75
7.0
0190012
宵歸暝-屏東總店
54008
Hisun搖滾雞球1K(約80顆)
3.8
1.75
6.6
0190012
宵歸暝-屏東總店
53056
冷凍熟鍋貼(禾)1500g(約50粒).
3.0
1.75
5.2
0190012
宵歸暝-屏東總店
51466
Hisun鬆餅(5片)原味
3.0
1.75
5.2
0190012
宵歸暝-屏東總店
51263
麥肯洋蔥圈907g
3.0
1.75
5.2
0190012
宵歸暝-屏東總店
41032
寶宏pizza絲 1k(雙色).
5.0
1.00
5.0
0190012
宵歸暝-屏東總店
24108
美食家油炸專用油 18L
3.8
1.26
4.7
0190012
宵歸暝-屏東總店
51171
安美熱狗50條.
2.5
1.75
4.4
0190012
宵歸暝-屏東總店
53027
紅龍雞塊 1K.
2.2
1.75
3.9
0190012
宵歸暝-屏東總店
51401
吉康燻雞肉片1k
2.2
1.75
3.9
0190012
宵歸暝-屏東總店
51438
家州黑胡椒里肌豬排(白盤)20片
2.0
1.75
3.5
0190012
宵歸暝-屏東總店
51045
味你好冷凍熟水餃(約200粒)
2.0
1.75
3.5
0190012
宵歸暝-屏東總店
51172
安美燻腸 1000g.
1.8
1.75
3.1
0190012
宵歸暝-屏東總店
41042
四海沙拉(大) 3k
1.5
1.75
2.6
0190012
宵歸暝-屏東總店
44062
愛心屋韓式泡菜3K
1.5
1.75
2.6
0190012
宵歸暝-屏東總店
54060
強匠卡拉雞腿堡(原味)10片.
1.2
1.75
2.2
0190012
宵歸暝-屏東總店
53043
炸大熱狗25支
1.2
1.75
2.2
0190012
宵歸暝-屏東總店
54061
強匠卡拉雞腿堡(辣味)10片.
1.2
1.75
2.2
0190012
宵歸暝-屏東總店
22236
台糖特砂 25K
1.0
1.75
1.8
0190012
宵歸暝-屏東總店
23456
福華沙茶醬 3K
1.5
1.16
1.7
0190012
宵歸暝-屏東總店
41029
安佳84片乳酪990g(紅).
0.8
1.57
1.2
0190012
宵歸暝-屏東總店
33033
地瓜粉3K
0.5
1.75
0.9
0190012
宵歸暝-屏東總店
21131
金鑽巧克力塗抹醬 3k
0.5
1.44
0.7
0190012
宵歸暝-屏東總店
51144
香讚黑椒雞堡50片
0.2
1.75
0.4
0190012
宵歸暝-屏東總店
23361
肉鬆 3K
0.2
1.75
0.4
0190012
宵歸暝-屏東總店
21266
梨山花生醬2.8K
0.2
1.44
0.4
0190012
宵歸暝-屏東總店
33032
太白粉2.5K
0.2
1.00
0.2
0190012
宵歸暝-屏東總店
26068
雙魚座鮪魚185g.
0.0
1.51
0.0
0610012
繁華市場1.4
41006
亞柏奶精 1公升.
45.0
1.75
78.8
0610012
繁華市場1.4
51171
安美熱狗50條.
25.2
1.75
44.2
0610012
繁華市場1.4
56019
鮮肉湯包(禾) 50入
26.0
1.65
42.8
0610012
繁華市場1.4
26068
雙魚座鮪魚185g.
24.0
1.75
42.0
0610012
繁華市場1.4
22020
特調咖啡紅茶(免濾)100g*5包.
20.0
1.75
35.0
0610012
繁華市場1.4
51396
圓型披薩(夏威夷)120g.
18.0
1.75
31.5
0610012
繁華市場1.4
56041
抓餅(禾)10片.
16.0
1.67
26.8
0610012
繁華市場1.4
31099
二代紅450g
15.0
1.75
26.2
0610012
繁華市場1.4
51330
金品濃縮米漿 1.5k
13.2
1.75
23.2
0610012
繁華市場1.4
57064
厚切蘿蔔糕 1K
17.0
1.26
21.5
0610012
繁華市場1.4
51397
圓型披薩(燻雞)120g.
10.5
1.75
18.4
0610012
繁華市場1.4
59142
香酥雞塊(HISUN) 3K.
10.0
1.75
17.5
0610012
繁華市場1.4
53100
紅龍卡啦雞腿堡(辣味) 10片.
8.8
1.75
15.3
0610012
繁華市場1.4
56017
翡翠抓餅(禾)10片.
11.5
1.15
13.2
0610012
繁華市場1.4
54020
奇津一口珍珠餃200粒
7.5
1.75
13.1
0610012
繁華市場1.4
41061
四季沙拉3K
6.5
1.75
11.4
0610012
繁華市場1.4
54011
奇津熟鍋貼1500g(約50粒)
6.2
1.75
10.9
0610012
繁華市場1.4
53211
日規薯餅20片.
5.8
1.75
10.1
0610012
繁華市場1.4
51265
金酥3/8脆薯2.04K.
5.8
1.66
9.5
0610012
繁華市場1.4
51035
南周抓肉餅 10片
5.2
1.75
9.2
0610012
繁華市場1.4
51109
台畜原味甲霸大熱狗20支
7.2
1.26
9.2
0610012
繁華市場1.4
53044
可口芋籤糕1.2K
6.8
1.33
9.0
0610012
繁華市場1.4
53022
正點(原味)雞球 1K
4.5
1.75
7.9
0610012
繁華市場1.4
23093
福鷹玉米粒340g(易開罐).
6.0
1.00
6.0
0610012
繁華市場1.4
11002
草莓風味調味粉 1K
3.2
1.75
5.7
0610012
繁華市場1.4
51371
Hisun鬆餅(5片)
5.2
1.00
5.2
0610012
繁華市場1.4
31101
三代450g
3.0
1.75
5.2
0610012
繁華市場1.4
23168
品高蕃茄包10g*250包
3.0
1.75
5.2
0610012
繁華市場1.4
59133
安心大火腿1.8K
3.0
1.75
5.2
0610012
繁華市場1.4
53102
紅龍卡啦雞腿堡(原味) 10片.
2.8
1.75
4.8
0610012
繁華市場1.4
11003
可可風味調味粉 1k
2.5
1.75
4.4
0610012
繁華市場1.4
21266
梨山花生醬2.8K
2.0
1.75
3.5
0610012
繁華市場1.4
51321
丹麥土司10片.
1.8
1.75
3.1
0610012
繁華市場1.4
51309
黃金花枝堡50g*20片
1.5
1.75
2.6
0610012
繁華市場1.4
22250
涼水舖-冷泡茶 50入
1.2
1.75
2.2
0610012
繁華市場1.4
22107
飛燕煉乳 375g.
1.2
1.75
2.2
0610012
繁華市場1.4
41029
安佳84片乳酪990g(紅).
1.0
1.75
1.8
0610012
繁華市場1.4
51318
立基冷凍起酥片12*13(約26片)
1.0
1.75
1.8
0610012
繁華市場1.4
51142
香雞城卡啦雞腿(大)辣 10片.
0.8
1.75
1.3
0610012
繁華市場1.4
56013
每天豬柳 1K
0.8
1.75
1.3
0610012
繁華市場1.4
21280
梨山草莓醬3.2k
0.8
1.75
1.3
0610012
繁華市場1.4
91115
檸檬酸(盛) 1K
1.2
1.00
1.2
0610012
繁華市場1.4
43044
HAPPY千島風味沙拉500g
0.5
1.75
0.9
0610012
繁華市場1.4
51701
立芳牛肉漢堡60g*20片
0.5
1.75
0.9
0610012
繁華市場1.4
39007
黑芝麻粉300g
0.5
1.75
0.9
0610012
繁華市場1.4
23141
可果美蕃茄醬 3.33k.
0.5
1.75
0.9
0610012
繁華市場1.4
96044
(獅)烏古月粉末(烏胡椒) 600g
0.5
1.75
0.9
0610012
繁華市場1.4
21260
香蒜抹醬(上焱) 800g
0.5
1.75
0.9
0610012
繁華市場1.4
51012
HISUN四角薯餅20片1260g
0.5
1.00
0.5
0610012
繁華市場1.4
23186
豪味豆油膏5L
0.5
1.00
0.5
0610012
繁華市場1.4
59163
切片培根 1K
0.5
1.00
0.5
0610012
繁華市場1.4
51144
香讚黑椒雞堡50片
0.2
1.75
0.4
0610012
繁華市場1.4
31044
玉米粉1k
0.2
1.75
0.4
0610012
繁華市場1.4
24070
一品酥油(紅酥)素 16k
0.2
1.75
0.4
0610012
繁華市場1.4
72229
四杯架 50個
0.2
1.75
0.4
0610012
繁華市場1.4
42022
心安草濃醇奶精1L
0.2
1.34
0.3
0610012
繁華市場1.4
13001
漢堡粉1k
0.2
1.00
0.2
0610012
繁華市場1.4
23188
豪味辣椒膏 5L
0.2
1.00
0.2
0610012
繁華市場1.4
22168
馬玉山杏仁粉600g
0.0
1.67
0.0
0610012
繁華市場1.4
*
1
0.0
1.00
0.0
0610046
永和-潭頭-1.4
22020
特調咖啡紅茶(免濾)100g*5包.
48.0
1.75
84.0
0610046
永和-潭頭-1.4
11001
咖啡風味調味粉 1k(棕).
42.0
1.75
73.5
0610046
永和-潭頭-1.4
31011
168奶精(不含乳(奶)) 1k.
24.0
1.75
42.0
0610046
永和-潭頭-1.4
51171
安美熱狗50條.
20.0
1.66
33.3
0610046
永和-潭頭-1.4
92503
氫氧化鈉(粒鹼) 1K
9.2
1.75
16.2
0610046
永和-潭頭-1.4
59132
安心漢堡肉40g*20片.
7.5
1.75
13.1
0610046
永和-潭頭-1.4
59142
香酥雞塊(HISUN) 3K.
4.0
1.75
7.0
0610046
永和-潭頭-1.4
23452
牛頭牌沙茶醬易開3k
3.5
1.75
6.1
0610046
永和-潭頭-1.4
57012
富統優質小火腿1K(120片)
5.0
1.00
5.0
0610046
永和-潭頭-1.4
31024
728醇奶精(不含乳(奶))1K.
3.0
1.00
3.0
0610046
永和-潭頭-1.4
21283
梨山草莓果醬900g
2.0
1.50
3.0
0610046
永和-潭頭-1.4
21290
梨山藍莓果醬900g
1.5
1.75
2.6
0610046
永和-潭頭-1.4
23144
可果美Q早餐蕃茄醬(軟袋)1K
1.5
1.75
2.6
0610046
永和-潭頭-1.4
21269
梨山花生醬800g
1.2
1.75
2.2
0610046
永和-潭頭-1.4
23504
烹大師鰹魚調味料(日本)1k
2.0
1.00
2.0
0610046
永和-潭頭-1.4
41029
安佳84片乳酪990g(紅).
0.8
1.75
1.3
0610046
永和-潭頭-1.4
31007
全脂奶粉2.25k
1.0
1.00
1.0
0610046
永和-潭頭-1.4
21229
福汎椰香奶酥 1.8K
1.0
1.00
1.0
0610046
永和-潭頭-1.4
12205
黑砂糖蜜 6k
1.0
1.00
1.0
0610046
永和-潭頭-1.4
21131
金鑽巧克力塗抹醬 3k
0.5
1.44
0.7
0610046
永和-潭頭-1.4
21287
梨山藍莓醬3.2K
0.2
1.75
0.4
1010037
美美早餐店(鹽埔)-1.4
41006
亞柏奶精 1公升.
48.8
1.75
85.3
1010037
美美早餐店(鹽埔)-1.4
25888
伊植麥玉米粒(易開)340g.
30.0
1.75
52.5
1010037
美美早餐店(鹽埔)-1.4
22020
特調咖啡紅茶(免濾)100g*5包.
30.0
1.75
52.5
1010037
美美早餐店(鹽埔)-1.4
53100
紅龍卡啦雞腿堡(辣味) 10片.
23.0
1.75
40.2
1010037
美美早餐店(鹽埔)-1.4
31099
二代紅450g
22.5
1.75
39.4
1010037
美美早餐店(鹽埔)-1.4
51351
金品義大利肉醬麵310g.
21.2
1.75
37.2
1010037
美美早餐店(鹽埔)-1.4
51171
安美熱狗50條.
19.5
1.61
31.4
1010037
美美早餐店(鹽埔)-1.4
26068
雙魚座鮪魚185g.
18.0
1.50
27.0
1010037
美美早餐店(鹽埔)-1.4
56041
抓餅(禾)10片.
14.0
1.75
24.5
1010037
美美早餐店(鹽埔)-1.4
51395
圓型披薩(總匯)120g.
13.0
1.75
22.8
1010037
美美早餐店(鹽埔)-1.4
51396
圓型披薩(夏威夷)120g.
11.8
1.75
20.6
1010037
美美早餐店(鹽埔)-1.4
51341
金品(黑胡椒)肉醬義大利麵 310g.
11.2
1.75
19.7
1010037
美美早餐店(鹽埔)-1.4
31101
三代450g
9.0
1.75
15.8
1010037
美美早餐店(鹽埔)-1.4
53211
日規薯餅20片.
8.5
1.75
14.9
1010037
美美早餐店(鹽埔)-1.4
53112
香香雞米花1K.
10.0
1.32
13.2
1010037
美美早餐店(鹽埔)-1.4
51265
金酥3/8脆薯2.04K.
8.5
1.39
11.9
1010037
美美早餐店(鹽埔)-1.4
24236
聯泰太白粉 1000g
6.8
1.75
11.8
1010037
美美早餐店(鹽埔)-1.4
53027
紅龍雞塊 1K.
6.5
1.75
11.4
1010037
美美早餐店(鹽埔)-1.4
41061
四季沙拉3K
6.5
1.75
11.4
1010037
美美早餐店(鹽埔)-1.4
51330
金品濃縮米漿 1.5k
6.5
1.68
10.9
1010037
美美早餐店(鹽埔)-1.4
23739
神駒牌玉米粒 340g(易開罐).
6.0
1.75
10.5
1010037
美美早餐店(鹽埔)-1.4
51311
紅龍香檸雞柳條 1K(約28條)
7.2
1.41
10.2
1010037
美美早餐店(鹽埔)-1.4
56017
翡翠抓餅(禾)10片.
5.8
1.75
10.1
1010037
美美早餐店(鹽埔)-1.4
51172
安美燻腸 1000g.
5.5
1.75
9.6
1010037
美美早餐店(鹽埔)-1.4
53007
黃金牛角(丹麥麵包) 6入.
5.2
1.75
9.2
1010037
美美早餐店(鹽埔)-1.4
51371
Hisun鬆餅(5片)
4.8
1.62
7.7
1010037
美美早餐店(鹽埔)-1.4
41189
HISUN起司片84片.
4.5
1.67
7.5
1010037
美美早餐店(鹽埔)-1.4
57064
厚切蘿蔔糕 1K
7.0
1.00
7.0
1010037
美美早餐店(鹽埔)-1.4
23001
四海鹽酥粉600g
3.8
1.75
6.6
1010037
美美早餐店(鹽埔)-1.4
23186
豪味豆油膏5L
3.8
1.75
6.6
1010037
美美早餐店(鹽埔)-1.4
53022
正點(原味)雞球 1K
3.8
1.75
6.6
1010037
美美早餐店(鹽埔)-1.4
31044
玉米粉1k
3.8
1.75
6.6
1010037
美美早餐店(鹽埔)-1.4
51035
南周抓肉餅 10片
3.5
1.75
6.1
1010037
美美早餐店(鹽埔)-1.4
23093
福鷹玉米粒340g(易開罐).
6.0
1.00
6.0
1010037
美美早餐店(鹽埔)-1.4
53089
千層地瓜拉餅 5片
4.0
1.40
5.6
1010037
美美早餐店(鹽埔)-1.4
59163
切片培根 1K
3.0
1.68
5.0
1010037
美美早餐店(鹽埔)-1.4
51130
香雞城小肉豆1K.
2.8
1.75
4.8
1010037
美美早餐店(鹽埔)-1.4
56013
每天豬柳 1K
2.8
1.75
4.8
1010037
美美早餐店(鹽埔)-1.4
51065
卜蜂高級雞肉火腿(切片)1.8k
4.2
1.00
4.2
1010037
美美早餐店(鹽埔)-1.4
22293
台糖二砂 25K
2.8
1.50
4.1
1010037
美美早餐店(鹽埔)-1.4
53057
奶皇包60g*12粒
2.2
1.75
3.9
1010037
美美早餐店(鹽埔)-1.4
22168
馬玉山杏仁粉600g
2.2
1.75
3.9
1010037
美美早餐店(鹽埔)-1.4
51321
丹麥土司10片.
3.8
1.00
3.8
1010037
美美早餐店(鹽埔)-1.4
23504
烹大師鰹魚調味料(日本)1k
1.8
1.75
3.1
1010037
美美早餐店(鹽埔)-1.4
51284
馬鈴薯條(HISUN) 2K.
1.8
1.75
3.1
1010037
美美早餐店(鹽埔)-1.4
53102
紅龍卡啦雞腿堡(原味) 10片.
1.5
1.75
2.6
1010037
美美早餐店(鹽埔)-1.4
23141
可果美蕃茄醬 3.33k.
1.5
1.75
2.6
1010037
美美早餐店(鹽埔)-1.4
51701
立芳牛肉漢堡60g*20片
1.5
1.75
2.6
1010037
美美早餐店(鹽埔)-1.4
23188
豪味辣椒膏 5L
1.2
1.75
2.2
1010037
美美早餐店(鹽埔)-1.4
51269
金品-中式燒餅30片
1.2
1.75
2.2
1010037
美美早餐店(鹽埔)-1.4
51142
香雞城卡啦雞腿(大)辣 10片.
1.2
1.70
2.1
1010037
美美早餐店(鹽埔)-1.4
23630
味之素1K
1.8
1.21
2.1
1010037
美美早餐店(鹽埔)-1.4
22107
飛燕煉乳 375g.
1.2
1.50
1.9
1010037
美美早餐店(鹽埔)-1.4
11002
草莓風味調味粉 1K
1.0
1.75
1.8
1010037
美美早餐店(鹽埔)-1.4
54011
奇津熟鍋貼1500g(約50粒)
1.0
1.75
1.8
1010037
美美早餐店(鹽埔)-1.4
51515
金品千層蛋餅皮 25片.
1.0
1.75
1.8
1010037
美美早餐店(鹽埔)-1.4
21280
梨山草莓醬3.2k
1.0
1.46
1.5
1010037
美美早餐店(鹽埔)-1.4
11099
抹茶奶酥700克
0.8
1.75
1.3
1010037
美美早餐店(鹽埔)-1.4
53103
乳酪餅(良晟) 14*14(15片)
0.8
1.75
1.3
1010037
美美早餐店(鹽埔)-1.4
23627
一番香Q雞絲50入
0.8
1.75
1.3
1010037
美美早餐店(鹽埔)-1.4
56054
正點黑胡椒雞堡20片
0.8
1.75
1.3
1010037
美美早餐店(鹽埔)-1.4
53006
A里堡(丹麥麵包) 6入
0.8
1.75
1.3
1010037
美美早餐店(鹽埔)-1.4
11003
可可風味調味粉 1k
0.8
1.75
1.3
1010037
美美早餐店(鹽埔)-1.4
51318
立基冷凍起酥片12*13(約26片)
1.2
1.00
1.2
1010037
美美早餐店(鹽埔)-1.4
21266
梨山花生醬2.8K
1.0
1.21
1.2
1010037
美美早餐店(鹽埔)-1.4
23452
牛頭牌沙茶醬易開3k
0.8
1.50
1.1
1010037
美美早餐店(鹽埔)-1.4
23168
品高蕃茄包10g*250包
0.5
1.75
0.9
1010037
美美早餐店(鹽埔)-1.4
51144
香讚黑椒雞堡50片
0.5
1.66
0.8
1010037
美美早餐店(鹽埔)-1.4
23611
寶馬牌粉絲 2700g
0.5
1.50
0.8
1010037
美美早餐店(鹽埔)-1.4
21140
金杯軟質牛奶巧克力 20K
0.5
1.21
0.6
1010037
美美早餐店(鹽埔)-1.4
51012
HISUN四角薯餅20片1260g
0.5
1.00
0.5
1010037
美美早餐店(鹽埔)-1.4
33032
太白粉2.5K
0.5
1.00
0.5
1010037
美美早餐店(鹽埔)-1.4
41029
安佳84片乳酪990g(紅).
0.2
1.75
0.4
1010037
美美早餐店(鹽埔)-1.4
21260
香蒜抹醬(上焱) 800g
0.2
1.75
0.4
1010037
美美早餐店(鹽埔)-1.4
31060
杏仁片 500g
0.2
1.75
0.4
1010037
美美早餐店(鹽埔)-1.4
23223
大安工研白醋中5l
0.2
1.75
0.4
1010037
美美早餐店(鹽埔)-1.4
31035
葡萄乾600g
0.2
1.75
0.4
1010037
美美早餐店(鹽埔)-1.4
21290
梨山藍莓果醬900g
0.2
1.40
0.4
1010037
美美早餐店(鹽埔)-1.4
42022
心安草濃醇奶精1L
0.2
1.34
0.3
1010037
美美早餐店(鹽埔)-1.4
71325
膠包斜口6吋全透明吸管 1K
0.2
1.00
0.2
1010037
美美早餐店(鹽埔)-1.4
71448
舒飛單抽式柔紙巾300抽
0.2
1.00
0.2
1010037
美美早餐店(鹽埔)-1.4
*
1
0.0
1.00
0.0
1010047
四海-新庄1.4
11001
咖啡風味調味粉 1k(棕).
59.5
1.33
78.9
1010047
四海-新庄1.4
22020
特調咖啡紅茶(免濾)100g*5包.
30.0
1.75
52.5
1010047
四海-新庄1.4
53100
紅龍卡啦雞腿堡(辣味) 10片.
37.8
1.39
52.3
1010047
四海-新庄1.4
51171
安美熱狗50條.
42.8
1.15
49.2
1010047
四海-新庄1.4
51109
台畜原味甲霸大熱狗20支
20.5
1.75
35.9
1010047
四海-新庄1.4
59132
安心漢堡肉40g*20片.
15.0
1.75
26.2
1010047
四海-新庄1.4
59142
香酥雞塊(HISUN) 3K.
14.0
1.75
24.5
1010047
四海-新庄1.4
31011
168奶精(不含乳(奶)) 1k.
12.0
1.50
18.0
1010047
四海-新庄1.4
51130
香雞城小肉豆1K.
9.0
1.75
15.8
1010047
四海-新庄1.4
11002
草莓風味調味粉 1K
9.0
1.75
15.8
1010047
四海-新庄1.4
57002
富統培根 1K.
8.0
1.75
14.0
1010047
四海-新庄1.4
31024
728醇奶精(不含乳(奶))1K.
9.0
1.00
9.0
1010047
四海-新庄1.4
56041
抓餅(禾)10片.
5.0
1.12
5.6
1010047
四海-新庄1.4
57012
富統優質小火腿1K(120片)
4.0
1.10
4.4
1010047
四海-新庄1.4
21229
福汎椰香奶酥 1.8K
1.0
1.75
1.8
1010047
四海-新庄1.4
41029
安佳84片乳酪990g(紅).
0.8
1.75
1.3
1010047
四海-新庄1.4
21131
金鑽巧克力塗抹醬 3k
0.8
1.75
1.3
1010047
四海-新庄1.4
23141
可果美蕃茄醬 3.33k.
0.5
1.75
0.9
1010047
四海-新庄1.4
21266
梨山花生醬2.8K
0.5
1.44
0.7
1010047
四海-新庄1.4
21134
瑪雅琳3k(白桶)
0.2
1.75
0.4
1010047
四海-新庄1.4
21280
梨山草莓醬3.2k
0.2
1.46
0.4
1310027
隘寮早點1.4
54061
強匠卡拉雞腿堡(辣味)10片.
102.0
1.75
178.5
1310027
隘寮早點1.4
59131
安心熱狗100支
12.2
1.75
21.4
1310027
隘寮早點1.4
25888
伊植麥玉米粒(易開)340g.
12.0
1.75
21.0
1310027
隘寮早點1.4
54021
奇津阿在伯手工蔥抓餅10入.
8.5
1.75
14.9
1310027
隘寮早點1.4
58039
古早味炸豬排10片
8.0
1.75
14.0
1310027
隘寮早點1.4
54060
強匠卡拉雞腿堡(原味)10片.
7.2
1.75
12.7
1310027
隘寮早點1.4
53042
四海蘿蔔糕 12片(紅)
7.0
1.75
12.2
1310027
隘寮早點1.4
51265
金酥3/8脆薯2.04K.
5.5
1.75
9.6
1310027
隘寮早點1.4
51452
家州黑胡椒腿肉排1K
2.2
1.75
3.9
1310027
隘寮早點1.4
23001
四海鹽酥粉600g
2.0
1.75
3.5
1310027
隘寮早點1.4
21227
福汎巧克力3K
1.2
1.50
1.9
1310027
隘寮早點1.4
11055
原味奶酥700g
1.0
1.75
1.8
1310027
隘寮早點1.4
51077
卜蜂業務用雞塊3k
1.0
1.75
1.8
1310027
隘寮早點1.4
51261
麥肯橢圓薯餅2.26K(約34片)
1.0
1.50
1.5
1310027
隘寮早點1.4
21266
梨山花生醬2.8K
0.8
1.75
1.3
1310027
隘寮早點1.4
51701
立芳牛肉漢堡60g*20片
0.8
1.75
1.3
1310027
隘寮早點1.4
21888
元氣豬肉鬆3K
0.8
1.75
1.3
1310027
隘寮早點1.4
51085
卜蜂早餐雞堡50g*50片
0.8
1.75
1.3
1310027
隘寮早點1.4
41120
法蘭克米其林起士片100片
0.8
1.33
1.0
1310027
隘寮早點1.4
23150
可果美蕃茄醬 4.5k.
0.5
1.75
0.9
1310027
隘寮早點1.4
21622
奇異鳥奶精(313) 25k
0.8
1.00
0.8
1310027
隘寮早點1.4
41189
HISUN起司片84片.
0.2
1.75
0.4
1310027
隘寮早點1.4
22084
福汎巧克力糖漿680g.
0.2
1.75
0.4
1310027
隘寮早點1.4
53028
正點煙燻雞肉片1K.
0.2
1.52
0.4
2510038
好野早午餐-佳冬2.5
51709
澳洲優質牛肉堡 80g
34.2
1.75
59.9
2510038
好野早午餐-佳冬2.5
23671
五木原味拉麵 65g
24.2
1.75
42.4
2510038
好野早午餐-佳冬2.5
23732
崁頂芝麻醬包40g
24.0
1.50
36.0
2510038
好野早午餐-佳冬2.5
61043
客製合版AP共用膜130*350米
17.0
1.75
29.8
2510038
好野早午餐-佳冬2.5
53056
冷凍熟鍋貼(禾)1500g(約50粒).
15.5
1.75
27.1
2510038
好野早午餐-佳冬2.5
51518
8吋原味墨西哥薄餅45g*12片
12.5
1.75
21.9
2510038
好野早午餐-佳冬2.5
41047
每天沙拉3K
13.5
1.57
21.2
2510038
好野早午餐-佳冬2.5
53112
香香雞米花1K.
12.0
1.75
21.0
2510038
好野早午餐-佳冬2.5
51321
丹麥土司10片.
19.0
1.10
20.9
2510038
好野早午餐-佳冬2.5
51706
立芳黑胡椒漢堡薄片50g*20片.
11.8
1.50
17.6
2510038
好野早午餐-佳冬2.5
41006
亞柏奶精 1公升.
12.0
1.41
16.9
2510038
好野早午餐-佳冬2.5
43044
HAPPY千島風味沙拉500g
6.5
1.75
11.4
2510038
好野早午餐-佳冬2.5
53103
乳酪餅(良晟) 14*14(15片)
6.0
1.75
10.5
2510038
好野早午餐-佳冬2.5
21862
天仁免濾茉香綠茶 75g
5.2
1.50
7.9
2510038
好野早午餐-佳冬2.5
57055
馬芬堡 20入
5.2
1.25
6.6
2510038
好野早午餐-佳冬2.5
11002
草莓風味調味粉 1K
4.2
1.50
6.4
2510038
好野早午餐-佳冬2.5
71181
8511蓋(850湯杯) 50個
3.5
1.75
6.1
2510038
好野早午餐-佳冬2.5
22106
耐司果醇味煉乳375g
3.2
1.75
5.7
2510038
好野早午餐-佳冬2.5
53119
經典雞塊1K
3.0
1.75
5.2
2510038
好野早午餐-佳冬2.5
71931
BO塑膠盒 1H100個
3.0
1.75
5.2
2510038
好野早午餐-佳冬2.5
21266
梨山花生醬2.8K
3.0
1.68
5.0
2510038
好野早午餐-佳冬2.5
96195
小磨坊西式胡椒鹽1K
2.8
1.75
4.8
2510038
好野早午餐-佳冬2.5
59016
卡啦脆魚條 1K(約27入)
2.8
1.75
4.8
2510038
好野早午餐-佳冬2.5
51311
紅龍香檸雞柳條 1K(約28條)
2.8
1.75
4.8
2510038
好野早午餐-佳冬2.5
24506
鳳冠牌整片鳳梨 565g
4.5
1.00
4.5
2510038
好野早午餐-佳冬2.5
51172
安美燻腸 1000g.
4.5
1.00
4.5
2510038
好野早午餐-佳冬2.5
22250
涼水舖-冷泡茶 50入
2.8
1.50
4.1
2510038
好野早午餐-佳冬2.5
56054
正點黑胡椒雞堡20片
2.2
1.75
3.9
2510038
好野早午餐-佳冬2.5
13007
鍋燒湯粉1k
2.2
1.75
3.9
2510038
好野早午餐-佳冬2.5
52183
唐辛子帶環腿排220g*5片
2.0
1.75
3.5
2510038
好野早午餐-佳冬2.5
72305
橡皮圈(中)#16條
2.0
1.75
3.5
2510038
好野早午餐-佳冬2.5
51261
麥肯橢圓薯餅2.26K(約34片)
2.0
1.75
3.5
2510038
好野早午餐-佳冬2.5
71409
紙850湯杯(白) 50入
1.8
1.75
3.1
2510038
好野早午餐-佳冬2.5
71414
1000cc紙湯杯50個
1.8
1.75
3.1
2510038
好野早午餐-佳冬2.5
21754
喜多顆粒柳橙濃糖果漿 2.4k
2.2
1.35
3.0
2510038
好野早午餐-佳冬2.5
71825
超薄袋半斤
3.0
1.00
3.0
2510038
好野早午餐-佳冬2.5
53007
黃金牛角(丹麥麵包) 6入.
3.0
1.00
3.0
2510038
好野早午餐-佳冬2.5
51263
麥肯洋蔥圈907g
2.0
1.50
3.0
2510038
好野早午餐-佳冬2.5
23627
一番香Q雞絲50入
1.5
1.75
2.6
2510038
好野早午餐-佳冬2.5
24074
乳瑪琳(大) 440g
1.5
1.75
2.6
2510038
好野早午餐-佳冬2.5
51365
讚岐烏龍麵240g*5片
1.5
1.75
2.6
2510038
好野早午餐-佳冬2.5
53021
正點起司雞排10入
1.8
1.30
2.3
2510038
好野早午餐-佳冬2.5
21283
梨山草莓果醬900g
1.2
1.75
2.2
2510038
好野早午餐-佳冬2.5
71890
三明治袋p
1.2
1.75
2.2
2510038
好野早午餐-佳冬2.5
42022
心安草濃醇奶精1L
1.5
1.34
2.0
2510038
好野早午餐-佳冬2.5
56056
日式香酥魚堡 25入
1.0
1.75
1.8
2510038
好野早午餐-佳冬2.5
21229
福汎椰香奶酥 1.8K
1.0
1.75
1.8
2510038
好野早午餐-佳冬2.5
23410
美味大師(強蒜)麵包醬 470g
0.8
1.75
1.3
2510038
好野早午餐-佳冬2.5
51309
黃金花枝堡50g*20片
1.2
1.00
1.2
2510038
好野早午餐-佳冬2.5
71891
0號夾鏈袋 10入
1.2
1.00
1.2
2510038
好野早午餐-佳冬2.5
71951
小圓盒L003 100入
1.2
1.00
1.2
2510038
好野早午餐-佳冬2.5
59147
日式大豬排120G*50片
0.5
1.75
0.9
2510038
好野早午餐-佳冬2.5
54008
Hisun搖滾雞球1K(約80顆)
0.5
1.75
0.9
2510038
好野早午餐-佳冬2.5
53041
炸小熱狗50支(胖胖狗)
0.8
1.00
0.8
2510038
好野早午餐-佳冬2.5
72341
4寸叉包
0.8
1.00
0.8
2510038
好野早午餐-佳冬2.5
*
1
0.0
1.00
0.0
5870001
新月牛角烘焙食品行
41210
新月優質沙拉(袋)3K
170.2
1.75
297.9
5870001
新月牛角烘焙食品行
21888
元氣豬肉鬆3K
13.5
1.75
23.6
5870001
新月牛角烘焙食品行
41061
四季沙拉3K
7.0
1.71
11.9
5890006
夭巴ㄔㄚˋ1.4
23838
維力媽媽拉麵 70g*6入.
47.5
1.75
83.1
5890006
夭巴ㄔㄚˋ1.4
41018
香Q蛋餅皮(原)30入.(紅字)
10.0
1.75
17.5
5890006
夭巴ㄔㄚˋ1.4
53045
祥哥冷凍蘿蔔糕12片.(白)
10.0
1.75
17.5
5890006
夭巴ㄔㄚˋ1.4
51518
8吋原味墨西哥薄餅45g*12片
10.0
1.75
17.5
5890006
夭巴ㄔㄚˋ1.4
31011
168奶精(不含乳(奶)) 1k.
9.0
1.75
15.8
5890006
夭巴ㄔㄚˋ1.4
51433
港式菠蘿 6入
6.8
1.75
11.8
5890006
夭巴ㄔㄚˋ1.4
32062
亞薩阿薩母紅茶600g
6.5
1.75
11.4
5890006
夭巴ㄔㄚˋ1.4
51284
馬鈴薯條(HISUN) 2K.
6.0
1.75
10.5
5890006
夭巴ㄔㄚˋ1.4
51466
Hisun鬆餅(5片)原味
5.2
1.75
9.2
5890006
夭巴ㄔㄚˋ1.4
51130
香雞城小肉豆1K.
5.0
1.75
8.8
5890006
夭巴ㄔㄚˋ1.4
51012
HISUN四角薯餅20片1260g
5.0
1.75
8.8
5890006
夭巴ㄔㄚˋ1.4
51171
安美熱狗50條.
4.5
1.75
7.9
5890006
夭巴ㄔㄚˋ1.4
54061
強匠卡拉雞腿堡(辣味)10片.
4.0
1.75
7.0
5890006
夭巴ㄔㄚˋ1.4
54057
黃金手工蔥抓餅10片.
4.0
1.75
7.0
5890006
夭巴ㄔㄚˋ1.4
13007
鍋燒湯粉1k
4.0
1.75
7.0
5890006
夭巴ㄔㄚˋ1.4
54008
Hisun搖滾雞球1K(約80顆)
3.2
1.75
5.7
5890006
夭巴ㄔㄚˋ1.4
54060
強匠卡拉雞腿堡(原味)10片.
3.0
1.75
5.2
5890006
夭巴ㄔㄚˋ1.4
51263
麥肯洋蔥圈907g
2.8
1.75
4.8
5890006
夭巴ㄔㄚˋ1.4
41189
HISUN起司片84片.
2.5
1.75
4.4
5890006
夭巴ㄔㄚˋ1.4
22250
涼水舖-冷泡茶 50入
2.0
1.75
3.5
5890006
夭巴ㄔㄚˋ1.4
25888
伊植麥玉米粒(易開)340g.
2.0
1.75
3.5
5890006
夭巴ㄔㄚˋ1.4
51172
安美燻腸 1000g.
1.8
1.75
3.1
5890006
夭巴ㄔㄚˋ1.4
44062
愛心屋韓式泡菜3K
1.5
1.75
2.6
5890006
夭巴ㄔㄚˋ1.4
51438
家州黑胡椒里肌豬排(白盤)20片
1.5
1.75
2.6
5890006
夭巴ㄔㄚˋ1.4
54043
強匠煙燻雞肉片1公斤
1.2
1.75
2.2
5890006
夭巴ㄔㄚˋ1.4
11055
原味奶酥700g
1.0
1.75
1.8
5890006
夭巴ㄔㄚˋ1.4
51190
安美煙燻大火腿 1K
1.0
1.75
1.8
5890006
夭巴ㄔㄚˋ1.4
22144
冬瓜糖 6K(普).
1.0
1.75
1.8
5890006
夭巴ㄔㄚˋ1.4
21131
金鑽巧克力塗抹醬 3k
1.0
1.75
1.8
5890006
夭巴ㄔㄚˋ1.4
23452
牛頭牌沙茶醬易開3k
0.8
1.75
1.3
5890006
夭巴ㄔㄚˋ1.4
22084
福汎巧克力糖漿680g.
0.8
1.75
1.3
5890006
夭巴ㄔㄚˋ1.4
41042
四海沙拉(大) 3k
0.5
1.75
0.9
5890006
夭巴ㄔㄚˋ1.4
23168
品高蕃茄包10g*250包
0.5
1.75
0.9
5890006
夭巴ㄔㄚˋ1.4
23154
可果美快餐用蕃茄醬 3.15k
0.5
1.75
0.9
5890006
夭巴ㄔㄚˋ1.4
22236
台糖特砂 25K
0.5
1.75
0.9
5890006
夭巴ㄔㄚˋ1.4
51706
立芳黑胡椒漢堡薄片50g*20片.
0.5
1.75
0.9
5890006
夭巴ㄔㄚˋ1.4
96166
小磨坊香辣椒鹽粉(1)600g.
0.5
1.00
0.5
5890006
夭巴ㄔㄚˋ1.4
53043
炸大熱狗25支
0.2
1.75
0.4
5890006
夭巴ㄔㄚˋ1.4
22138
蜂蜜『調味』糖漿 3K
0.2
1.75
0.4
5890006
夭巴ㄔㄚˋ1.4
21266
梨山花生醬2.8K
0.2
1.75
0.4
5890006
夭巴ㄔㄚˋ1.4
23361
肉鬆 3K
0.2
1.26
0.3
Predictions for New Customers (2 Samples)
Code
# Select 2 new customers with highest 2026 baseline revenue
sample_new_customers = (
baseline_2026_customer_revenue
.filter (pl.col("customer_code" ).is_in(list (new_customers_2026)))
.sort("baseline_total_revenue_2026" , descending= True )
.head(2 )
["customer_code" ]
.to_list()
)
print (f"Selected { len (sample_new_customers)} new customers for display" )
# Predictions for new customers
sample_predictions_new = (
predictions_new
.filter (pl.col("customer_code" ).is_in(sample_new_customers))
.join(customers_lookup, on= "customer_code" , how= "left" )
.join(products_lookup, on= "item_code" , how= "left" )
.select([
"customer_code" , "trade_name" , "item_code" , "product_name" ,
"baseline_qty_2026" , "applied_lift" , "predicted_rush_qty"
])
.sort(["customer_code" , "predicted_rush_qty" ], descending= [False , True ])
)
(
GT(sample_predictions_new)
.tab_header(
title= "2026 Rush Predictions - New Customers" ,
subtitle= "2 customers active in 2026 but not in 2025 baseline"
)
.fmt_number("baseline_qty_2026" , decimals= 1 )
.fmt_number("applied_lift" , decimals= 2 )
.fmt_number("predicted_rush_qty" , decimals= 1 )
.cols_label(
customer_code= "Customer Code" ,
trade_name= "Customer Name" ,
item_code= "SKU" ,
product_name= "Product Name" ,
baseline_qty_2026= "2026 Baseline Qty (2wk)" ,
applied_lift= "Adjusted Lift" ,
predicted_rush_qty= "Predicted Rush Qty"
)
)
Selected 2 new customers for display
2 customers active in 2026 but not in 2025 baseline
1390013
糧倉307_1.4
54063
羅勒青醬130g
57.5
1.47
84.3
1390013
糧倉307_1.4
51299
薄脆蔥抓餅90g*10片
34.5
1.75
60.4
1390013
糧倉307_1.4
52196
日式椒鹽雞胸肉100g
25.0
1.75
43.8
1390013
糧倉307_1.4
25888
伊植麥玉米粒(易開)340g.
24.0
1.75
42.0
1390013
糧倉307_1.4
26068
雙魚座鮪魚185g.
18.0
1.51
27.1
1390013
糧倉307_1.4
23615
金藤1.8mm長麵 1000g.
14.0
1.75
24.5
1390013
糧倉307_1.4
42014
歐登堡動物性鮮奶油1L
11.5
1.75
20.1
1390013
糧倉307_1.4
51702
法式原味切片(A32) 2入
10.8
1.75
18.8
1390013
糧倉307_1.4
22020
特調咖啡紅茶(免濾)100g*5包.
10.0
1.75
17.5
1390013
糧倉307_1.4
51321
丹麥土司10片.
10.0
1.53
15.3
1390013
糧倉307_1.4
69620
開店設計費
15.2
1.00
15.2
1390013
糧倉307_1.4
53131
韓式炸雞1K
15.0
1.00
15.0
1390013
糧倉307_1.4
51442
香草腿排10片120g
7.2
1.75
12.7
1390013
糧倉307_1.4
51401
吉康燻雞肉片1k
7.0
1.75
12.2
1390013
糧倉307_1.4
59128
家州黑胡椒(醬燒)里肌(透明盤)1.2K
7.2
1.53
11.1
1390013
糧倉307_1.4
23739
神駒牌玉米粒 340g(易開罐).
6.0
1.75
10.5
1390013
糧倉307_1.4
11003
可可風味調味粉 1k
5.8
1.75
10.1
1390013
糧倉307_1.4
51265
金酥3/8脆薯2.04K.
5.2
1.75
9.2
1390013
糧倉307_1.4
59163
切片培根 1K
9.0
1.00
9.0
1390013
糧倉307_1.4
51172
安美燻腸 1000g.
5.0
1.75
8.8
1390013
糧倉307_1.4
51387
8吋瑪格麗特水牛乳酪200g
4.5
1.75
7.9
1390013
糧倉307_1.4
51386
8吋薩克森香腸切達起司255g
4.5
1.75
7.9
1390013
糧倉307_1.4
59016
卡啦脆魚條 1K(約27入)
4.5
1.75
7.9
1390013
糧倉307_1.4
51385
8吋佛羅倫斯迷迭香春雞245g
4.5
1.75
7.9
1390013
糧倉307_1.4
54008
Hisun搖滾雞球1K(約80顆)
4.0
1.75
7.0
1390013
糧倉307_1.4
43044
HAPPY千島風味沙拉500g
4.0
1.75
7.0
1390013
糧倉307_1.4
51056
手感蔓越莓亞麻子麵包 220g
5.8
1.20
6.9
1390013
糧倉307_1.4
53102
紅龍卡啦雞腿堡(原味) 10片.
3.8
1.75
6.6
1390013
糧倉307_1.4
11087
新美式風味咖啡600g.
3.8
1.75
6.6
1390013
糧倉307_1.4
51384
8吋夏威夷重乳酪240g
3.8
1.75
6.6
1390013
糧倉307_1.4
31011
168奶精(不含乳(奶)) 1k.
4.2
1.48
6.3
1390013
糧倉307_1.4
58039
古早味炸豬排10片
3.5
1.75
6.1
1390013
糧倉307_1.4
53112
香香雞米花1K.
3.2
1.75
5.7
1390013
糧倉307_1.4
22428
田園全脂保久純牛乳 1公升.
3.0
1.75
5.2
1390013
糧倉307_1.4
51130
香雞城小肉豆1K.
2.5
1.75
4.4
1390013
糧倉307_1.4
41094
憶霖塔塔醬500g
2.2
1.75
3.9
1390013
糧倉307_1.4
57001
富統小熱狗50支
2.2
1.75
3.9
1390013
糧倉307_1.4
51261
麥肯橢圓薯餅2.26K(約34片)
3.2
1.19
3.9
1390013
糧倉307_1.4
53027
紅龍雞塊 1K.
2.0
1.75
3.5
1390013
糧倉307_1.4
41042
四海沙拉(大) 3k
2.0
1.75
3.5
1390013
糧倉307_1.4
23131
玉米濃湯粉1k
2.0
1.75
3.5
1390013
糧倉307_1.4
11002
草莓風味調味粉 1K
1.5
1.75
2.6
1390013
糧倉307_1.4
53100
紅龍卡啦雞腿堡(辣味) 10片.
1.5
1.75
2.6
1390013
糧倉307_1.4
54043
強匠煙燻雞肉片1公斤
2.0
1.31
2.6
1390013
糧倉307_1.4
21260
香蒜抹醬(上焱) 800g
1.2
1.75
2.2
1390013
糧倉307_1.4
53036
QQ棒 1K
1.0
1.75
1.8
1390013
糧倉307_1.4
41020
紐西蘭安佳奶油(無添加鹽) 454g
1.2
1.00
1.2
1390013
糧倉307_1.4
59147
日式大豬排120G*50片
1.0
1.00
1.0
1390013
糧倉307_1.4
23168
品高蕃茄包10g*250包
0.5
1.75
0.9
1390013
糧倉307_1.4
23154
可果美快餐用蕃茄醬 3.15k
0.5
1.75
0.9
1390013
糧倉307_1.4
13007
鍋燒湯粉1k
0.5
1.75
0.9
1390013
糧倉307_1.4
41093
憶霖蜂蜜芥末沙拉醬500g
0.5
1.75
0.9
1390013
糧倉307_1.4
23268
大茂幼筍3K
0.8
1.00
0.8
1390013
糧倉307_1.4
21266
梨山花生醬2.8K
0.5
1.44
0.7
1390013
糧倉307_1.4
53014
正點卡啦雞腿堡(原味)10片.
0.5
1.44
0.7
1390013
糧倉307_1.4
21131
金鑽巧克力塗抹醬 3k
0.5
1.44
0.7
1390013
糧倉307_1.4
53017
正點卡啦雞腿堡(辣)10片.
0.5
1.30
0.6
1390013
糧倉307_1.4
51178
安美三明治火腿《3K》
0.5
1.27
0.6
1390013
糧倉307_1.4
23452
牛頭牌沙茶醬易開3k
0.5
1.18
0.6
1390013
糧倉307_1.4
96173
小磨坊粗粒黑胡椒600g
0.2
1.75
0.4
1390013
糧倉307_1.4
54065
強匠招牌鹽酥雞500公克
0.2
1.75
0.4
1390013
糧倉307_1.4
11099
抹茶奶酥700克
0.2
1.75
0.4
1390013
糧倉307_1.4
55026
田園活性優格菌 2g*30入(甜味)
0.2
1.75
0.4
1390013
糧倉307_1.4
51404
吉康三杯雞1k
0.2
1.38
0.3
1390013
糧倉307_1.4
23504
烹大師鰹魚調味料(日本)1k
0.2
1.06
0.3
1390013
糧倉307_1.4
96166
小磨坊香辣椒鹽粉(1)600g.
0.2
1.00
0.2
4290011
呷歸岡高雄三民店1.4
54064
強匠嫩煎雞腿排210g
43.8
1.75
76.6
4290011
呷歸岡高雄三民店1.4
53045
祥哥冷凍蘿蔔糕12片.(白)
17.5
1.75
30.6
4290011
呷歸岡高雄三民店1.4
31011
168奶精(不含乳(奶)) 1k.
18.0
1.48
26.7
4290011
呷歸岡高雄三民店1.4
51518
8吋原味墨西哥薄餅45g*12片
15.0
1.75
26.2
4290011
呷歸岡高雄三民店1.4
51401
吉康燻雞肉片1k
9.2
1.75
16.2
4290011
呷歸岡高雄三民店1.4
54061
強匠卡拉雞腿堡(辣味)10片.
7.8
1.75
13.6
4290011
呷歸岡高雄三民店1.4
51284
馬鈴薯條(HISUN) 2K.
7.5
1.75
13.1
4290011
呷歸岡高雄三民店1.4
54060
強匠卡拉雞腿堡(原味)10片.
7.0
1.75
12.2
4290011
呷歸岡高雄三民店1.4
22107
飛燕煉乳 375g.
7.0
1.75
12.2
4290011
呷歸岡高雄三民店1.4
51438
家州黑胡椒里肌豬排(白盤)20片
6.5
1.75
11.4
4290011
呷歸岡高雄三民店1.4
11002
草莓風味調味粉 1K
4.5
1.75
7.9
4290011
呷歸岡高雄三民店1.4
11003
可可風味調味粉 1k
4.0
1.75
7.0
4290011
呷歸岡高雄三民店1.4
41042
四海沙拉(大) 3k
4.0
1.75
7.0
4290011
呷歸岡高雄三民店1.4
51121
台畜培根A1k
6.2
1.00
6.2
4290011
呷歸岡高雄三民店1.4
41189
HISUN起司片84片.
3.8
1.67
6.2
4290011
呷歸岡高雄三民店1.4
51012
HISUN四角薯餅20片1260g
4.0
1.00
4.0
4290011
呷歸岡高雄三民店1.4
23154
可果美快餐用蕃茄醬 3.15k
1.8
1.75
3.1
4290011
呷歸岡高雄三民店1.4
57001
富統小熱狗50支
1.5
1.75
2.6
4290011
呷歸岡高雄三民店1.4
22028
古早味紅茶 50g*60包
1.2
1.75
2.2
4290011
呷歸岡高雄三民店1.4
21131
金鑽巧克力塗抹醬 3k
1.2
1.44
1.8
4290011
呷歸岡高雄三民店1.4
22250
涼水舖-冷泡茶 50入
1.0
1.75
1.8
4290011
呷歸岡高雄三民店1.4
22144
冬瓜糖 6K(普).
1.0
1.75
1.8
4290011
呷歸岡高雄三民店1.4
56014
每天雞柳 1k
1.2
1.27
1.6
4290011
呷歸岡高雄三民店1.4
21228
福汎花生醬 3K
1.0
1.31
1.3
4290011
呷歸岡高雄三民店1.4
41029
安佳84片乳酪990g(紅).
0.8
1.57
1.2
4290011
呷歸岡高雄三民店1.4
23925
好滋味油膏4200公克
0.8
1.38
1.0
4290011
呷歸岡高雄三民店1.4
21229
福汎椰香奶酥 1.8K
0.8
1.37
1.0
4290011
呷歸岡高雄三民店1.4
23361
肉鬆 3K
0.8
1.26
0.9
4290011
呷歸岡高雄三民店1.4
51045
味你好冷凍熟水餃(約200粒)
0.5
1.75
0.9
4290011
呷歸岡高雄三民店1.4
21134
瑪雅琳3k(白桶)
0.5
1.75
0.9
4290011
呷歸岡高雄三民店1.4
51709
澳洲優質牛肉堡 80g
0.5
1.75
0.9
4290011
呷歸岡高雄三民店1.4
23456
福華沙茶醬 3K
0.5
1.16
0.6
4290011
呷歸岡高雄三民店1.4
32071
彩色米 900g
0.5
1.04
0.5
4290011
呷歸岡高雄三民店1.4
32062
亞薩阿薩母紅茶600g
0.2
1.75
0.4
4290011
呷歸岡高雄三民店1.4
23172
品高黑胡椒鹽1g*1000包
0.2
1.75
0.4
4290011
呷歸岡高雄三民店1.4
21885
錫蘭紅茶25g*24包
0.2
1.00
0.2
4290011
呷歸岡高雄三民店1.4
26068
雙魚座鮪魚185g.
0.0
1.51
0.0
Revenue Predictions Summary
Code
# Calculate total predicted revenue from customers in 2026 baseline
total_predicted_revenue_returning = predictions_returning["predicted_rush_revenue" ].sum ()
total_predicted_revenue_new = predictions_new["predicted_rush_revenue" ].sum ()
total_predicted_revenue_baseline_customers = total_predicted_revenue_returning + total_predicted_revenue_new
# Estimate rush-only customer revenue using 2025 factor
# Rush-only customers = customers who will appear ONLY during 2026 rush (not in 2026 baseline)
estimated_rush_only_revenue_2026 = total_predicted_revenue_baseline_customers * rush_only_factor
# Total predicted revenue including rush-only estimate
total_predicted_revenue = total_predicted_revenue_baseline_customers + estimated_rush_only_revenue_2026
# 2026 baseline revenue
total_baseline_2026 = baseline_2026_customer_revenue["baseline_total_revenue_2026" ].sum ()
revenue_summary = pl.DataFrame({
"Category" : [
"2026 Baseline Revenue (2wk normalized)" ,
"Predicted Rush Revenue - Returning Customers (in 2025 baseline)" ,
"Predicted Rush Revenue - New Customers (in 2026 baseline only)" ,
"Subtotal: Customers in 2026 Baseline" ,
f"Estimated Rush-Only Customer Revenue ( { rush_only_factor* 100 :.2f} % factor)" ,
"Total Predicted Rush Revenue" ,
"Implied Overall Lift (vs 2026 baseline)"
],
"Value" : [
f"TWD { total_baseline_2026:,.0f} " ,
f"TWD { total_predicted_revenue_returning:,.0f} " ,
f"TWD { total_predicted_revenue_new:,.0f} " ,
f"TWD { total_predicted_revenue_baseline_customers:,.0f} " ,
f"TWD { estimated_rush_only_revenue_2026:,.0f} " ,
f"TWD { total_predicted_revenue:,.0f} " ,
f" { total_predicted_revenue / total_baseline_2026:.2f} x"
]
})
(
GT(revenue_summary)
.tab_header(
title= "2026 CNY Rush Revenue Predictions" ,
subtitle= "Based on adjusted lift factors from 2025 + rush-only customer factor"
)
)
Based on adjusted lift factors from 2025 + rush-only customer factor
2026 Baseline Revenue (2wk normalized)
TWD 6,959,112
Predicted Rush Revenue - Returning Customers (in 2025 baseline)
TWD 9,709,827
Predicted Rush Revenue - New Customers (in 2026 baseline only)
TWD 830,310
Subtotal: Customers in 2026 Baseline
TWD 10,540,137
Estimated Rush-Only Customer Revenue (3.71% factor)
TWD 391,433
Total Predicted Rush Revenue
TWD 10,931,570
Implied Overall Lift (vs 2026 baseline)
1.57x
Export 2026 Forecasts
Export all customer-SKU forecasts to CSV (local) or Google Sheets (cloud).
Code
# Combine returning and new customer predictions
all_predictions = pl.concat([
predictions_returning.select([
"customer_code" , "item_code" , "baseline_qty_2026" , "baseline_revenue_2026" ,
"applied_lift" , "predicted_rush_qty" , "predicted_rush_revenue"
]).with_columns(pl.lit("returning" ).alias("customer_type" )),
predictions_new.select([
"customer_code" , "item_code" , "baseline_qty_2026" , "baseline_revenue_2026" ,
"applied_lift" , "predicted_rush_qty" , "predicted_rush_revenue"
]).with_columns(pl.lit("new_in_2026" ).alias("customer_type" ))
])
# Add customer and product names
export_data = (
all_predictions
.join(customers_lookup, on= "customer_code" , how= "left" )
.join(products_lookup, on= "item_code" , how= "left" )
.select([
"customer_code" , "trade_name" , "delivery_route" , "item_code" , "product_name" ,
"customer_type" , "baseline_qty_2026" , "baseline_revenue_2026" ,
"applied_lift" , "predicted_rush_qty" , "predicted_rush_revenue"
])
.sort(["delivery_route" , "customer_code" , "item_code" ])
)
# Add metadata columns
export_data = export_data.with_columns([
pl.lit(date.today().isoformat()).alias("forecast_date" ),
pl.lit(google_sheets_env).alias("environment" ),
])
print (f"Total forecast records: { len (export_data):,} " )
print (f"Returning customers: { (export_data['customer_type' ] == 'returning' ). sum ():,} " )
print (f"New customers: { (export_data['customer_type' ] == 'new_in_2026' ). sum ():,} " )
Total forecast records: 15,862
Returning customers: 14,315
New customers: 1,547
Code
# Export based on environment
if google_can_write():
# Cloud environment: write to Google Sheets
sheet_name = f"CNY2026_Forecasts_ { google_sheets_env} _ { date. today(). strftime('%Y%m %d ' )} "
sheet_url = google_write_sheet(
data= export_data,
sheet_name= sheet_name,
sheet_tab= "customer_sku_forecasts" ,
)
if sheet_url:
print (f" \n **Google Sheet URL:** { sheet_url} " )
else :
# Local environment: write to CSV in system temp directory
tmp_dir = Path("/tmp" )
csv_filename = f"cny2026_forecasts_ { date. today(). strftime('%Y%m %d ' )} .csv"
csv_path = tmp_dir / csv_filename
export_data.write_csv(csv_path)
print (f" \n **CSV exported to:** { csv_path} " )
print (f"Records: { len (export_data):,} " )
Created sheet: https://docs.google.com/spreadsheets/d/1qpWntgMtStTGjB6WIuW0cQ0pDEbaHe2L3eHD8Wvbdnk
**Google Sheet URL:** https://docs.google.com/spreadsheets/d/1qpWntgMtStTGjB6WIuW0cQ0pDEbaHe2L3eHD8Wvbdnk
Retail Store Analysis
This section analyzes retail store-level lift factors for the 4 retail stores. Unlike delivery (customer-level), retail is aggregated at the store-SKU level due to sparser member data.
2025 Baseline Store-SKU Quantities
Code
# Store-SKU quantity during baseline period
# Exclude store 00 (warehouse) and special order items
retail_baseline_store_sku = (
retail_sales
.filter (_.store_code != "00" )
.filter (_.business_date >= BASELINE_START)
.filter (_.business_date <= BASELINE_END)
.join(
retail_sale_lines,
[
retail_sales.business_date == retail_sale_lines.business_date,
retail_sales.store_code == retail_sale_lines.store_code,
retail_sales.terminal_code == retail_sale_lines.terminal_code,
retail_sales.transaction_serial_number == retail_sale_lines.transaction_serial_number,
],
)
.filter (~ _.product_code.isin(excluded_items))
.group_by(["store_code" , "product_code" ])
.agg(
total_qty= _.quantity.cast("float64" ).sum (),
total_revenue= _.pretax_subtotal.cast("float64" ).sum ()
)
.to_polars()
)
# Normalize to 2-week equivalent
retail_baseline_store_sku = retail_baseline_store_sku.with_columns([
(pl.col("total_qty" ) / BASELINE_NORMALIZATION_FACTOR).alias("baseline_qty" ),
(pl.col("total_revenue" ) / BASELINE_NORMALIZATION_FACTOR).alias("baseline_revenue" )
]).select(["store_code" , "product_code" , "baseline_qty" , "baseline_revenue" ])
print (f"Retail Baseline store-SKU pairs: { len (retail_baseline_store_sku):,} " )
print (f"Stores: { retail_baseline_store_sku['store_code' ]. n_unique()} " )
print (f"Unique SKUs: { retail_baseline_store_sku['product_code' ]. n_unique():,} " )
Retail Baseline store-SKU pairs: 2,858
Stores: 4
Unique SKUs: 837
2025 Rush Store-SKU Quantities
Code
# Store-SKU quantity during rush period
retail_rush_store_sku = (
retail_sales
.filter (_.store_code != "00" )
.filter (_.business_date >= RUSH_START)
.filter (_.business_date <= RUSH_END)
.join(
retail_sale_lines,
[
retail_sales.business_date == retail_sale_lines.business_date,
retail_sales.store_code == retail_sale_lines.store_code,
retail_sales.terminal_code == retail_sale_lines.terminal_code,
retail_sales.transaction_serial_number == retail_sale_lines.transaction_serial_number,
],
)
.filter (~ _.product_code.isin(excluded_items))
.group_by(["store_code" , "product_code" ])
.agg(
rush_qty= _.quantity.cast("float64" ).sum (),
rush_revenue= _.pretax_subtotal.cast("float64" ).sum ()
)
.to_polars()
)
print (f"Retail Rush store-SKU pairs: { len (retail_rush_store_sku):,} " )
print (f"Stores: { retail_rush_store_sku['store_code' ]. n_unique()} " )
print (f"Unique SKUs: { retail_rush_store_sku['product_code' ]. n_unique():,} " )
Retail Rush store-SKU pairs: 2,551
Stores: 4
Unique SKUs: 818
Store-SKU Lift Factors
Code
# Calculate store-SKU lift factors
retail_store_sku_lift = (
retail_rush_store_sku
.join(retail_baseline_store_sku, on= ["store_code" , "product_code" ], how= "left" )
.with_columns([
pl.col("baseline_qty" ).fill_null(0.0 ),
pl.col("baseline_revenue" ).fill_null(0.0 )
])
.with_columns([
pl.when(pl.col("baseline_qty" ) > 0 )
.then(pl.col("rush_qty" ) / pl.col("baseline_qty" ))
.otherwise(pl.lit(1.5 )) # Cap for SKUs not in baseline
.alias("qty_lift_factor" )
])
)
print (f"Store-SKU pairs with lift: { len (retail_store_sku_lift):,} " )
print (f"SKUs with capped lift (new in rush): { (retail_store_sku_lift['baseline_qty' ] == 0 ). sum ():,} " )
print (f"Avg store-SKU lift: { retail_store_sku_lift['qty_lift_factor' ]. mean():.2f} x" )
print (f"Median store-SKU lift: { retail_store_sku_lift['qty_lift_factor' ]. median():.2f} x" )
Store-SKU pairs with lift: 2,551
SKUs with capped lift (new in rush): 45
Avg store-SKU lift: 1.99x
Median store-SKU lift: 1.46x
Store Revenue Summary
Code
# Calculate per-store baseline revenue
retail_baseline_store_revenue = (
retail_baseline_store_sku
.group_by("store_code" )
.agg(pl.col("baseline_revenue" ).sum ().alias("baseline_total_revenue" ))
)
# Calculate per-store rush revenue
retail_rush_store_revenue = (
retail_rush_store_sku
.group_by("store_code" )
.agg(pl.col("rush_revenue" ).sum ().alias("rush_total_revenue" ))
)
# Combine and calculate lift
retail_store_revenue_lift = (
retail_rush_store_revenue
.join(retail_baseline_store_revenue, on= "store_code" , how= "left" )
.with_columns([
(pl.col("rush_total_revenue" ) / pl.col("baseline_total_revenue" )).alias("revenue_lift_factor" )
])
.with_columns([
pl.col("store_code" ).replace(STORE_NAMES).alias("store_name" )
])
.sort("store_code" )
)
print ("Per-store revenue lift:" )
for row in retail_store_revenue_lift.iter_rows(named= True ):
print (f" { row['store_code' ]} ( { row['store_name' ]} ): { row['revenue_lift_factor' ]:.2f} x" )
Per-store revenue lift:
01 (Pingtung City): 1.29x
02 (Chaozhou): 1.37x
03 (Hengchun): 1.72x
04 (Donggang): 1.43x
Code
# Display store revenue summary table
(
GT(retail_store_revenue_lift.select([
"store_code" , "store_name" , "baseline_total_revenue" , "rush_total_revenue" , "revenue_lift_factor"
]))
.tab_header(
title= "Retail Store Revenue Lift (2025)" ,
subtitle= f"Baseline: { BASELINE_START} - { BASELINE_END} | Rush: { RUSH_START} - { RUSH_END} "
)
.fmt_number("baseline_total_revenue" , decimals= 0 , use_seps= True )
.fmt_number("rush_total_revenue" , decimals= 0 , use_seps= True )
.fmt_number("revenue_lift_factor" , decimals= 2 )
.cols_label(
store_code= "Store Code" ,
store_name= "Store Name" ,
baseline_total_revenue= "Baseline Revenue (2wk)" ,
rush_total_revenue= "Rush Revenue" ,
revenue_lift_factor= "Revenue Lift"
)
)
Baseline: 20241116-20250110 | Rush: 20250114-20250127
01
Pingtung City
1,107,014
1,426,158
1.29
02
Chaozhou
1,958,552
2,692,802
1.37
03
Hengchun
727,104
1,253,237
1.72
04
Donggang
1,258,898
1,798,489
1.43
Adjusted Lift Factors for Retail
Code
# Apply adjusted lift formula to store-SKU lift factors
retail_store_sku_lift_adjusted = retail_store_sku_lift.with_columns([
adjust_lift(pl.col("qty_lift_factor" )).alias("qty_lift_factor_adjusted" )
])
# Apply adjusted lift to store revenue
retail_store_revenue_lift_adjusted = retail_store_revenue_lift.with_columns([
adjust_lift(pl.col("revenue_lift_factor" )).alias("revenue_lift_factor_adjusted" )
])
# Overall retail revenue lift
total_retail_baseline = retail_baseline_store_revenue["baseline_total_revenue" ].sum ()
total_retail_rush = retail_rush_store_revenue["rush_total_revenue" ].sum ()
overall_retail_revenue_lift = total_retail_rush / total_retail_baseline
adjusted_overall_retail_revenue_lift = adjust_lift_scalar(overall_retail_revenue_lift)
print (f"Overall retail revenue lift: { overall_retail_revenue_lift:.2f} x" )
print (f"Adjusted overall retail revenue lift: { adjusted_overall_retail_revenue_lift:.2f} x" )
print (f"Median store-SKU lift (adjusted): { retail_store_sku_lift_adjusted['qty_lift_factor_adjusted' ]. median():.2f} x" )
Overall retail revenue lift: 1.42x
Adjusted overall retail revenue lift: 1.63x
Median store-SKU lift (adjusted): 1.70x
2026 Retail Baseline and Predictions
Code
# Store-SKU quantity during 2026 baseline period
retail_baseline_2026_store_sku = (
retail_sales
.filter (_.store_code != "00" )
.filter (_.business_date >= BASELINE_2026_START)
.filter (_.business_date <= BASELINE_2026_END)
.join(
retail_sale_lines,
[
retail_sales.business_date == retail_sale_lines.business_date,
retail_sales.store_code == retail_sale_lines.store_code,
retail_sales.terminal_code == retail_sale_lines.terminal_code,
retail_sales.transaction_serial_number == retail_sale_lines.transaction_serial_number,
],
)
.filter (~ _.product_code.isin(excluded_items))
.group_by(["store_code" , "product_code" ])
.agg(
total_qty= _.quantity.cast("float64" ).sum (),
total_revenue= _.pretax_subtotal.cast("float64" ).sum ()
)
.to_polars()
)
# Normalize to 2-week equivalent
retail_baseline_2026_store_sku = retail_baseline_2026_store_sku.with_columns([
(pl.col("total_qty" ) / BASELINE_NORMALIZATION_FACTOR).alias("baseline_qty_2026" ),
(pl.col("total_revenue" ) / BASELINE_NORMALIZATION_FACTOR).alias("baseline_revenue_2026" )
]).select(["store_code" , "product_code" , "baseline_qty_2026" , "baseline_revenue_2026" ])
print (f"2026 Retail Baseline store-SKU pairs: { len (retail_baseline_2026_store_sku):,} " )
print (f"Stores: { retail_baseline_2026_store_sku['store_code' ]. n_unique()} " )
2026 Retail Baseline store-SKU pairs: 2,908
Stores: 4
Code
# Apply adjusted lift factors to 2026 baseline
retail_predictions = (
retail_baseline_2026_store_sku
.join(
retail_store_sku_lift_adjusted.select(["store_code" , "product_code" , "qty_lift_factor_adjusted" ]),
on= ["store_code" , "product_code" ],
how= "left"
)
)
# Use store-SKU lift if available, else use adjusted overall retail lift
retail_predictions = retail_predictions.with_columns([
pl.coalesce([
pl.col("qty_lift_factor_adjusted" ),
pl.lit(adjusted_overall_retail_revenue_lift)
]).alias("applied_lift" )
])
# Calculate predicted rush quantities
retail_predictions = retail_predictions.with_columns([
(pl.col("baseline_qty_2026" ) * pl.col("applied_lift" )).alias("predicted_rush_qty" ),
(pl.col("baseline_revenue_2026" ) * pl.col("applied_lift" )).alias("predicted_rush_revenue" )
])
print (f"Retail predictions: { len (retail_predictions):,} " )
print (f"Using store-SKU lift: { retail_predictions['qty_lift_factor_adjusted' ]. is_not_null(). sum ():,} " )
print (f"Using overall retail lift: { retail_predictions['qty_lift_factor_adjusted' ]. is_null(). sum ():,} " )
Retail predictions: 2,908
Using store-SKU lift: 2,473
Using overall retail lift: 435
Retail Predictions by Store
Code
# Summarize predictions by store
retail_predictions_by_store = (
retail_predictions
.group_by("store_code" )
.agg([
pl.col("baseline_qty_2026" ).sum ().alias("total_baseline_qty" ),
pl.col("baseline_revenue_2026" ).sum ().alias("total_baseline_revenue" ),
pl.col("predicted_rush_qty" ).sum ().alias("total_predicted_qty" ),
pl.col("predicted_rush_revenue" ).sum ().alias("total_predicted_revenue" ),
pl.len ().alias("sku_count" )
])
.with_columns([
pl.col("store_code" ).replace(STORE_NAMES).alias("store_name" ),
(pl.col("total_predicted_revenue" ) / pl.col("total_baseline_revenue" )).alias("implied_lift" )
])
.sort("store_code" )
)
(
GT(retail_predictions_by_store.select([
"store_code" , "store_name" , "sku_count" , "total_baseline_revenue" ,
"total_predicted_revenue" , "implied_lift"
]))
.tab_header(
title= "2026 Retail Rush Predictions by Store" ,
subtitle= "Based on adjusted lift factors from 2025"
)
.fmt_number("sku_count" , decimals= 0 , use_seps= True )
.fmt_number("total_baseline_revenue" , decimals= 0 , use_seps= True )
.fmt_number("total_predicted_revenue" , decimals= 0 , use_seps= True )
.fmt_number("implied_lift" , decimals= 2 )
.cols_label(
store_code= "Store Code" ,
store_name= "Store Name" ,
sku_count= "SKUs" ,
total_baseline_revenue= "2026 Baseline Revenue" ,
total_predicted_revenue= "Predicted Rush Revenue" ,
implied_lift= "Implied Lift"
)
)
Based on adjusted lift factors from 2025
01
Pingtung City
707
1,502,748
2,127,331
1.42
02
Chaozhou
752
1,889,055
2,822,951
1.49
03
Hengchun
711
791,760
1,240,456
1.57
04
Donggang
738
1,352,516
1,977,902
1.46
Export Retail Forecasts
Code
# Prepare retail export data
retail_export_data = (
retail_predictions
.join(products_lookup, left_on= "product_code" , right_on= "item_code" , how= "left" )
.with_columns([
pl.col("store_code" ).replace(STORE_NAMES).alias("store_name" )
])
.select([
"store_code" , "store_name" , "product_code" , "product_name" ,
"baseline_qty_2026" , "baseline_revenue_2026" ,
"applied_lift" , "predicted_rush_qty" , "predicted_rush_revenue"
])
.sort(["store_code" , "product_code" ])
)
# Add metadata columns
retail_export_data = retail_export_data.with_columns([
pl.lit(date.today().isoformat()).alias("forecast_date" ),
pl.lit(google_sheets_env).alias("environment" ),
])
print (f"Retail forecast records: { len (retail_export_data):,} " )
for store_code in sorted (STORE_NAMES.keys()):
count = (retail_export_data["store_code" ] == store_code).sum ()
print (f" { store_code} ( { STORE_NAMES[store_code]} ): { count:,} SKUs" )
Retail forecast records: 2,908
01 (Pingtung City): 707 SKUs
02 (Chaozhou): 752 SKUs
03 (Hengchun): 711 SKUs
04 (Donggang): 738 SKUs
Code
# Export retail forecasts
if google_can_write():
# Cloud environment: write to Google Sheets
sheet_name = f"CNY2026_Retail_Forecasts_ { google_sheets_env} _ { date. today(). strftime('%Y%m %d ' )} "
sheet_url = google_write_sheet(
data= retail_export_data,
sheet_name= sheet_name,
sheet_tab= "store_sku_forecasts" ,
)
if sheet_url:
print (f" \n **Retail Google Sheet URL:** { sheet_url} " )
else :
# Local environment: write to CSV in system temp directory
tmp_dir = Path("/tmp" )
csv_filename = f"cny2026_retail_forecasts_ { date. today(). strftime('%Y%m %d ' )} .csv"
csv_path = tmp_dir / csv_filename
retail_export_data.write_csv(csv_path)
print (f" \n **Retail CSV exported to:** { csv_path} " )
print (f"Records: { len (retail_export_data):,} " )
Created sheet: https://docs.google.com/spreadsheets/d/17yxzs57AE8bhhYZ9xsGRo0HF5jWIqbBLK4uM7NFaTrw
**Retail Google Sheet URL:** https://docs.google.com/spreadsheets/d/17yxzs57AE8bhhYZ9xsGRo0HF5jWIqbBLK4uM7NFaTrw
Appendix: SQL-Only Verification
This section repeats the analysis using raw SQL to verify the Ibis results.
Baseline Period (SQL)
Code
# Customer-SKU quantity during baseline period using SQL
# Filter out special order items (# suffix)
excluded_items_sql = "', '" .join(excluded_items) if excluded_items else ""
excluded_clause = f"AND sol.item_code NOT IN (' { excluded_items_sql} ')" if excluded_items else ""
baseline_customer_sku_sql = con.sql(f"""
SELECT
so.customer_code,
sol.item_code,
SUM(sol.quantity::float8) / { BASELINE_NORMALIZATION_FACTOR} as baseline_qty,
SUM(sol.pretax_subtotal::float8) / { BASELINE_NORMALIZATION_FACTOR} as baseline_revenue
FROM cosmos_sync.sales_orders so
JOIN cosmos_sync.sales_order_lines sol
ON so.order_type = sol.order_type
AND so.order_number = sol.order_number
WHERE so.confirmed_code = 'Y'
AND so.order_date >= ' { BASELINE_START} '
AND so.order_date <= ' { BASELINE_END} '
{ excluded_clause}
GROUP BY so.customer_code, sol.item_code
""" ).to_polars()
print (f"SQL Baseline customer-SKU pairs: { len (baseline_customer_sku_sql):,} " )
print (f"SQL Unique customers in baseline: { baseline_customer_sku_sql['customer_code' ]. n_unique():,} " )
SQL Baseline customer-SKU pairs: 15,970
SQL Unique customers in baseline: 1,421
Code
# Customer total revenue during baseline period (SQL)
baseline_customer_revenue_sql = (
baseline_customer_sku_sql
.group_by("customer_code" )
.agg(pl.col("baseline_revenue" ).sum ().alias("baseline_total_revenue" ))
)
print (f"SQL Baseline customers with revenue: { len (baseline_customer_revenue_sql):,} " )
SQL Baseline customers with revenue: 1,421
Rush Period (SQL)
Code
# Customer-SKU quantity during rush period using SQL
# Filter out special order items (# suffix) - reuse excluded_clause from baseline
rush_customer_sku_sql = con.sql(f"""
SELECT
so.customer_code,
sol.item_code,
SUM(sol.quantity::float8) as rush_qty,
SUM(sol.pretax_subtotal::float8) as rush_revenue
FROM cosmos_sync.sales_orders so
JOIN cosmos_sync.sales_order_lines sol
ON so.order_type = sol.order_type
AND so.order_number = sol.order_number
WHERE so.confirmed_code = 'Y'
AND so.order_date >= ' { RUSH_START} '
AND so.order_date <= ' { RUSH_END} '
{ excluded_clause}
GROUP BY so.customer_code, sol.item_code
""" ).to_polars()
print (f"SQL Rush customer-SKU pairs: { len (rush_customer_sku_sql):,} " )
print (f"SQL Unique customers in rush: { rush_customer_sku_sql['customer_code' ]. n_unique():,} " )
SQL Rush customer-SKU pairs: 10,219
SQL Unique customers in rush: 1,136
Code
# Customer total revenue during rush period (SQL)
rush_customer_revenue_sql = (
rush_customer_sku_sql
.group_by("customer_code" )
.agg(pl.col("rush_revenue" ).sum ().alias("rush_total_revenue" ))
)
print (f"SQL Rush customers with revenue: { len (rush_customer_revenue_sql):,} " )
SQL Rush customers with revenue: 1,136
Lift Calculations (SQL-based)
Code
# Identify customers active in baseline vs rush-only (SQL)
baseline_customers_sql = set (baseline_customer_revenue_sql["customer_code" ].to_list())
rush_customers_sql = set (rush_customer_revenue_sql["customer_code" ].to_list())
baseline_active_customers_sql = baseline_customers_sql & rush_customers_sql
rush_only_customers_sql = rush_customers_sql - baseline_customers_sql
print (f"SQL Customers active in both periods: { len (baseline_active_customers_sql):,} " )
print (f"SQL Rush-only customers (new): { len (rush_only_customers_sql):,} " )
SQL Customers active in both periods: 1,068
SQL Rush-only customers (new): 68
Code
# Join baseline and rush at customer-SKU level (SQL)
customer_sku_lift_sql = (
rush_customer_sku_sql
.filter (pl.col("customer_code" ).is_in(list (baseline_active_customers_sql)))
.join(
baseline_customer_sku_sql,
on= ["customer_code" , "item_code" ],
how= "left"
)
.with_columns([
pl.col("baseline_qty" ).fill_null(0.0 ),
pl.col("baseline_revenue" ).fill_null(0.0 )
])
)
# Calculate lift factor with cap for new SKUs
customer_sku_lift_sql = customer_sku_lift_sql.with_columns([
pl.when(pl.col("baseline_qty" ) > 0 )
.then(pl.col("rush_qty" ) / pl.col("baseline_qty" ))
.otherwise(pl.lit(1.5 ))
.alias("qty_lift_factor" )
])
print (f"SQL Customer-SKU pairs with lift: { len (customer_sku_lift_sql):,} " )
print (f"SQL SKU pairs with capped lift: { (customer_sku_lift_sql['baseline_qty' ] == 0 ). sum ():,} " )
SQL Customer-SKU pairs with lift: 9,956
SQL SKU pairs with capped lift: 1,493
Code
# Customer-level revenue lift (SQL)
customer_revenue_lift_sql = (
rush_customer_revenue_sql
.filter (pl.col("customer_code" ).is_in(list (baseline_active_customers_sql)))
.join(
baseline_customer_revenue_sql,
on= "customer_code" ,
how= "left"
)
.with_columns([
(pl.col("rush_total_revenue" ) / pl.col("baseline_total_revenue" )).alias("revenue_lift_factor" )
])
)
print (f"SQL Customers with revenue lift: { len (customer_revenue_lift_sql):,} " )
SQL Customers with revenue lift: 1,068
Code
# Rush-only customers (SQL)
rush_only_data_sql = (
rush_customer_revenue_sql
.filter (pl.col("customer_code" ).is_in(list (rush_only_customers_sql)))
)
rush_only_customer_count_sql = len (rush_only_data_sql)
rush_only_total_revenue_sql = rush_only_data_sql["rush_total_revenue" ].sum ()
print (f"SQL Rush-only customers: { rush_only_customer_count_sql:,} " )
print (f"SQL Rush-only total revenue: TWD { rush_only_total_revenue_sql:,.0f} " )
SQL Rush-only customers: 68
SQL Rush-only total revenue: TWD 384,538
SQL Results Tables
Code
# Customer-SKU lift table (SQL) for same sample customers
sample_sku_lift_sql = (
customer_sku_lift_sql
.filter (pl.col("customer_code" ).is_in(sample_customers))
.join(customers_lookup, on= "customer_code" , how= "left" )
.join(products_lookup, on= "item_code" , how= "left" )
.select(["customer_code" , "trade_name" , "item_code" , "product_name" ,
"baseline_qty" , "rush_qty" , "qty_lift_factor" ])
.sort(["customer_code" , "qty_lift_factor" ], descending= [False , True ])
)
(
GT(sample_sku_lift_sql)
.tab_header(
title= "Customer-SKU Quantity Lift (SQL)" ,
subtitle= "Sample of 10 customers, all SKUs"
)
.fmt_number("baseline_qty" , decimals= 1 )
.fmt_number("rush_qty" , decimals= 1 )
.fmt_number("qty_lift_factor" , decimals= 2 )
.cols_label(
customer_code= "Customer Code" ,
trade_name= "Customer Name" ,
item_code= "SKU" ,
product_name= "Product Name" ,
baseline_qty= "Baseline Qty (2wk)" ,
rush_qty= "Rush Qty" ,
qty_lift_factor= "Lift Factor"
)
)
Sample of 10 customers, all SKUs
0190012
宵歸暝-屏東總店
53056
冷凍熟鍋貼(禾)1500g(約50粒).
1.8
24.0
13.71
0190012
宵歸暝-屏東總店
54061
強匠卡拉雞腿堡(辣味)10片.
2.2
30.0
13.33
0190012
宵歸暝-屏東總店
53103
乳酪餅(良晟) 14*14(15片)
2.0
24.0
12.00
0190012
宵歸暝-屏東總店
51130
香雞城小肉豆1K.
6.8
72.0
10.67
0190012
宵歸暝-屏東總店
54060
強匠卡拉雞腿堡(原味)10片.
3.5
30.0
8.57
0190012
宵歸暝-屏東總店
51401
吉康燻雞肉片1k
2.5
20.0
8.00
0190012
宵歸暝-屏東總店
53027
紅龍雞塊 1K.
8.2
50.0
6.06
0190012
宵歸暝-屏東總店
54056
香酥蛋餅(藍袋)30入
10.0
60.0
6.00
0190012
宵歸暝-屏東總店
51438
家州黑胡椒里肌豬排(白盤)20片
3.0
18.0
6.00
0190012
宵歸暝-屏東總店
59127
主廚漢堡肉 20片
1.2
6.0
4.80
0190012
宵歸暝-屏東總店
53043
炸大熱狗25支
1.5
7.0
4.67
0190012
宵歸暝-屏東總店
51518
8吋原味墨西哥薄餅45g*12片
15.0
60.0
4.00
0190012
宵歸暝-屏東總店
44062
愛心屋韓式泡菜3K
2.0
8.0
4.00
0190012
宵歸暝-屏東總店
23361
肉鬆 3K
0.2
1.0
4.00
0190012
宵歸暝-屏東總店
53045
祥哥冷凍蘿蔔糕12片.(白)
17.5
70.0
4.00
0190012
宵歸暝-屏東總店
51263
麥肯洋蔥圈907g
4.0
16.0
4.00
0190012
宵歸暝-屏東總店
54008
Hisun搖滾雞球1K(約80顆)
4.8
18.0
3.79
0190012
宵歸暝-屏東總店
51172
安美燻腸 1000g.
4.8
17.0
3.58
0190012
宵歸暝-屏東總店
54021
奇津阿在伯手工蔥抓餅10入.
12.0
40.0
3.33
0190012
宵歸暝-屏東總店
51171
安美熱狗50條.
5.2
17.0
3.24
0190012
宵歸暝-屏東總店
51045
味你好冷凍熟水餃(約200粒)
3.8
11.0
2.93
0190012
宵歸暝-屏東總店
51284
馬鈴薯條(HISUN) 2K.
13.5
36.0
2.67
0190012
宵歸暝-屏東總店
41042
四海沙拉(大) 3k
2.2
6.0
2.67
0190012
宵歸暝-屏東總店
51466
Hisun鬆餅(5片)原味
12.0
25.0
2.08
0190012
宵歸暝-屏東總店
41020
紐西蘭安佳奶油(無添加鹽) 454g
1.0
2.0
2.00
0190012
宵歸暝-屏東總店
22428
田園全脂保久純牛乳 1公升.
30.0
60.0
2.00
0190012
宵歸暝-屏東總店
51144
香讚黑椒雞堡50片
0.0
3.0
1.50
0190012
宵歸暝-屏東總店
41032
寶宏pizza絲 1k(雙色).
15.0
10.0
0.67
0370002
劉太太-漁船
11012
品味咖啡 600g.
155.0
700.0
4.52
0610012
繁華市場1.4
43044
HAPPY千島風味沙拉500g
0.2
2.0
8.00
0610012
繁華市場1.4
72229
四杯架 50個
0.2
2.0
8.00
0610012
繁華市場1.4
21140
金杯軟質牛奶巧克力 20K
0.2
1.0
4.00
0610012
繁華市場1.4
51144
香讚黑椒雞堡50片
0.2
1.0
4.00
0610012
繁華市場1.4
21287
梨山藍莓醬3.2K
0.2
1.0
4.00
0610012
繁華市場1.4
23168
品高蕃茄包10g*250包
2.0
8.0
4.00
0610012
繁華市場1.4
24070
一品酥油(紅酥)素 16k
0.2
1.0
4.00
0610012
繁華市場1.4
51318
立基冷凍起酥片12*13(約26片)
0.2
1.0
4.00
0610012
繁華市場1.4
53022
正點(原味)雞球 1K
3.8
10.0
2.67
0610012
繁華市場1.4
56013
每天豬柳 1K
0.8
2.0
2.67
0610012
繁華市場1.4
11002
草莓風味調味粉 1K
4.0
10.0
2.50
0610012
繁華市場1.4
54020
奇津一口珍珠餃200粒
3.5
8.0
2.29
0610012
繁華市場1.4
31101
三代450g
5.8
12.0
2.09
0610012
繁華市場1.4
21280
梨山草莓醬3.2k
0.5
1.0
2.00
0610012
繁華市場1.4
23141
可果美蕃茄醬 3.33k.
0.5
1.0
2.00
0610012
繁華市場1.4
51321
丹麥土司10片.
1.0
2.0
2.00
0610012
繁華市場1.4
31099
二代紅450g
15.0
30.0
2.00
0610012
繁華市場1.4
41029
安佳84片乳酪990g(紅).
1.0
2.0
2.00
0610012
繁華市場1.4
54011
奇津熟鍋貼1500g(約50粒)
4.2
8.0
1.88
0610012
繁華市場1.4
53211
日規薯餅20片.
5.5
10.0
1.82
0610012
繁華市場1.4
51142
香雞城卡啦雞腿(大)辣 10片.
5.5
10.0
1.82
0610012
繁華市場1.4
51141
香雞城卡啦雞腿(大)原 10片.
1.8
3.0
1.71
0610012
繁華市場1.4
51396
圓型披薩(夏威夷)120g.
10.5
18.0
1.71
0610012
繁華市場1.4
51397
圓型披薩(燻雞)120g.
10.5
18.0
1.71
0610012
繁華市場1.4
51171
安美熱狗50條.
23.2
38.0
1.63
0610012
繁華市場1.4
51330
金品濃縮米漿 1.5k
11.8
19.0
1.62
0610012
繁華市場1.4
59142
香酥雞塊(HISUN) 3K.
7.5
12.0
1.60
0610012
繁華市場1.4
51309
黃金花枝堡50g*20片
1.2
2.0
1.60
0610012
繁華市場1.4
41006
亞柏奶精 1公升.
79.5
126.0
1.58
0610012
繁華市場1.4
41061
四季沙拉3K
5.8
9.0
1.57
0610012
繁華市場1.4
51035
南周抓肉餅 10片
4.5
7.0
1.56
0610012
繁華市場1.4
59133
安心大火腿1.8K
3.2
5.0
1.54
0610012
繁華市場1.4
21260
香蒜抹醬(上焱) 800g
0.0
2.0
1.50
0610012
繁華市場1.4
51466
Hisun鬆餅(5片)原味
0.0
5.0
1.50
0610012
繁華市場1.4
21266
梨山花生醬2.8K
2.0
3.0
1.50
0610012
繁華市場1.4
25888
伊植麥玉米粒(易開)340g.
0.0
24.0
1.50
0610012
繁華市場1.4
72300
六杯架 50個
0.0
1.0
1.50
0610012
繁華市場1.4
26068
雙魚座鮪魚185g.
0.0
72.0
1.50
0610012
繁華市場1.4
56041
抓餅(禾)10片.
14.5
21.0
1.45
0610012
繁華市場1.4
22168
馬玉山杏仁粉600g
14.5
21.0
1.45
0610012
繁華市場1.4
51265
金酥3/8脆薯2.04K.
6.2
9.0
1.44
0610012
繁華市場1.4
56019
鮮肉湯包(禾) 50入
27.2
39.0
1.43
0610012
繁華市場1.4
53044
可口芋籤糕1.2K
5.8
7.0
1.22
0610012
繁華市場1.4
51109
台畜原味甲霸大熱狗20支
4.2
5.0
1.18
0610012
繁華市場1.4
57064
厚切蘿蔔糕 1K
17.0
20.0
1.18
0610012
繁華市場1.4
56017
翡翠抓餅(禾)10片.
12.8
14.0
1.10
0610012
繁華市場1.4
51371
Hisun鬆餅(5片)
7.5
5.0
0.67
0610046
永和-潭頭-1.4
59011
一品漢堡100片
1.2
6.0
4.80
0610046
永和-潭頭-1.4
41029
安佳84片乳酪990g(紅).
0.2
1.0
4.00
0610046
永和-潭頭-1.4
92503
氫氧化鈉(粒鹼) 1K
6.2
25.0
4.00
0610046
永和-潭頭-1.4
23144
可果美Q早餐蕃茄醬(軟袋)1K
2.0
5.0
2.50
0610046
永和-潭頭-1.4
25888
伊植麥玉米粒(易開)340g.
42.0
96.0
2.29
0610046
永和-潭頭-1.4
59142
香酥雞塊(HISUN) 3K.
11.5
24.0
2.09
0610046
永和-潭頭-1.4
22020
特調咖啡紅茶(免濾)100g*5包.
40.0
80.0
2.00
0610046
永和-潭頭-1.4
11001
咖啡風味調味粉 1k(棕).
48.0
96.0
2.00
0610046
永和-潭頭-1.4
23452
牛頭牌沙茶醬易開3k
2.5
5.0
2.00
0610046
永和-潭頭-1.4
23502
好媽媽鮪魚三明治185g.
72.0
144.0
2.00
0610046
永和-潭頭-1.4
21269
梨山花生醬800g
2.0
4.0
2.00
0610046
永和-潭頭-1.4
31011
168奶精(不含乳(奶)) 1k.
33.0
60.0
1.82
0610046
永和-潭頭-1.4
21290
梨山藍莓果醬900g
2.0
3.0
1.50
0610046
永和-潭頭-1.4
23626
一番香Q意麵50入
0.0
4.0
1.50
0610046
永和-潭頭-1.4
56041
抓餅(禾)10片.
35.0
50.0
1.43
0610046
永和-潭頭-1.4
21283
梨山草莓果醬900g
3.0
4.0
1.33
0610046
永和-潭頭-1.4
53211
日規薯餅20片.
9.2
11.0
1.19
0610046
永和-潭頭-1.4
21229
福汎椰香奶酥 1.8K
1.0
1.0
1.00
0610046
永和-潭頭-1.4
51262
一品熱狗 50支
30.0
30.0
1.00
0610046
永和-潭頭-1.4
57012
富統優質小火腿1K(120片)
4.5
4.0
0.89
0610046
永和-潭頭-1.4
12205
黑砂糖蜜 6k
1.8
1.0
0.57
0610046
永和-潭頭-1.4
23504
烹大師鰹魚調味料(日本)1k
3.5
2.0
0.57
0610046
永和-潭頭-1.4
51109
台畜原味甲霸大熱狗20支
2.2
1.0
0.44
1010037
美美早餐店(鹽埔)-1.4
31035
葡萄乾600g
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
41018
香Q蛋餅皮(原)30入.(紅字)
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
54043
強匠煙燻雞肉片1公斤
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
51515
金品千層蛋餅皮 25片.
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
53021
正點起司雞排10入
0.2
1.0
4.00
1010037
美美早餐店(鹽埔)-1.4
53006
A里堡(丹麥麵包) 6入
0.5
2.0
4.00
1010037
美美早餐店(鹽埔)-1.4
31101
三代450g
6.5
24.0
3.69
1010037
美美早餐店(鹽埔)-1.4
31044
玉米粉1k
1.8
6.0
3.43
1010037
美美早餐店(鹽埔)-1.4
25888
伊植麥玉米粒(易開)340g.
24.0
72.0
3.00
1010037
美美早餐店(鹽埔)-1.4
21131
金鑽巧克力塗抹醬 3k
1.5
4.0
2.67
1010037
美美早餐店(鹽埔)-1.4
31099
二代紅450g
22.5
60.0
2.67
1010037
美美早餐店(鹽埔)-1.4
51341
金品(黑胡椒)肉醬義大利麵 310g.
10.0
25.0
2.50
1010037
美美早餐店(鹽埔)-1.4
22168
馬玉山杏仁粉600g
2.0
5.0
2.50
1010037
美美早餐店(鹽埔)-1.4
51130
香雞城小肉豆1K.
2.5
6.0
2.40
1010037
美美早餐店(鹽埔)-1.4
11002
草莓風味調味粉 1K
1.2
3.0
2.40
1010037
美美早餐店(鹽埔)-1.4
24236
聯泰太白粉 1000g
2.8
6.0
2.18
1010037
美美早餐店(鹽埔)-1.4
53102
紅龍卡啦雞腿堡(原味) 10片.
1.5
3.0
2.00
1010037
美美早餐店(鹽埔)-1.4
51701
立芳牛肉漢堡60g*20片
1.5
3.0
2.00
1010037
美美早餐店(鹽埔)-1.4
21135
素食金香酥油3k(白桶)
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
53022
正點(原味)雞球 1K
3.5
7.0
2.00
1010037
美美早餐店(鹽埔)-1.4
23188
豪味辣椒膏 5L
1.0
2.0
2.00
1010037
美美早餐店(鹽埔)-1.4
23168
品高蕃茄包10g*250包
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
31060
杏仁片 500g
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
53103
乳酪餅(良晟) 14*14(15片)
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
23001
四海鹽酥粉600g
2.5
5.0
2.00
1010037
美美早餐店(鹽埔)-1.4
22020
特調咖啡紅茶(免濾)100g*5包.
20.0
40.0
2.00
1010037
美美早餐店(鹽埔)-1.4
51284
馬鈴薯條(HISUN) 2K.
0.5
1.0
2.00
1010037
美美早餐店(鹽埔)-1.4
51172
安美燻腸 1000g.
4.8
9.0
1.89
1010037
美美早餐店(鹽埔)-1.4
51035
南周抓肉餅 10片
3.2
6.0
1.85
1010037
美美早餐店(鹽埔)-1.4
56013
每天豬柳 1K
2.8
5.0
1.82
1010037
美美早餐店(鹽埔)-1.4
53211
日規薯餅20片.
5.8
10.0
1.74
1010037
美美早餐店(鹽埔)-1.4
56017
翡翠抓餅(禾)10片.
3.5
6.0
1.71
1010037
美美早餐店(鹽埔)-1.4
23141
可果美蕃茄醬 3.33k.
1.8
3.0
1.71
1010037
美美早餐店(鹽埔)-1.4
53007
黃金牛角(丹麥麵包) 6入.
1.8
3.0
1.71
1010037
美美早餐店(鹽埔)-1.4
41006
亞柏奶精 1公升.
57.0
97.0
1.70
1010037
美美早餐店(鹽埔)-1.4
51395
圓型披薩(總匯)120g.
7.2
12.0
1.66
1010037
美美早餐店(鹽埔)-1.4
23504
烹大師鰹魚調味料(日本)1k
1.2
2.0
1.60
1010037
美美早餐店(鹽埔)-1.4
56041
抓餅(禾)10片.
7.0
11.0
1.57
1010037
美美早餐店(鹽埔)-1.4
51396
圓型披薩(夏威夷)120g.
12.8
20.0
1.57
1010037
美美早餐店(鹽埔)-1.4
53100
紅龍卡啦雞腿堡(辣味) 10片.
16.0
25.0
1.56
1010037
美美早餐店(鹽埔)-1.4
23186
豪味豆油膏5L
3.2
5.0
1.54
1010037
美美早餐店(鹽埔)-1.4
41029
安佳84片乳酪990g(紅).
3.2
5.0
1.54
1010037
美美早餐店(鹽埔)-1.4
51351
金品義大利肉醬麵310g.
16.2
25.0
1.54
1010037
美美早餐店(鹽埔)-1.4
53057
奶皇包60g*12粒
2.0
3.0
1.50
1010037
美美早餐店(鹽埔)-1.4
51180
安美三明治火腿1.8K
0.0
3.0
1.50
1010037
美美早餐店(鹽埔)-1.4
41061
四季沙拉3K
6.0
9.0
1.50
1010037
美美早餐店(鹽埔)-1.4
51466
Hisun鬆餅(5片)原味
0.0
1.0
1.50
1010037
美美早餐店(鹽埔)-1.4
59163
切片培根 1K
2.8
4.0
1.45
1010037
美美早餐店(鹽埔)-1.4
51330
金品濃縮米漿 1.5k
11.0
16.0
1.45
1010037
美美早餐店(鹽埔)-1.4
51371
Hisun鬆餅(5片)
4.2
6.0
1.41
1010037
美美早餐店(鹽埔)-1.4
51171
安美熱狗50條.
18.5
26.0
1.41
1010037
美美早餐店(鹽埔)-1.4
26068
雙魚座鮪魚185g.
36.0
48.0
1.33
1010037
美美早餐店(鹽埔)-1.4
23611
寶馬牌粉絲 2700g
0.8
1.0
1.33
1010037
美美早餐店(鹽埔)-1.4
23452
牛頭牌沙茶醬易開3k
0.8
1.0
1.33
1010037
美美早餐店(鹽埔)-1.4
22293
台糖二砂 25K
2.2
3.0
1.33
1010037
美美早餐店(鹽埔)-1.4
22107
飛燕煉乳 375g.
1.5
2.0
1.33
1010037
美美早餐店(鹽埔)-1.4
51311
紅龍香檸雞柳條 1K(約28條)
5.5
7.0
1.27
1010037
美美早餐店(鹽埔)-1.4
51265
金酥3/8脆薯2.04K.
9.5
12.0
1.26
1010037
美美早餐店(鹽埔)-1.4
53112
香香雞米花1K.
8.2
10.0
1.21
1010037
美美早餐店(鹽埔)-1.4
23630
味之素1K
1.8
2.0
1.14
1010037
美美早餐店(鹽埔)-1.4
21266
梨山花生醬2.8K
1.8
2.0
1.14
1010037
美美早餐店(鹽埔)-1.4
51321
丹麥土司10片.
3.2
3.0
0.92
1010037
美美早餐店(鹽埔)-1.4
51318
立基冷凍起酥片12*13(約26片)
1.2
1.0
0.80
1010037
美美早餐店(鹽埔)-1.4
57064
厚切蘿蔔糕 1K
5.5
4.0
0.73
1010037
美美早餐店(鹽埔)-1.4
51065
卜蜂高級雞肉火腿(切片)1.8k
4.2
3.0
0.71
1010047
四海-新庄1.4
41029
安佳84片乳酪990g(紅).
0.2
1.0
4.00
1010047
四海-新庄1.4
51109
台畜原味甲霸大熱狗20支
26.0
56.0
2.15
1010047
四海-新庄1.4
22020
特調咖啡紅茶(免濾)100g*5包.
40.0
80.0
2.00
1010047
四海-新庄1.4
21131
金鑽巧克力塗抹醬 3k
1.0
2.0
2.00
1010047
四海-新庄1.4
21229
福汎椰香奶酥 1.8K
1.0
2.0
2.00
1010047
四海-新庄1.4
23141
可果美蕃茄醬 3.33k.
0.5
1.0
2.00
1010047
四海-新庄1.4
51130
香雞城小肉豆1K.
5.0
10.0
2.00
1010047
四海-新庄1.4
11002
草莓風味調味粉 1K
6.0
12.0
2.00
1010047
四海-新庄1.4
25888
伊植麥玉米粒(易開)340g.
90.0
144.0
1.60
1010047
四海-新庄1.4
51121
台畜培根A1k
10.0
16.0
1.60
1010047
四海-新庄1.4
59142
香酥雞塊(HISUN) 3K.
27.2
42.0
1.54
1010047
四海-新庄1.4
23502
好媽媽鮪魚三明治185g.
48.0
72.0
1.50
1010047
四海-新庄1.4
51261
麥肯橢圓薯餅2.26K(約34片)
0.0
6.0
1.50
1010047
四海-新庄1.4
31011
168奶精(不含乳(奶)) 1k.
36.0
48.0
1.33
1010047
四海-新庄1.4
53100
紅龍卡啦雞腿堡(辣味) 10片.
43.8
55.0
1.26
1010047
四海-新庄1.4
11001
咖啡風味調味粉 1k(棕).
69.0
84.0
1.22
1010047
四海-新庄1.4
51171
安美熱狗50條.
50.0
55.0
1.10
1010047
四海-新庄1.4
56041
抓餅(禾)10片.
65.0
70.0
1.08
1010047
四海-新庄1.4
57012
富統優質小火腿1K(120片)
3.8
4.0
1.07
1010047
四海-新庄1.4
53211
日規薯餅20片.
23.0
24.0
1.04
1010047
四海-新庄1.4
59011
一品漢堡100片
2.2
1.0
0.44
1310027
隘寮早點1.4
25888
伊植麥玉米粒(易開)340g.
12.0
72.0
6.00
1310027
隘寮早點1.4
23001
四海鹽酥粉600g
1.5
8.0
5.33
1310027
隘寮早點1.4
23361
肉鬆 3K
1.5
8.0
5.33
1310027
隘寮早點1.4
23150
可果美蕃茄醬 4.5k.
0.5
2.0
4.00
1310027
隘寮早點1.4
41189
HISUN起司片84片.
0.8
3.0
4.00
1310027
隘寮早點1.4
54021
奇津阿在伯手工蔥抓餅10入.
14.5
44.0
3.03
1310027
隘寮早點1.4
51121
台畜培根A1k
1.0
3.0
3.00
1310027
隘寮早點1.4
54061
強匠卡拉雞腿堡(辣味)10片.
102.0
300.0
2.94
1310027
隘寮早點1.4
21266
梨山花生醬2.8K
0.8
2.0
2.67
1310027
隘寮早點1.4
51452
家州黑胡椒腿肉排1K
1.5
4.0
2.67
1310027
隘寮早點1.4
51701
立芳牛肉漢堡60g*20片
0.8
2.0
2.67
1310027
隘寮早點1.4
11055
原味奶酥700g
1.2
3.0
2.40
1310027
隘寮早點1.4
51077
卜蜂業務用雞塊3k
8.0
16.0
2.00
1310027
隘寮早點1.4
51085
卜蜂早餐雞堡50g*50片
1.0
2.0
2.00
1310027
隘寮早點1.4
54060
強匠卡拉雞腿堡(原味)10片.
6.5
13.0
2.00
1310027
隘寮早點1.4
59131
安心熱狗100支
14.0
25.0
1.79
1310027
隘寮早點1.4
53042
四海蘿蔔糕 12片(紅)
7.5
13.0
1.73
1310027
隘寮早點1.4
51265
金酥3/8脆薯2.04K.
8.0
12.0
1.50
1310027
隘寮早點1.4
71175
易昇6585通用蓋(750)/50個
0.0
5.0
1.50
1310027
隘寮早點1.4
71181
8511蓋(850湯杯) 50個
0.0
5.0
1.50
1310027
隘寮早點1.4
71218
520cc紙湯杯50入
0.0
40.0
1.50
1310027
隘寮早點1.4
71407
750紙湯杯 (白) 50個
0.0
24.0
1.50
1310027
隘寮早點1.4
71409
紙850湯杯(白) 50入
0.0
24.0
1.50
1310027
隘寮早點1.4
21227
福汎巧克力3K
1.5
2.0
1.33
1310027
隘寮早點1.4
51261
麥肯橢圓薯餅2.26K(約34片)
0.8
1.0
1.33
1310027
隘寮早點1.4
21622
奇異鳥奶精(313) 25k
1.0
1.0
1.00
2510038
好野早午餐-佳冬2.5
21144
正香軒巧克力3k
0.2
2.0
8.00
2510038
好野早午餐-佳冬2.5
53134
洋蔥圈1K
0.5
2.0
4.00
2510038
好野早午餐-佳冬2.5
56054
正點黑胡椒雞堡20片
2.5
7.0
2.80
2510038
好野早午餐-佳冬2.5
24074
乳瑪琳(大) 440g
0.8
2.0
2.67
2510038
好野早午餐-佳冬2.5
56056
日式香酥魚堡 25入
1.5
4.0
2.67
2510038
好野早午餐-佳冬2.5
53112
香香雞米花1K.
12.8
28.0
2.20
2510038
好野早午餐-佳冬2.5
53103
乳酪餅(良晟) 14*14(15片)
4.8
10.0
2.11
2510038
好野早午餐-佳冬2.5
13007
鍋燒湯粉1k
1.5
3.0
2.00
2510038
好野早午餐-佳冬2.5
21229
福汎椰香奶酥 1.8K
1.0
2.0
2.00
2510038
好野早午餐-佳冬2.5
22106
耐司果醇味煉乳375g
2.5
5.0
2.00
2510038
好野早午餐-佳冬2.5
23627
一番香Q雞絲50入
1.0
2.0
2.00
2510038
好野早午餐-佳冬2.5
52183
唐辛子帶環腿排220g*5片
2.0
4.0
2.00
2510038
好野早午餐-佳冬2.5
21283
梨山草莓果醬900g
1.0
2.0
2.00
2510038
好野早午餐-佳冬2.5
59147
日式大豬排120G*50片
0.5
1.0
2.00
2510038
好野早午餐-佳冬2.5
71890
三明治袋p
1.5
3.0
2.00
2510038
好野早午餐-佳冬2.5
51709
澳洲優質牛肉堡 80g
32.0
60.0
1.88
2510038
好野早午餐-佳冬2.5
59016
卡啦脆魚條 1K(約27入)
3.2
6.0
1.85
2510038
好野早午餐-佳冬2.5
96195
小磨坊西式胡椒鹽1K
2.8
5.0
1.82
2510038
好野早午餐-佳冬2.5
51518
8吋原味墨西哥薄餅45g*12片
15.0
27.0
1.80
2510038
好野早午餐-佳冬2.5
54008
Hisun搖滾雞球1K(約80顆)
2.2
4.0
1.78
2510038
好野早午餐-佳冬2.5
71414
1000cc紙湯杯50個
2.2
4.0
1.78
2510038
好野早午餐-佳冬2.5
71931
BO塑膠盒 1H100個
3.5
6.0
1.71
2510038
好野早午餐-佳冬2.5
72305
橡皮圈(中)#16條
1.8
3.0
1.71
2510038
好野早午餐-佳冬2.5
71181
8511蓋(850湯杯) 50個
4.2
7.0
1.65
2510038
好野早午餐-佳冬2.5
51311
紅龍香檸雞柳條 1K(約28條)
5.5
9.0
1.64
2510038
好野早午餐-佳冬2.5
53056
冷凍熟鍋貼(禾)1500g(約50粒).
11.0
18.0
1.64
2510038
好野早午餐-佳冬2.5
51365
讚岐烏龍麵240g*5片
6.2
10.0
1.60
2510038
好野早午餐-佳冬2.5
53119
經典雞塊1K
20.5
32.0
1.56
2510038
好野早午餐-佳冬2.5
43044
HAPPY千島風味沙拉500g
5.2
8.0
1.52
2510038
好野早午餐-佳冬2.5
23671
五木原味拉麵 65g
24.0
36.0
1.50
2510038
好野早午餐-佳冬2.5
71409
紙850湯杯(白) 50入
2.0
3.0
1.50
2510038
好野早午餐-佳冬2.5
71413
防油L漢堡紙袋 500張(200*200mm)
0.0
12.0
1.50
2510038
好野早午餐-佳冬2.5
51261
麥肯橢圓薯餅2.26K(約34片)
2.0
3.0
1.50
2510038
好野早午餐-佳冬2.5
21266
梨山花生醬2.8K
2.8
4.0
1.45
2510038
好野早午餐-佳冬2.5
41047
每天沙拉3K
13.8
19.0
1.38
2510038
好野早午餐-佳冬2.5
22250
涼水舖-冷泡茶 50入
1.5
2.0
1.33
2510038
好野早午餐-佳冬2.5
11002
草莓風味調味粉 1K
3.0
4.0
1.33
2510038
好野早午餐-佳冬2.5
51263
麥肯洋蔥圈907g
1.5
2.0
1.33
2510038
好野早午餐-佳冬2.5
25888
伊植麥玉米粒(易開)340g.
72.0
96.0
1.33
2510038
好野早午餐-佳冬2.5
21862
天仁免濾茉香綠茶 75g
3.0
4.0
1.33
2510038
好野早午餐-佳冬2.5
23932
龍口粉絲(快煮型)3K
0.8
1.0
1.33
2510038
好野早午餐-佳冬2.5
51706
立芳黑胡椒漢堡薄片50g*20片.
9.8
13.0
1.33
2510038
好野早午餐-佳冬2.5
23732
崁頂芝麻醬包40g
27.0
36.0
1.33
2510038
好野早午餐-佳冬2.5
41006
亞柏奶精 1公升.
28.2
36.0
1.27
2510038
好野早午餐-佳冬2.5
21754
喜多顆粒柳橙濃糖果漿 2.4k
3.2
4.0
1.23
2510038
好野早午餐-佳冬2.5
53021
正點起司雞排10入
5.0
6.0
1.20
2510038
好野早午餐-佳冬2.5
57055
馬芬堡 20入
6.0
7.0
1.17
2510038
好野早午餐-佳冬2.5
51321
丹麥土司10片.
15.0
16.0
1.07
2510038
好野早午餐-佳冬2.5
71825
超薄袋半斤
3.0
3.0
1.00
2510038
好野早午餐-佳冬2.5
53041
炸小熱狗50支(胖胖狗)
1.0
1.0
1.00
2510038
好野早午餐-佳冬2.5
72341
4寸叉包
1.0
1.0
1.00
2510038
好野早午餐-佳冬2.5
71951
小圓盒L003 100入
2.2
2.0
0.89
2510038
好野早午餐-佳冬2.5
51172
安美燻腸 1000g.
4.5
4.0
0.89
2510038
好野早午餐-佳冬2.5
24506
鳳冠牌整片鳳梨 565g
3.5
3.0
0.86
2510038
好野早午餐-佳冬2.5
71891
0號夾鏈袋 10入
1.2
1.0
0.80
2510038
好野早午餐-佳冬2.5
53007
黃金牛角(丹麥麵包) 6入.
3.2
2.0
0.62
2510038
好野早午餐-佳冬2.5
51309
黃金花枝堡50g*20片
1.8
1.0
0.57
5870001
新月牛角烘焙食品行
23361
肉鬆 3K
12.0
36.0
3.00
5870001
新月牛角烘焙食品行
41210
新月優質沙拉(袋)3K
182.0
301.0
1.65
5890006
夭巴ㄔㄚˋ1.4
13007
鍋燒湯粉1k
4.0
32.0
8.00
5890006
夭巴ㄔㄚˋ1.4
21134
瑪雅琳3k(白桶)
0.2
2.0
8.00
5890006
夭巴ㄔㄚˋ1.4
51518
8吋原味墨西哥薄餅45g*12片
5.0
40.0
8.00
5890006
夭巴ㄔㄚˋ1.4
54008
Hisun搖滾雞球1K(約80顆)
2.5
17.0
6.80
5890006
夭巴ㄔㄚˋ1.4
22144
冬瓜糖 6K(普).
0.8
5.0
6.67
5890006
夭巴ㄔㄚˋ1.4
51706
立芳黑胡椒漢堡薄片50g*20片.
1.2
8.0
6.40
5890006
夭巴ㄔㄚˋ1.4
22236
台糖特砂 25K
0.5
3.0
6.00
5890006
夭巴ㄔㄚˋ1.4
23154
可果美快餐用蕃茄醬 3.15k
0.5
3.0
6.00
5890006
夭巴ㄔㄚˋ1.4
51010
麥肯四角薯餅2.26K(約34片)
0.5
3.0
6.00
5890006
夭巴ㄔㄚˋ1.4
54060
強匠卡拉雞腿堡(原味)10片.
3.8
20.0
5.33
5890006
夭巴ㄔㄚˋ1.4
11055
原味奶酥700g
1.0
5.0
5.00
5890006
夭巴ㄔㄚˋ1.4
24245
憶霖OK醬油膏10g*200入
1.0
5.0
5.00
5890006
夭巴ㄔㄚˋ1.4
23168
品高蕃茄包10g*250包
1.2
6.0
4.80
5890006
夭巴ㄔㄚˋ1.4
51263
麥肯洋蔥圈907g
2.8
12.0
4.36
5890006
夭巴ㄔㄚˋ1.4
54061
強匠卡拉雞腿堡(辣味)10片.
5.2
22.0
4.19
5890006
夭巴ㄔㄚˋ1.4
51130
香雞城小肉豆1K.
3.0
12.0
4.00
5890006
夭巴ㄔㄚˋ1.4
23925
好滋味油膏4200公克
0.5
2.0
4.00
5890006
夭巴ㄔㄚˋ1.4
51438
家州黑胡椒里肌豬排(白盤)20片
3.0
12.0
4.00
5890006
夭巴ㄔㄚˋ1.4
31011
168奶精(不含乳(奶)) 1k.
9.0
36.0
4.00
5890006
夭巴ㄔㄚˋ1.4
53043
炸大熱狗25支
0.5
2.0
4.00
5890006
夭巴ㄔㄚˋ1.4
51171
安美熱狗50條.
4.2
16.0
3.76
5890006
夭巴ㄔㄚˋ1.4
32062
亞薩阿薩母紅茶600g
7.5
28.0
3.73
5890006
夭巴ㄔㄚˋ1.4
54057
黃金手工蔥抓餅10片.
5.8
19.0
3.30
5890006
夭巴ㄔㄚˋ1.4
23001
四海鹽酥粉600g
1.2
4.0
3.20
5890006
夭巴ㄔㄚˋ1.4
51190
安美煙燻大火腿 1K
1.2
4.0
3.20
5890006
夭巴ㄔㄚˋ1.4
23452
牛頭牌沙茶醬易開3k
1.2
4.0
3.20
5890006
夭巴ㄔㄚˋ1.4
41189
HISUN起司片84片.
3.2
10.0
3.08
5890006
夭巴ㄔㄚˋ1.4
21131
金鑽巧克力塗抹醬 3k
1.0
3.0
3.00
5890006
夭巴ㄔㄚˋ1.4
51433
港式菠蘿 6入
10.2
30.0
2.93
5890006
夭巴ㄔㄚˋ1.4
51172
安美燻腸 1000g.
2.8
8.0
2.91
5890006
夭巴ㄔㄚˋ1.4
54043
強匠煙燻雞肉片1公斤
3.5
10.0
2.86
5890006
夭巴ㄔㄚˋ1.4
51466
Hisun鬆餅(5片)原味
6.0
17.0
2.83
5890006
夭巴ㄔㄚˋ1.4
21266
梨山花生醬2.8K
0.8
2.0
2.67
5890006
夭巴ㄔㄚˋ1.4
53045
祥哥冷凍蘿蔔糕12片.(白)
14.0
36.0
2.57
5890006
夭巴ㄔㄚˋ1.4
23838
維力媽媽拉麵 70g*6入.
60.0
150.0
2.50
5890006
夭巴ㄔㄚˋ1.4
51012
HISUN四角薯餅20片1260g
5.8
13.0
2.26
5890006
夭巴ㄔㄚˋ1.4
41018
香Q蛋餅皮(原)30入.(紅字)
11.0
24.0
2.18
5890006
夭巴ㄔㄚˋ1.4
51284
馬鈴薯條(HISUN) 2K.
9.0
18.0
2.00
5890006
夭巴ㄔㄚˋ1.4
22106
耐司果醇味煉乳375g
12.0
24.0
2.00
5890006
夭巴ㄔㄚˋ1.4
41042
四海沙拉(大) 3k
1.5
3.0
2.00
5890006
夭巴ㄔㄚˋ1.4
22084
福汎巧克力糖漿680g.
0.0
4.0
1.50
5890006
夭巴ㄔㄚˋ1.4
41032
寶宏pizza絲 1k(雙色).
0.0
20.0
1.50
5890006
夭巴ㄔㄚˋ1.4
25888
伊植麥玉米粒(易開)340g.
0.0
24.0
1.50
5890006
夭巴ㄔㄚˋ1.4
23197
品高辣椒醬包10g*250包
0.0
3.0
1.50
Code
# Revenue lift (SQL) for same sample customers
sample_revenue_lift_sql = (
customer_revenue_lift_sql
.filter (pl.col("customer_code" ).is_in(sample_customers))
.join(customers_lookup, on= "customer_code" , how= "left" )
.select(["customer_code" , "trade_name" , "baseline_total_revenue" , "rush_total_revenue" , "revenue_lift_factor" ])
.sort("rush_total_revenue" , descending= True )
)
(
GT(sample_revenue_lift_sql)
.tab_header(
title= "Customer Revenue Lift (SQL)" ,
subtitle= "Same 10 sample customers"
)
.fmt_currency(["baseline_total_revenue" , "rush_total_revenue" ], currency= "TWD" , decimals= 0 , use_subunits= False )
.fmt_number("revenue_lift_factor" , decimals= 2 )
.cols_label(
customer_code= "Customer Code" ,
trade_name= "Customer Name" ,
baseline_total_revenue= "Baseline Revenue (2wk)" ,
rush_total_revenue= "Rush Revenue" ,
revenue_lift_factor= "Lift Factor"
)
)
Same 10 sample customers
1010047
四海-新庄1.4
NT$71,340
NT$102,599
1.44
0190012
宵歸暝-屏東總店
NT$37,794
NT$99,235
2.63
1310027
隘寮早點1.4
NT$36,503
NT$96,497
2.64
5890006
夭巴ㄔㄚˋ1.4
NT$25,736
NT$95,435
3.71
0370002
劉太太-漁船
NT$19,633
NT$88,667
4.52
1010037
美美早餐店(鹽埔)-1.4
NT$49,094
NT$86,019
1.75
0610012
繁華市場1.4
NT$50,812
NT$82,711
1.63
5870001
新月牛角烘焙食品行
NT$42,009
NT$75,863
1.81
2510038
好野早午餐-佳冬2.5
NT$41,984
NT$73,131
1.74
0610046
永和-潭頭-1.4
NT$40,292
NT$71,567
1.78
Reconciliation: Ibis vs SQL
Code
# Calculate SQL summary stats
avg_qty_lift_sql = customer_sku_lift_sql["qty_lift_factor" ].mean()
median_qty_lift_sql = customer_sku_lift_sql["qty_lift_factor" ].median()
avg_revenue_lift_sql = customer_revenue_lift_sql["revenue_lift_factor" ].mean()
median_revenue_lift_sql = customer_revenue_lift_sql["revenue_lift_factor" ].median()
# Compare Ibis vs SQL (cast all to float for consistent types)
reconciliation = pl.DataFrame({
"Metric" : [
"Baseline Customer-SKU Pairs" ,
"Rush Customer-SKU Pairs" ,
"Baseline Unique Customers" ,
"Rush Unique Customers" ,
"Customer-SKU Pairs with Lift" ,
"Customers with Lift Data" ,
"Rush-Only Customers" ,
"Rush-Only Revenue" ,
"Avg Qty Lift" ,
"Median Qty Lift" ,
"Avg Revenue Lift" ,
"Median Revenue Lift"
],
"Ibis" : [
float (ibis_summary["baseline_sku_pairs" ]),
float (ibis_summary["rush_sku_pairs" ]),
float (ibis_summary["baseline_customers" ]),
float (ibis_summary["rush_customers" ]),
float (ibis_summary["lift_sku_pairs" ]),
float (ibis_summary["lift_customers" ]),
float (ibis_summary["rush_only_customers" ]),
float (ibis_summary["rush_only_revenue" ]),
float (ibis_summary["avg_qty_lift" ]),
float (ibis_summary["median_qty_lift" ]),
float (ibis_summary["avg_revenue_lift" ]),
float (ibis_summary["median_revenue_lift" ])
],
"SQL" : [
float (len (baseline_customer_sku_sql)),
float (len (rush_customer_sku_sql)),
float (baseline_customer_sku_sql['customer_code' ].n_unique()),
float (rush_customer_sku_sql['customer_code' ].n_unique()),
float (len (customer_sku_lift_sql)),
float (len (customer_revenue_lift_sql)),
float (rush_only_customer_count_sql),
float (rush_only_total_revenue_sql),
float (avg_qty_lift_sql),
float (median_qty_lift_sql),
float (avg_revenue_lift_sql),
float (median_revenue_lift_sql)
]
})
# Add difference column
reconciliation = reconciliation.with_columns([
(pl.col("Ibis" ) - pl.col("SQL" )).alias("Difference" )
])
# Check if all match (filter out NaN/inf for comparison)
finite_diffs = reconciliation["Difference" ].filter (reconciliation["Difference" ].is_finite())
all_match = len (finite_diffs) == len (reconciliation) and (finite_diffs.abs ().sum () < 0.01 )
# Also check that inf values match (both inf or both -inf)
inf_match = (reconciliation["Ibis" ].is_infinite() == reconciliation["SQL" ].is_infinite()).all ()
status = "PASSED" if (all_match or (finite_diffs.abs ().sum () < 0.01 and inf_match)) else "DIFFERENCES FOUND"
(
GT(reconciliation)
.tab_header(
title= f"Ibis vs SQL Reconciliation: { status} " ,
subtitle= "All metrics should match (Difference = 0)"
)
.fmt_number(["Ibis" , "SQL" , "Difference" ], decimals= 2 )
)
All metrics should match (Difference = 0)
Baseline Customer-SKU Pairs
15,970.00
15,970.00
0.00
Rush Customer-SKU Pairs
10,219.00
10,219.00
0.00
Baseline Unique Customers
1,421.00
1,421.00
0.00
Rush Unique Customers
1,136.00
1,136.00
0.00
Customer-SKU Pairs with Lift
9,956.00
9,956.00
0.00
Customers with Lift Data
1,068.00
1,068.00
0.00
Rush-Only Customers
68.00
68.00
0.00
Rush-Only Revenue
384,538.00
384,538.00
0.00
Avg Qty Lift
2.78
2.78
0.00
Median Qty Lift
1.60
1.60
0.00
Avg Revenue Lift
inf
inf
NaN
Median Revenue Lift
1.63
1.63
0.00