From 94a3a517c70bd48d72802c9c72f8371085c60eeb Mon Sep 17 00:00:00 2001 From: zman Date: Sat, 12 Apr 2025 14:01:57 -0400 Subject: [PATCH] asdf --- app/services/pricing.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/services/pricing.py b/app/services/pricing.py index c707030..5dd5d77 100644 --- a/app/services/pricing.py +++ b/app/services/pricing.py @@ -347,13 +347,8 @@ class PricingService: price_lookup = self.get_all_prices_for_products(df['product_id'].unique()) - # Convert the nested dict to a DataFrame - price_df = pd.DataFrame.from_dict(price_lookup, orient='index') # product_id becomes index - 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') + # Apply price columns + df = df.apply(lambda row: self.apply_price_to_df_columns(row, price_lookup), axis=1) logger.debug(f"Applying pricing algorithm: {ACTIVE_PRICING_ALGORITHIM}")