I have a callback function that is supposed to write multiple tables by using a for loop, but somehow, only one of the tables gets produced:
def update_table(value, max_rows=100):
for key in returnrates[value]:
return html.Table(
# Header
[html.Tr([html.Th(col) for col in returnrates[value][key].columns])] +
# Body
[html.Tr([
html.Td(returnrates[value][key].iloc[i][col]) for col in returnrates[value][key].columns
]) for i in range(min(len(returnrates[value][key]), max_rows))]
)
I’d appreciate any thoughts on where I might be going wrong.
Happy Easter!