我想在ipython笔记本的降价单元格中创建一个表:
| $X_{t-1}$ | $X_{t}$ | $\textbf{P} (X_{t}| X_{t-1}) $| | ------------- |-------------| ----------------------------------| | $\textit{False}$ | $\textit{False}$ | 0.7 | | $\textit{False}$ | $\textit{True}$ | 0.3 | | $\textit{True}$ | $\textit{False}$ | 0.3 | | $\textit{True}$ | $\textit{True}$ | 0.7 |
然而,表格的标题分为两行。结果是这样的。
我尝试使用以下命令更改对齐方式,但没有任何结果:
:--- or --- = left align ---: = right align :---: = centered
我怎样才能避免呢?
我不知道正确的方法,但这里有一个快速修复方法。在标题开头添加选项卡
| $X_{t-1}$ | $X_{t}$ | $\textbf{P} (X_{t}| X_{t-1}) $ | | ------------- |-------------------| --------------------------------------------| | $\textit{False}$ | $\textit{False}$ | 0.7 | | $\textit{False}$ | $\textit{True}$ | 0.3 | | $\textit{True}$ | $\textit{False}$ | 0.3 | | $\textit{True}$ | $\textit{True}$ | 0.7 |