NNsr
NNsr

Reputation: 1063

Left align the whole table in Markdown (Jupyter)

I am trying to left-align the whole table in Markdown (render in JupyterLab). Here is my table:

 |      | 0     | 1     |
 |---   |---    |---    |
 | 0    | 2     | 3     |
 | 1    | 4     | 5     |

Any suggestions? I tried solutions suggested in similar posts such as here; none of them worked. If it helps at all, this table is a pandas DataFrame display.

Upvotes: 2

Views: 2057

Answers (1)

cs95
cs95

Reputation: 402783

The column justification can be specified using the colon : along with the line separator.

For example,

|      | Column A | Column B |
|:-----|:---------|:---------|
| 0    | 2        | 3        |
| 1    | 4        | 5        | 

Produces,

enter image description here

Upvotes: 3

Related Questions