anuradhakoppala commited on
Commit
d354c8f
·
verified ·
1 Parent(s): 1b0e496

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -328,8 +328,8 @@ async def generate_report(sf, output_file, contract_doc_id):
328
  ('End Date', r.get('End_Date__c', 'Not extracted')),
329
  ]
330
  rows.extend(fields)
331
- # Add plain header row
332
- df = pd.DataFrame([['Summary Report', '']] + rows, columns=['Field', 'Value']) if rows else pd.DataFrame(columns=['Field', 'Value'])
333
  df.to_csv(output_file, index=False, encoding='utf-8')
334
  return df, output_file
335
  except Exception as e:
 
328
  ('End Date', r.get('End_Date__c', 'Not extracted')),
329
  ]
330
  rows.extend(fields)
331
+ # Create DataFrame without the "Summary Report" header row
332
+ df = pd.DataFrame(rows, columns=['Field', 'Value']) if rows else pd.DataFrame(columns=['Field', 'Value'])
333
  df.to_csv(output_file, index=False, encoding='utf-8')
334
  return df, output_file
335
  except Exception as e: