from docx import Document
doc = Document()
table = doc.add_table(rows=1, cols=len(data[0]))
table.style = 'Table Grid' # This style adds borders to the table