question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Insert a divider

See original GitHub issue

It 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
matthewlloydcommented, Feb 20, 2021

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.

1reaction
BartBruhcommented, Dec 5, 2022

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.

Jack        Word 1  Word 2
Ronaldinho  Word 3  Word 4
----------  ------  ------
Becky       8       9
William     1       2
----------  ------  ------`

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found