How to display dictionary with dataframes on a localhost (using Flask and Python)?

Solution
@app.route("/showDict")
def show_dict():
    import pandas as pd
    df = pd.DataFrame({'id': [1, 2, 3], 'col1': ['kuku', 'dudu', 'lulu'], 'col2': [8, 9, 10]}).to_json()
    return {'id': 1, 'df': df, 'df_size': 3}