擅长:python、mysql、java
<p>Astropy有一个很好的asciitables库,似乎可以解决这个问题。在</p>
<p><a href="http://docs.astropy.org/en/latest/io/ascii/index.html" rel="nofollow noreferrer">http://docs.astropy.org/en/latest/io/ascii/index.html</a></p>
<p>python tablate似乎也试图解决这个问题:</p>
<p><a href="https://bitbucket.org/astanin/python-tabulate" rel="nofollow noreferrer">https://bitbucket.org/astanin/python-tabulate</a></p>
<p>但据我所知,Pandas是默认的python表格数据库。看看你的桌子在一个Jupyter笔记本里有多漂亮!在</p>
<p><a href="https://i.stack.imgur.com/5iOFE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5iOFE.png" alt="enter image description here"/></a></p>
<p>要从列表中生成数据帧,只需在安装<code>pandas</code>的情况下执行以下操作:</p>
<pre><code>import pandas a pd
list1 = [a, b, c, a, b, c, a, b, c]
list2 = [day1, day2, day3]
list3 = [1, 2, 3, 4, 5, 6, 7, 8, 9]
df = pd.DataFrame({
"list1": list1,
"list2": list2,
"list3": list3,
})
</code></pre>