Feature request: Insert a divider
See original GitHub issueIt would be great to be able to add a dividing line at arbitrary points within a table. For example:
import tabulate
rows = []
rows.append([1, 2, 3])
rows.append([4, 5, 6])
rows.append(tabulate.DIVIDER)
rows.append([5, 7, 9])
print(tabulate.tabulate(rows, tablefmt='psql'))
Desired output:
+---+---+---+
| 1 | 2 | 3 |
| 4 | 5 | 6 |
+---+---+---+
| 5 | 7 | 9 |
+---+---+---+
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Feature Request: Dividers - Smore Help Center
Feature Request : Dividers. Hi there! If you're here, we're guessing that you would like to add section dividers within your newsletters.
Read more >Ability to create a line divider - Feature Requests - RemNote
Feature to turn a Rem into a line divider to help to organize documents. Similar to what exist in notion with /divider. I...
Read more >Feature Request: Allow Separators Between Project Folders
Would we be able to add separators to our project hierarchies? As it stands the “folders” key of a project contains a list...
Read more >[Feature request] Add page separator between notes ... - Reddit
I'm capturing meeting notes into multiple notes and using export multiple notes into PDF as means to share it.
Read more >Dividers – Higher Logic
Adding a Divider ... On the Design > Build tab, you'll find the Divider layout in the Static Elements category. Drag and drop...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is not the same request, because the divider(s) could be inserted between any arbitrary rows in the table, not just to separate the last row.
Use SEPARATING_LINE after importing it as
from tabulate import SEPARATING_LINE
I don’t know if this feature existed when it was requested but figured I would reply just in case somebody else stumbles here while searching for it.
Example:
from tabulate import tabulate, SEPARATING_LINE
data = [ ['Jack', 'Word 1', 'Word 2'], ['Ronaldinho', 'Word 3', 'Word 4'], SEPARATING_LINE, ['Becky', 8, 9], ['William', 1, 2] ]
print(tabulate(data))
The output will have a line break in place of the SEPARATING_LINE.