Skip to content

Commit fd3dc7a

Browse files
authored
Updated README and CHANGELOG
1 parent 4cb9524 commit fd3dc7a

File tree

2 files changed

+78
-62
lines changed

2 files changed

+78
-62
lines changed

CHANGELOG

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,54 @@
1-
- 0.9.1: Future version.
2-
- 0.9.0: Drop support for Python 2.7, 3.5, 3.6.
3-
Migrate to pyproject.toml project layout (PEP 621).
4-
New output formats: `asciidoc`, various `*grid` and `*outline` formats.
5-
New output features: vertical row alignment, separating lines.
6-
New input format: list of dataclasses (Python 3.7 or later).
7-
Support infinite iterables as row indices.
8-
Improve column width options.
9-
Improve support for ANSI escape sequences and document the behavior.
10-
Various bug fixes.
11-
- 0.8.10: Python 3.10 support. Bug fixes. Column width parameter.
12-
- 0.8.9: Bug fix. Revert support of decimal separators.
13-
- 0.8.8: Python 3.9 support, 3.10 ready.
14-
New formats: ``unsafehtml``, ``latex_longtable``, ``fancy_outline``.
15-
Support lists of UserDicts as input.
16-
Support hyperlinks in terminal output.
17-
Improve testing on systems with proxies.
18-
Migrate to pytest.
19-
Various bug fixes and improvements.
20-
- 0.8.7: Bug fixes. New format: `pretty`. HTML escaping.
21-
- 0.8.6: Bug fixes. Stop supporting Python 3.3, 3.4.
22-
- 0.8.5: Fix broken Windows package. Minor documentation updates.
23-
- 0.8.4: Bug fixes.
24-
- 0.8.3: New formats: `github`. Custom column alignment. Bug fixes.
25-
- 0.8.2: Bug fixes.
26-
- 0.8.1: Multiline data in several output formats.
27-
New ``latex_raw`` format.
28-
Column-specific floating point formatting.
29-
Python 3.5 & 3.6 support. Drop support for Python 2.6, 3.2, 3.3 (should still work).
30-
- 0.7.7: Identical to 0.7.6, resolving some PyPI issues.
31-
- 0.7.6: Bug fixes. New table formats (``psql``, ``jira``, ``moinmoin``, ``textile``).
32-
Wide character support. Printing from database cursors.
33-
Option to print row indices. Boolean columns. Ragged rows.
34-
Option to disable number parsing.
35-
- 0.7.5: Bug fixes. ``--float`` format option for the command line utility.
36-
- 0.7.4: Bug fixes. ``fancy_grid`` and ``html`` formats. Command line utility.
37-
- 0.7.3: Bug fixes. Python 3.4 support. Iterables of dicts. ``latex_booktabs`` format.
38-
- 0.7.2: Python 3.2 support.
39-
- 0.7.1: Bug fixes. ``tsv`` format. Column alignment can be disabled.
40-
- 0.7: ``latex`` tables. Printing lists of named tuples and NumPy
41-
record arrays. Fix printing date and time values. Python <= 2.6.4 is supported.
42-
- 0.6: ``mediawiki`` tables, bug fixes.
43-
- 0.5.1: Fix README.rst formatting. Optimize (performance similar to 0.4.4).
44-
- 0.5: ANSI color sequences. Printing dicts of iterables and Pandas' dataframes.
45-
- 0.4.4: Python 2.6 support.
46-
- 0.4.3: Bug fix, None as a missing value.
47-
- 0.4.2: Fix manifest file.
48-
- 0.4.1: Update license and documentation.
49-
- 0.4: Unicode support, Python3 support, ``rst`` tables.
50-
- 0.3: Initial PyPI release. Table formats: ``simple``, ``plain``,
51-
``grid``, ``pipe``, and ``orgtbl``.
1+
- 0.9.2: Future version.
2+
- 0.9.1: Add headers alignment with `headersglobalalign` and `headersalign`.
3+
Enhance column alignment: add `colglobalalign` and bug fix when `colalign` too long.
4+
Better warning when `colalign` or `headersalign` is a `string`.
5+
- 0.9.0: Drop support for Python 2.7, 3.5, 3.6.
6+
Migrate to pyproject.toml project layout (PEP 621).
7+
New output formats: `asciidoc`, various `*grid` and `*outline` formats.
8+
New output features: vertical row alignment, separating lines.
9+
New input format: list of dataclasses (Python 3.7 or later).
10+
Support infinite iterables as row indices.
11+
Improve column width options.
12+
Improve support for ANSI escape sequences and document the behavior.
13+
Various bug fixes.
14+
- 0.8.10: Python 3.10 support. Bug fixes. Column width parameter.
15+
- 0.8.9: Bug fix. Revert support of decimal separators.
16+
- 0.8.8: Python 3.9 support, 3.10 ready.
17+
New formats: ``unsafehtml``, ``latex_longtable``, ``fancy_outline``.
18+
Support lists of UserDicts as input.
19+
Support hyperlinks in terminal output.
20+
Improve testing on systems with proxies.
21+
Migrate to pytest.
22+
Various bug fixes and improvements.
23+
- 0.8.7: Bug fixes. New format: `pretty`. HTML escaping.
24+
- 0.8.6: Bug fixes. Stop supporting Python 3.3, 3.4.
25+
- 0.8.5: Fix broken Windows package. Minor documentation updates.
26+
- 0.8.4: Bug fixes.
27+
- 0.8.3: New formats: `github`. Custom column alignment. Bug fixes.
28+
- 0.8.2: Bug fixes.
29+
- 0.8.1: Multiline data in several output formats.
30+
New ``latex_raw`` format.
31+
Column-specific floating point formatting.
32+
Python 3.5 & 3.6 support. Drop support for Python 2.6, 3.2, 3.3 (should still work).
33+
- 0.7.7: Identical to 0.7.6, resolving some PyPI issues.
34+
- 0.7.6: Bug fixes. New table formats (``psql``, ``jira``, ``moinmoin``, ``textile``).
35+
Wide character support. Printing from database cursors.
36+
Option to print row indices. Boolean columns. Ragged rows.
37+
Option to disable number parsing.
38+
- 0.7.5: Bug fixes. ``--float`` format option for the command line utility.
39+
- 0.7.4: Bug fixes. ``fancy_grid`` and ``html`` formats. Command line utility.
40+
- 0.7.3: Bug fixes. Python 3.4 support. Iterables of dicts. ``latex_booktabs`` format.
41+
- 0.7.2: Python 3.2 support.
42+
- 0.7.1: Bug fixes. ``tsv`` format. Column alignment can be disabled.
43+
- 0.7: ``latex`` tables. Printing lists of named tuples and NumPy
44+
record arrays. Fix printing date and time values. Python <= 2.6.4 is supported.
45+
- 0.6: ``mediawiki`` tables, bug fixes.
46+
- 0.5.1: Fix README.rst formatting. Optimize (performance similar to 0.4.4).
47+
- 0.5: ANSI color sequences. Printing dicts of iterables and Pandas' dataframes.
48+
- 0.4.4: Python 2.6 support.
49+
- 0.4.3: Bug fix, None as a missing value.
50+
- 0.4.2: Fix manifest file.
51+
- 0.4.1: Update license and documentation.
52+
- 0.4: Unicode support, Python3 support, ``rst`` tables.
53+
- 0.3: Initial PyPI release. Table formats: ``simple``, ``plain``,
54+
``grid``, ``pipe``, and ``orgtbl``.

