not very "tably" as a table structure .... headers are not related to the
data keys, and col1 and col2 aren't "strictly" ordered, then you have to
force the order yourself.
However, one of the following (exact same output)
{{=TABLE(
THEAD(TR([TH(h) for h in headers])),
TBODY([TR(TD(row['col1']), TD(row['col2'])) for row in data])
)}}
<table>
<thead>
{{=TR([TH(h) for h in headers])}}
</thead>
<tbody>
{{=CAT([TR(TD(row['col1']), TD(row['col2'])) for row in data])}}
</tbody>
</table>
<table>
<thead>
<tr>
{{for h in headers:}}
{{=TH(h)}}
{{pass}}
</tr>
</thead>
<tbody>
{{for row in data:}}
<tr>
{{=TD(row['col1'])}} {{=TD(row['col2'])}}
</tr>
{{pass}}
</tbody>
</table>
--