poemsforaphrodite commited on
Commit
2f0da4f
1 Parent(s): 885e4ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -484,7 +484,11 @@ def show_tabular_data(df, co):
484
  # Display each row
485
  for index, row in df.iloc[start_idx:end_idx].iterrows():
486
  cols = st.columns([3, 2, 1, 1, 1, 1, 1, 1])
487
- cols[0].write(row['page'])
 
 
 
 
488
  cols[1].write(row['query'])
489
  cols[2].write(row['clicks'])
490
  cols[3].write(row['impressions'])
 
484
  # Display each row
485
  for index, row in df.iloc[start_idx:end_idx].iterrows():
486
  cols = st.columns([3, 2, 1, 1, 1, 1, 1, 1])
487
+
488
+ # Truncate and make the URL clickable
489
+ truncated_url = row['page'][:30] + '...' if len(row['page']) > 30 else row['page']
490
+ cols[0].markdown(f"[{truncated_url}]({row['page']})")
491
+
492
  cols[1].write(row['query'])
493
  cols[2].write(row['clicks'])
494
  cols[3].write(row['impressions'])