maringetxway commited on
Commit
01b3760
·
verified ·
1 Parent(s): 021666f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -10
app.py CHANGED
@@ -142,19 +142,22 @@ def filter_by_fields(selected_country, selected_city, selected_language):
142
  return "<p>No participants match your filters.</p>"
143
 
144
  html = "<table style='width:100%; border-collapse: collapse;'>"
 
 
 
 
 
 
 
 
145
  html += "<tr>"
146
- for col in df.columns:
147
- html += f"<th style='border: 1px solid #ccc; padding: 6px;'>{col}</th>"
 
 
 
148
  html += "</tr>"
149
 
150
- for _, row in df.iterrows():
151
- html += "<tr>"
152
- for col in df.columns:
153
- val = row[col]
154
- if col == "Discord":
155
- val = f"<a href='https://discord.com/users/{val}' target='_blank'>{val}</a>"
156
- html += f"<td style='border: 1px solid #eee; padding: 6px;'>{val}</td>"
157
- html += "</tr>"
158
 
159
  return html
160
 
 
142
  return "<p>No participants match your filters.</p>"
143
 
144
  html = "<table style='width:100%; border-collapse: collapse;'>"
145
+ # Header row
146
+ html += "<tr>"
147
+ for col in df.columns:
148
+ html += f"<th style='border: 1px solid #ccc; padding: 6px;'>{col}</th>"
149
+ html += "</tr>"
150
+
151
+ # Data rows
152
+ for _, row in df.iterrows():
153
  html += "<tr>"
154
+ for col in df.columns:
155
+ val = row[col]
156
+ if col == "Discord":
157
+ val = f"<a href='https://discord.com/users/{val}' target='_blank'>{val}</a>"
158
+ html += f"<td style='border: 1px solid #eee; padding: 6px;'>{val}</td>"
159
  html += "</tr>"
160
 
 
 
 
 
 
 
 
 
161
 
162
  return html
163