python 3.x - Displaying Pandas Series with Asian text in index -


if index of pandas series in 1 of asian languages , has variable lengths, print-out not aligned correctly.

import pandas pd ipython.display import display  df = pd.series( range(2), index = [ 'ミートボールスパゲッティ', 'ご飯' ] ) display(df) print(df) df 

output

note happens series, dataframe display can display content nicely.

how can fix output here?

convert series dataframe display. currently, series have no to_html() method. therefore, cannot displayed in format directly.

import pandas pd ipython.display import display  df = pd.series( range(2), index = [ 'ミートボールスパゲッティ', 'ご飯' ] ) df.to_frame() 

enter image description here


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -