def generate_future_price_table(selected_dropdown_value,discountrate,marginrate,max_rows=10): global financialreportingdf # Needed to modify global copy of financialreportingdf global stockpricedf pricedf = generate_price_df(selected_dropdown_value,financialreportingdf,stockpricedf,discountrate,marginrate) # Header return [html.Tr([html.Th(col) for col in pricedf.columns])] + [html.Tr([ html.Td(round(pricedf.iloc[i][col],2)) for col in pricedf.columns ]) for i in range(min(len(pricedf), max_rows))]
def generate_future_price_table(selected_dropdown_value, discountrate, marginrate, max_rows=10): global financialreportingdf global stockpricedf pricedf = generate_price_df(selected_dropdown_value.strip(), financialreportingdf, stockpricedf, discountrate, marginrate) # Header return [html.Tr([html.Th(col) for col in pricedf.columns])] + [ html.Tr([ html.Td(html.B(pricedf.iloc[i][col])) if col == 'decision' else html.Td(round(pricedf.iloc[i][col], 2)) for col in pricedf.columns ]) for i in range(min(len(pricedf), max_rows)) ]