I am writing this simple code like so
import prettytable
# open csv file
a = open("dash", 'r')
# read the csv file
a = a.readlines()
# headers for table
t = prettytable.PrettyTable(field_names=["Test", "Status"], title="Test Report",
header_style="title", header=True,
hrules=prettytable.ALL, vrules=prettytable.ALL)
# Adding the data
for i in range(len(a)):
row = a[i].split(',')
t.add_row([row[0], row[1]])
t.add_row(["",""])
code = t.get_html_string()
html_file = open('Table.html', 'w')
html_file = html_file.write(code)
But I get output like this
Test Report
Test Status
test1 pass
test2 fail
Why am I not able to see the table borders?