Update app.py
Browse files
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
|
255 |
-
|
|
|
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 =
|
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",
|