fschwartzer commited on
Commit
27de34f
1 Parent(s): 0498dc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -31,6 +31,19 @@ def get_report(query):
31
  doc.add_heading('2. Avaliação:', level=2)
32
  doc.add_paragraph('2.1 Avaliando 01')
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  # Add market research section
35
  doc.add_heading('3. Pesquisa de Mercado:', level=2)
36
 
 
31
  doc.add_heading('2. Avaliação:', level=2)
32
  doc.add_paragraph('2.1 Avaliando 01')
33
 
34
+ # Here you'll insert the df_nearest as a table
35
+ if not df_nearest.empty:
36
+ table = doc.add_table(rows=1, cols=len(df_nearest.columns))
37
+ table.style = 'Table Grid'
38
+ hdr_cells = table.rows[0].cells
39
+ for i, column_name in enumerate(df_nearest.columns):
40
+ hdr_cells[i].text = column_name
41
+
42
+ for index, row in df_nearest.iterrows():
43
+ row_cells = table.add_row().cells
44
+ for i, value in enumerate(row):
45
+ row_cells[i].text = str(value)
46
+
47
  # Add market research section
48
  doc.add_heading('3. Pesquisa de Mercado:', level=2)
49