How to align the pandas series in ipython notebook?

129 views Asked by At

I'm using ipython notebook (3.1.0, Python 2.7.9 |Anaconda 2.2.0 (32-bit)) on firefox for python learning.

One annoying thing is that when I print pandas.series or pandas.dataframe.info, the result in the IPython notebook can't aligned well. as the image "poor" shows. But when I copy the result to the txt editor, it seems to aligned well. So how can I adjust these align in ipython notebook?

Is this something about the custom css of the ipython notebook? Or something about pandas? sorry I can't post images the poor alignment in my ipython notebook seems like:

<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)

update: poor alignment of df.info :https://www.dropbox.com/s/4aec81dlrwppbwv/df_info.png?dl=0

poor alignment of pandas.series :https://www.dropbox.com/s/2povchsip1mbd31/movielist.png?dl=0

0

There are 0 answers