fixed filter by country/gics bug
Browse files
app.py
CHANGED
|
@@ -440,8 +440,19 @@ with gr.Blocks(title="Swift Stock Screener, by Reddgr") as front:
|
|
| 440 |
ticker = last_result_df.iloc[row_i][display_col]
|
| 441 |
print(f"DEBUG ticker extracted: {ticker}")
|
| 442 |
else:
|
| 443 |
-
|
| 444 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 445 |
)
|
| 446 |
|
| 447 |
maestro_details = maestro[company_details_cols].copy()
|
|
|
|
| 440 |
ticker = last_result_df.iloc[row_i][display_col]
|
| 441 |
print(f"DEBUG ticker extracted: {ticker}")
|
| 442 |
else:
|
| 443 |
+
# Filter by column returns (df, pagination_label, page_number, summary)
|
| 444 |
+
filtered_df, pagination, page, summary = filter_by_column(evt)
|
| 445 |
+
# We need to return all 9 output values
|
| 446 |
+
return (
|
| 447 |
+
filtered_df,
|
| 448 |
+
pagination,
|
| 449 |
+
page,
|
| 450 |
+
summary,
|
| 451 |
+
gr.update(selected=0), # Keep on the results tab
|
| 452 |
+
gr.update(), # company_title
|
| 453 |
+
gr.update(), # company_summary
|
| 454 |
+
gr.update(), # company_details
|
| 455 |
+
gr.update() # company_plot
|
| 456 |
)
|
| 457 |
|
| 458 |
maestro_details = maestro[company_details_cols].copy()
|