alignment error
See original GitHub issueHi,
My code is like this:
from tabulate import tabulate
res = [{'object': '1986', 'relation': '出生日期', 'subject': '爱德华·尼科·埃尔南迪斯'}, {'object': '哥伦比亚', 'relation': '国籍', 'subject': '爱德华·尼科·埃尔南迪斯'}, {'object': '70公分', 'relation': '身高', 'subject': '爱德华·尼科·埃尔南迪斯'}]
title = ['subject', 'relation', 'object']
tbl = [title] + [[el['subject'], el['relation'], el['object']] for el in res]
tbl = tabulate(tbl, headers='firstrow', tablefmt='orgtbl', colalign=('right',))
print(tbl)
And the result is:
| subject | relation | object |
|--------------+------------+----------|
| 爱德华·尼科·埃尔南迪斯 | 出生日期 | 1986 |
| 爱德华·尼科·埃尔南迪斯 | 国籍 | 哥伦比亚 |
| 爱德华·尼科·埃尔南迪斯 | 身高 | 70公分 |
How could I make the column aligns well ?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Alignment error counter increments due to a misconfiguration ...
Alignment errors are the count of the number of frames received that do not end with an even number of octets and have...
Read more >How to find an alignment error in a passage given in websites
No. Justified alignment means that the text is word spaced to be flush to the margins on both the left and the right....
Read more >Alignment Errors & Misalignments - Matterport Help Center
An alignment error is when the Matterport Capture app cannot align the current scan to your previous scans. In this case, Matterport Capture ......
Read more >HP inkjet printers - Alignment errors | HP® Customer Support
1. Load plain white paper in the input tray. 2. Adjust the paper width guides until they rest against the edges of the...
Read more >Effects of Alignment Error and Alignment Filtering on the ...
Two different types of alignment error might cause a false negative at a positively selected site: either misalignment of one or more ...
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 problem is fixed in 0.8.8.
I just installed
wcwidth
but it has not fixed this issue for me. I thought that maybe I am just misunderstanding something so apologies if this is unrelated to tabulate/wcwidth.cat-ing the file via cli returns:
Pasting the value in this comment returns the same issue it returns when the table is emailed to myself. ±----------------±-----------+ | Date | 2020-09-16 | | Closing value | 3385.49 | | Notional change | -15.71 | | Percent change | -0.46 | ±----------------±-----------+