jeudi 30 septembre 2021

pandas tables to html, horizontal with two columns

I am trying to turn a pandas table into a horizontal html table with two columns. The original table has one row and it can be generated using the python code below.

df_dict = {}
for i in range(10):
    col = 'col:' + str(i)
    val = 'val:'+ str(i)
    df_dict.update({col:val})
    
df = pd.DataFrame([df_dict])

I want the resulting html table to have the format of the table shown in the link below. Does anybody have any ideas on how to accomplish this?

https://i.stack.imgur.com/TvvAC.png




Aucun commentaire:

Enregistrer un commentaire