I want to use pandas dataFrames with dataTables. I cannot figure out how to initialize the table without an id.
Is there any way to set the id in the table tag w
Although the accepted answer works amazingly, here is what i did to apply id and also some classes to heading of tables.
html = df.to_html().replace('
This works because to_html just returns a string and we can use python replace method of string objects to replace any part with anything else( note that i used only the opening '<'). I used this to include styles to ie. headings section of the table!
- 热议问题