README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -666,18 +666,31 @@ Ver2 19.2
666666

667667
### Custom column alignment
668668

669-
`tabulate` allows a custom column alignment to override the above. The
670-
`colalign` argument can be a list or a tuple of `stralign` named
671-
arguments. Possible column alignments are: `right`, `center`, `left`,
672-
`decimal` (only for numbers), and `None` (to disable alignment).
673-
Omitting an alignment uses the default. For example:
669+
`tabulate` allows a custom column alignment to override the smart alignment described above.
670+
Use `colglobalalign` to define a global setting. Possible alignments are: `right`, `center`, `left`, `decimal` (only for numbers).
671+
Furthermore, you can define `colalign` for column-specific alignment as a list or a tuple. Possible values are `global` (keeps global setting), `right`, `center`, `left`, `decimal` (only for numbers), `None` (to disable alignment). Missing alignments are treated as `global`.
674672

675673
```pycon
676-
>>> print(tabulate([["one", "two"], ["three", "four"]], colalign=("right",))
677-
----- ----
678-
one two
679-
three four
680-
----- ----
674+
>>> print(tabulate([[1,2,3,4],[111,222,333,444]], colglobalalign='center', colalign = ('global','left','right')))
675+
--- --- --- ---
676+
1 2 3 4
677+
111 222 333 444
678+
--- --- --- ---
679+
```
680+
681+
### Custom header alignment
682+
683+
Headers' alignment can be defined separately from columns'. Like for columns, you can use:
684+
- `headersglobalalign` to define a header-specific global alignment setting. Possible values are `right`, `center`, `left`, `None` (to follow column alignment),
685+
- `headersalign` list or tuple to further specify header-wise alignment. Possible values are `global` (keeps global setting), `same` (follow column alignment), `right`, `center`, `left`, `None` (to disable alignment). Missing alignments are treated as `global`.
686+
687+
```pycon
688+
>>> print(tabulate([[1,2,3,4,5,6],[111,222,333,444,555,666]], colglobalalign = 'center', colalign = ('left',), headers = ['h','e','a','d','e','r'], headersglobalalign = 'right', headersalign = ('same','same','left','global','center')))
689+
690+
h e a d e r
691+
--- --- --- --- --- ---
692+
1 2 3 4 5 6
693+
111 222 333 444 555 666
681694
```
682695

683696
### Number formatting
@@ -1123,5 +1136,5 @@ Bart Broere, Vilhelm Prytz, Alexander Gažo, Hugo van Kemenade,
11231136
jamescooke, Matt Warner, Jérôme Provensal, Kevin Deldycke,
11241137
Kian-Meng Ang, Kevin Patterson, Shodhan Save, cleoold, KOLANICH,
11251138
Vijaya Krishna Kasula, Furcy Pin, Christian Fibich, Shaun Duncan,
1126-
Dimitri Papadopoulos.
1139+
Dimitri Papadopoulos, Élie Goudout.
11271140

0 commit comments

Comments
 (0)