I want a very minimal table which I attempted as follows:
from prettytable import PrettyTable, HEADER, FRAME, ALL, NONE
output = PrettyTable(align='l', header=False)
output.title = 'My Table'
output.border = False
output.hrules = HEADER
output.add_row([1, 2, 3])
output.add_row([4, 5, 6])
output.add_row([7, 8, 9])
print(output)
Output:
My Table
1 2 3
4 5 6
7 8 9
Desired output:
My Table
-----------
1 2 3
4 5 6
7 8 9
You can achieve that style using the following
From what I could tell from the library source there is no way to get the style you want without the
splitlines/joinbit at the end to remove the bottom border line.