mirror of
https://github.com/velocitatem/PHANTOM.git
synced 2026-05-31 08:33:36 +00:00
add warning
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user