如何在ipython笔记本中对齐熊猫系列?

时间:2015-06-12 02:13:32

标签: css pandas ipython-notebook

我在firefox上使用ipython notebook(3.1.0,Python 2.7.9 | Anaconda 2.2.0(32位))进行python学习。

令人讨厌的是,当我打印pandas.seriespandas.dataframe.info时,IPython笔记本中的结果无法很好地对齐。正如图像“穷人”所示。但是当我将结果复制到txt编辑器时,它似乎很好地对齐。那么如何在ipython笔记本中调整这些对齐?

这是关于ipython笔记本的自定义css吗?或者关于熊猫的事情? 对不起,我无法发布图像,我的ipython笔记本中的不良对齐似乎是:

<class 'pandas.core.frame.DataFrame'>
Int64Index: 891 entries, 0 to 890
Data columns (total 12 columns):
passengerid    891 non-null int64
survived      891 non-null int64
pclass       891 non-null int64
sex       891 non-null object
age        891 non-null float64
sibsp       891 non-null int64
parch        891 non-null int64
fare          891 non-null float64
embarked      889 non-null object
full name     891 non-null object
salutation    891 non-null object
age_group      891 non-null category
dtypes: category(1), float64(2), int64(5), object(4)

更新: df.info:https://www.dropbox.com/s/4aec81dlrwppbwv/df_info.png?dl=0

的对齐不良

pandas.series的排列不良:https://www.dropbox.com/s/2povchsip1mbd31/movielist.png?dl=0

0 个答案:

没有答案
相关问题