Roman
SSolara
•Created by hanne5005 on 12/29/2023 in #questions-issues
Solara for data manipulation application?
Hi,
How is your project going? I am interested in doing something similar (reading database information, displaying it, and allowing users to write it through input components).
As a newbie, I have ChatGPT supporting me. It suggested the following logic: functions with pre-written queries that are formatted after the user inputs something. The functions are called on value change/button click. It works well for reading tables and displaying them in dataframes (and using a search bar as a filter) as well as writing new lines in a table. However, modifying existing data is more challenging.
5 replies
SSolara
•Created by Roman on 6/13/2024 in #questions-issues
Is it possible to update a df assigned to a reactive object without recreating it ?
(my bad for the incomplete example, it tested it in a notebook (in VSCode))
thanks for the solution
I think I lack some python litteracy : why would my last example need to use a shallow copy while yours doesn't ?
13 replies
SSolara
•Created by Roman on 6/13/2024 in #questions-issues
Is it possible to update a df assigned to a reactive object without recreating it ?
@MaartenBreddels
tried something a little bit different and it doesn't work : the df doesn't get updated dynamically
13 replies
SSolara
•Created by Roman on 6/13/2024 in #questions-issues
Is it possible to update a df assigned to a reactive object without recreating it ?
(access bloked by my company i'll have a look back home but thanks !!)
13 replies
SSolara
•Created by Roman on 6/13/2024 in #questions-issues
Is it possible to update a df assigned to a reactive object without recreating it ?
by not working i mean that the df doesn't get updated while the list does
13 replies
SSolara
•Created by Roman on 6/13/2024 in #questions-issues
Is it possible to update a df assigned to a reactive object without recreating it ?
but this doesn't :
factor = solara.reactive(1)
@solara.component
def Page():
df_1['new'] = df_1['population'] * factor.value
with Column():
InputInt('Factor', value=factor)
DataFrame(df_1)
Page()
13 replies
SSolara
•Created by Roman on 6/13/2024 in #questions-issues
Is it possible to update a df assigned to a reactive object without recreating it ?
to give more context :
no df example :
factor = solara.reactive(1)
@solara.component
def Page():
population = [round( 100 *(1+0.1)**i) for i in range(0, 10)]
new = [p * factor.value for p in population]
with Column():
InputInt('Factor', value=factor)
Markdown(str(new))
Page()
13 replies