Пример #1
0
def generate_table(selected_dropdown_value,max_rows=10):
    global financialreportingdf # Needed to modify global copy of financialreportingdf
    financialreportingdf = getfinancialreportingdfformatted(selected_dropdown_value.lower()).reset_index()
    financialreportingwritten = getfinancialreportingdf(selected_dropdown_value)
    # Header
    return [html.Tr([html.Th(col) for col in financialreportingwritten.columns])] + [html.Tr([
        html.Td(financialreportingwritten.iloc[i][col]) for col in financialreportingwritten.columns
    ]) for i in range(min(len(financialreportingwritten), max_rows))]
Пример #2
0
def generate_table(selected_dropdown_value, max_rows=10):
    global financialreportingdf  # Needed to modify global copy of financialreportingdf
    financialreportingdf = getfinancialreportingdfformatted(
        selected_dropdown_value.strip().lower()).reset_index()
    financialreportingwritten = getfinancialreportingdf(
        selected_dropdown_value.strip()).reset_index()
    financialreportingwritten[['roe', 'interestcoverageratio']] = np.round(
        financialreportingdf[['roe', 'interestcoverageratio']], 2)
    #   print('printing line 106')
    #  print(financialreportingdf)
    # print('printing line 108')
    #print(financialreportingwritten)
    # Header
    return [
        html.Tr([html.Th(col) for col in financialreportingwritten.columns])
    ] + [
        html.Tr([
            html.Td(financialreportingwritten.iloc[i][col])
            for col in financialreportingwritten.columns
        ]) for i in range(min(len(financialreportingwritten), max_rows))
    ]