python - Can I set variable column widths in pandas? -


i've got several columns long strings of text in pandas data frame, interested in examining 1 of them. there way use along lines of pd.set_option('max_colwidth', 60) single column only, rather expanding width of columns in df?

if want change display in jupyter notebook, can use style feature. use formatting columns indicate column(s) enlarge subset parameter. html , css.

### test data df = dataframe({'text': ['foo foo foo foo foo foo foo foo', 'bar bar bar bar bar'],                  'number': [1, 2]})  df.style.set_properties(subset=['text'], **{'width': '300px'}) 

enter image description here


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

delphi - Disable and change color of node in Treeview -

elasticsearch python client - work with many nodes - how to work with sniffer -