From 5b87fde8ed79d15223e19dbb8669814c75b88973 Mon Sep 17 00:00:00 2001 From: Daniel Rosel Date: Thu, 27 Nov 2025 00:39:32 +0100 Subject: [PATCH] add warning --- experiments/procesing/pricing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/experiments/procesing/pricing.py b/experiments/procesing/pricing.py index 597fd4e..25c3725 100644 --- a/experiments/procesing/pricing.py +++ b/experiments/procesing/pricing.py @@ -92,11 +92,12 @@ if __name__ == "__main__": # align elasticity with price data by productId, fill missing with 0 if not price_data.empty and elasticity_df is not None and not elasticity_df.empty: + # TODO FIX: we might have duplicate productIds price_data_merged = price_data.merge( elasticity_df[['productId', 'elasticity']], on='productId', how='left' - ).fillna({'elasticity': 0.0}) + ).fillna({'elasticity': 0.0}) # is it possible we are spilling some elasticities into other products prices = price_data_merged['price'].values elasticities = price_data_merged['elasticity'].values