Skip to content

Allow custom column padding #22

Closed
Closed
@amarvin

Description

@amarvin

There are many tablefmt options, but they all have 2 spaces between columns. Can this be configured?

For example,

from tabulate import tabulate
print(tabulate([[1, 2], [3, 4]], tablefmt='plain'))

produces

1  2
3  4

My proposal is to have options padding, left_padding and right_padding like PrettyTable has

from tabulate import tabulate
print(tabulate([[1, 2], [3, 4]], tablefmt='plain', left_padding=0))

produces

1 2
3 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions