Arafath10 commited on
Commit
80d17ec
·
verified ·
1 Parent(s): 425791e

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -1
main.py CHANGED
@@ -160,7 +160,10 @@ def forecast(monthly_sales):
160
 
161
  def process_product(product_name, data):
162
  full_trend = ""
163
- sub_sku = data.loc[0, 'sub_sku'].copy()
 
 
 
164
  try:
165
  # Get today's date
166
  today = datetime.today().strftime('%Y-%m-%d %H:%M:%S')
 
160
 
161
  def process_product(product_name, data):
162
  full_trend = ""
163
+ try:
164
+ sub_sku = data.loc[0, 'sub_sku']
165
+ except KeyError:
166
+ sub_sku = "not provided"
167
  try:
168
  # Get today's date
169
  today = datetime.today().strftime('%Y-%m-%d %H:%M:%S')