Python中文
首页
教程
问答
标签
搜索
登录
注册
从pandas dataframe到\u Latex()的Latex表故障排除
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我无法在我的IPython笔记本中看到使用<code>dataframe.to_latex()</code>从pandas生成的Latex表。它在一个框中显示带有<code>"\begin.."</code>行的确切字符串。在</p> <p>我也很好奇为什么表是<code>{lrrrrr}</code>的格式,以及如何用分隔<code>{l|c|c|c|c}</code>这样的值的行来更改它的列。在</p> <p>我不太确定我的设置是否是问题所在,我想知道是否有进一步的文档可以使用<code>pandas.dataframe.to_latex()</code>格式化Latex呈现的表。我用IPython笔记本(0.132)和熊猫(0.13)。我在运行ubuntu13.04texlive2012。在</p> <p>IPython笔记本代码:</p> <pre class="lang-py prettyprint-override"><code>df = pd.DataFrame(np.random.random((5, 5))) print df.to_latex() </code></pre> <p>IPython笔记本输出即使在复制并作为markdown运行后,只会在文本周围添加一个框。在</p> ^{pr2}$ <p>我将非常感谢任何帮助,因为我对熊猫和它能做的奇妙的事情,它可以做的东西,与小熊套房!在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>你可以用sympy</p> <pre><code>import pandas as pd import numpy as np from sympy import * init_printing() df = pd.DataFrame(np.random.random((5, 5))) Matrix(df.as_matrix()) </code></pre>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何在乒乓球比赛中预测球的轨迹,对于AI球拍预测?
6 回答
如何在乒乓球游戏中阻止球
2 回答
如何在乘法和模中不乘空间?
6 回答
如何在乘法和除以2个不同的数字之间进行交换?
8 回答
如何在也是数据一部分的单个字符上拆分大字符串
4 回答
如何在乾草堆中找到針,有更好的解決方案嗎?
5 回答
如何在事件wxWidgets中传递自定义数据
3 回答
如何在事件中使用lambda i=i?
8 回答
如何在事件中心只接收最近的数据
5 回答
如何在事件发生之前保持云函数运行?
2 回答
如何在事件发生后使页面重定向到同一页面
10 回答
如何在事件回调之间保持python生成器的状态
4 回答
如何在事件处理程序(pythonsocket、sphinx)中保留docstring
7 回答
如何在事件处理程序中更改wxRichTextCtrl的光标位置?
5 回答
如何在事件处理程序中访问外部对象?
3 回答
如何在事件循环中将协程打包为正常函数?
7 回答
如何在事件循环之外运行协同程序?
6 回答
如何在事件循环结束时为并发未来的所有线程调用类方法?
6 回答
如何在事件文件中只保留一份摘要?
7 回答
如何在事件模板中添加事件
7 回答