Arafath10 commited on
Commit
cc7d2a6
·
verified ·
1 Parent(s): fbd8c25

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -2
main.py CHANGED
@@ -160,6 +160,7 @@ def forecast(monthly_sales):
160
 
161
  def process_product(product_name, data):
162
  full_trend = ""
 
163
  try:
164
  # Get today's date
165
  today = datetime.today().strftime('%Y-%m-%d %H:%M:%S')
@@ -175,8 +176,6 @@ def process_product(product_name, data):
175
  # Concatenate the original DataFrame with the new fake transaction DataFrame
176
  data = pd.concat([data, fake_transaction_df], ignore_index=True)
177
 
178
- # Extract the 'sub_sku' column
179
- sub_sku = df['sub_sku']
180
 
181
  # Summarize the sales count per month
182
  data['transaction_date'] = pd.to_datetime(data['transaction_date'])
 
160
 
161
  def process_product(product_name, data):
162
  full_trend = ""
163
+ sub_sku = data.loc[0, 'sub_sku']
164
  try:
165
  # Get today's date
166
  today = datetime.today().strftime('%Y-%m-%d %H:%M:%S')
 
176
  # Concatenate the original DataFrame with the new fake transaction DataFrame
177
  data = pd.concat([data, fake_transaction_df], ignore_index=True)
178
 
 
 
179
 
180
  # Summarize the sales count per month
181
  data['transaction_date'] = pd.to_datetime(data['transaction_date'])