import pandas as pd df1 = pd.DataFrame({ 'a': [1,2,3], 'b': [4,5,6] }) df2 = pd.DataFrame({ 'c': [7,8], 'd': [9,10], 'e': [11,12] }) # concatenating strings example with the + operator my_form = '''
''' df1.to_html() + df2.to_html() + my_form # using f strings to do the same ting my_srt = f''' Helo world! {df1.to_html()} ''' # you might need to wrap the final output string with make_response return make_response(my_srt, ...)