Open fdoandres1998 opened 9 months ago
When I need to preserve whitespace, I just set the flag you found:
import tabulate
tabulate.PRESERVE_WHITESPACE = True
table = [["Earth", 6371],
[" Mars", 3390],
["Moon", 1737]]
print(tabulate.tabulate(table, tablefmt="simple"))
The option to whether or not to preserve leading/trailing whitespace in data is hardcoded to False by default. I would like the option to preserve the whitespace when making a table using the tabulate function.
line 72 of tabulate.py
Thanks!