AI_Doc / backend /utils /excel_export.py
Nausad's picture
Upload 22 files
d160281 verified
raw
history blame contribute delete
382 Bytes
import pandas as pd
def export_reports_to_excel(reports, file_path):
if not reports:
df = pd.DataFrame(columns=[
"id", "patient_name", "patient_email", "predicted_disease",
"predicted_doctor", "specialization", "confidence", "created_at"
])
else:
df = pd.DataFrame(reports)
df.to_excel(file_path, index=False)