Skip to content
Advertisement

Combine two tables, one with header only, another with table values for bs4

Want to combine two <table> , one with header another with table values, the first table consist with <table>, <thead> and no value in <tbody> with header information only, the second table consist with <table>, no value in <thead> and <tbody> with table value only

HTML code

JavaScript

Python Code

JavaScript

Execution Result

JavaScript

Expected Result (5 columns)

JavaScript

Advertisement

Answer

JavaScript

Output:

JavaScript

Or applying to your example directly:

JavaScript

Will output the same.

Feel free to use attrs according to your needs.

Advertisement