I have a table of stock tickers in a dash datatable with stock performance metrics. The last row is a custom etf that weights the returns and averages them together.
i.e.
What I’m trying to do is update the custom etf columns after everything has been reweighted. Everything is preset to be equally weighted.
@app.callback(
dash.dependencies.Output(‘comps-table’,‘rows’),
[ dash.dependencies.Input(‘comps-table’, ‘row_update’),
dash.dependencies.Input(‘comps-table’, ‘rows’),
])
def update_graph(tickers, selected_ticker, row_update, rows):
if row_update is not None: creates reweighted etf
return rows
Is there a way to do this? I already have it set up so when you change the weighting it effects a graph which works great but i would like the table to update as well.
I like the approach, however, this doesn’t seem to work either? As soon as you edit a cell and press Enter, the active_cell is no longer the previously edited cell.
Apparently, there is no way around to compare data_previous and data?
It isn’t clear to me either. Replacing the function display_output in the original code at the top with chriddyp’s does not work: the original table does not display and is not editable.
Replacing
import dash_table_experiments as dt
with
import dash_table as dt
also does not work. This looks like exactly the problem I have been having the past ~week. Hoping someone can help me!
Hi @chriddyp please can you post an implementation for a datatble with dropdown inputs where if i select a particular value from two columns it gives an ouput in another column emphacies is on dropdown in datatable facing this challenge for a month now