Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Dropdown taking too much time

 @app.callback(Output('target_var','options'),[Input('my-dropdown','value'),Input('datatable','rows')])
def add_options_target_var(selected_value,data):
    data = pd.DataFrame(data)
    numl = []
    if selected_value in ['plot','hierarchy','cat plot','targetvsachievement']:
        num_menu = []
        num_columns = data._get_numeric_data().columns
        for num_col in num_columns:
            num_menu.append({'label':num_col, 'value':num_col})
        return num_menu
    else:
        return numl

This code works fine when size of data is < 5 mb
I tried to upload 30mb file it took lot of time to display each drop dwon