The answer to my question might be simple, but I can’t seem to find the solution for some reason…
What I’m trying to do:
I would like to filter a table based on the values contained in a specific column. Normally I would use the expression: app_tables.df_articles_with_topics_nl.search(column_name = 1).
The difficulty in my case is that the column name it should filter is not always the same, but depends on the output of a dropdown variable. In my case, the dropdown variable name is ‘index_selected_technology’, and an output of the variable could be ‘t72’ (which corresponds to one column in the table).
If I write 'print(app_tables.df_articles_with_topics_nl.search(index_selected_technology=1)), it logically returns 'anvil.tables.TableError: No such column ‘index_selected_technology’ in table ‘df_articles_with_topics_nl’.
Is there a way to pass the column name as an output of a variable in the expression above? Or is there another way to do it?
Thanks in advance!