Kongfha commited on
Commit
c25c41b
·
verified ·
1 Parent(s): f7a3ab8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -251,12 +251,13 @@ fig.update_layout(
251
  # Display the map
252
  st.plotly_chart(fig, use_container_width=True)
253
 
254
- # Show top 10 rows
255
- top_10_pd = filtered_map_data_spark.limit(10).toPandas()
 
256
 
257
  # Select only needed columns for preview and rename them
258
  # Original columns: header -> affiliation, city -> city, country -> country, title_x -> title
259
- display_df = top_10_pd[["header", "city", "country", "title_x"]].copy()
260
  display_df.rename(columns={
261
  "header": "affiliation",
262
  "city": "city",
 
251
  # Display the map
252
  st.plotly_chart(fig, use_container_width=True)
253
 
254
+ # Show top N rows
255
+ top_n_rows = 50
256
+ top_pd = filtered_map_data_spark.limit(top_n_rows).toPandas()
257
 
258
  # Select only needed columns for preview and rename them
259
  # Original columns: header -> affiliation, city -> city, country -> country, title_x -> title
260
+ display_df = top_pd[["header", "city", "country", "title_x"]].copy()
261
  display_df.rename(columns={
262
  "header": "affiliation",
263
  "city": "city",