import great_tables.this| The Zen of Great Tables | ||||
by the Great Tables crew, after Tim Peters's import this |
||||
| Aphorism | Embodied by | Faithful to PEP 20 | ||
|---|---|---|---|---|
| I | Beautiful is better than printed at the console. Beautiful is better than ugly. |
opt_stylize() | 69% | |
| II | A data table is input. A display table is output. Explicit is better than implicit. |
gtsave() | 22% | |
| III | Simple is better than complex. Simple is better than complex. |
cols_hide() | 100% | |
| IV | Complex is better than copying it into Excel. Complex is better than complicated. |
tab_style() | 75% | |
| V | Flat is better than nested, unless it's under a spanner. Flat is better than nested. |
tab_spanner() | 65% | |
| VI | Sparse is better than dense, but a nanoplot can be both. Sparse is better than dense. |
fmt_nanoplot() | 67% | |
| VII | Readability counts, in every locale from af to zu.Readability counts. |
fmt_number() | 55% | |
| VIII | Special cases aren't special enough to break the six components. Special cases aren't special enough to break the rules. |
tab_stub() | 87% | |
| IX | Although opt_css() beats purity, provided you have those CSS skillz.Although practicality beats purity. |
opt_css() | 50% | |
| X | Missing values should never pass silently. Errors should never pass silently. |
data_color() | 79% | |
| XI | Unless explicitly sub_missing().Unless explicitly silenced. |
sub_missing() | 75% | |
| XII | In the face of ambiguity, label your columns. In the face of ambiguity, refuse the temptation to guess. |
cols_label() | 59% | |
| XIII | There should be one (and preferably only one) obvious way to make a table. There should be one-- and preferably only one --obvious way to do it. |
GT() | 87% | |
| XIV | Although that way may not be obvious at first unless you're Rich. Although that way may not be obvious at first unless you're Dutch. |
md() | 96% | |
| XV | Now is better than never. Now is better than never. |
fmt_datetime() | 100% | |
| XVI | Although the 1949 Census Manual is often better than right now. Although never is often better than *right* now. |
fmt_roman() | 77% | |
| XVII | If the table is hard to explain, add a footnote. If the implementation is hard to explain, it's a bad idea. |
tab_footnote()1 | 66% | |
| XVIII | If the table is easy to explain, it may be a great table. If the implementation is easy to explain, it may be a good idea. |
tab_header() | 76% | |
| XIX | Bringing your own DataFrame is one honking great idea: let's do more of those! Namespaces are one honking great idea -- let's do more of those! |
GT(your_df) | 73% | |
| XX | Left for Rich Iannone to write. |
|||
| Faithfulness is difflib's similarity ratio between each aphorism and its PEP 20 original. | ||||
| Originals: PEP 20, The Zen of Python. Remix: the Great Tables docs and blog. | ||||
| 1 See? | ||||