asdf
All checks were successful
Deploy App to Docker / deploy (push) Successful in 29s

This commit is contained in:
zman 2025-04-12 14:01:57 -04:00
parent 64897392f1
commit 94a3a517c7

View File

@ -347,13 +347,8 @@ class PricingService:
price_lookup = self.get_all_prices_for_products(df['product_id'].unique()) price_lookup = self.get_all_prices_for_products(df['product_id'].unique())
# Convert the nested dict to a DataFrame # Apply price columns
price_df = pd.DataFrame.from_dict(price_lookup, orient='index') # product_id becomes index df = df.apply(lambda row: self.apply_price_to_df_columns(row, price_lookup), axis=1)
price_df.index.name = 'product_id'
price_df.reset_index(inplace=True)
# Merge onto your main DataFrame
df = df.merge(price_df, on='product_id', how='left')
logger.debug(f"Applying pricing algorithm: {ACTIVE_PRICING_ALGORITHIM}") logger.debug(f"Applying pricing algorithm: {ACTIVE_PRICING_ALGORITHIM}")