Reputation: 778
I have a data frame with one column which contains long text descriptions.
I would like to display all the text without truncating it, but in a manner in which the column makes wider instead of making the row higher.
If I let pandas' default settings, I get next:
But if I try to remove truncate using pd.set_option('display.max_colwidth', -1)
, the row gets higher while row width mantains almost equal:
Upvotes: 11
Views: 15381
Reputation: 1907
Use the below setting to change only for 1 column.
df.style.set_properties(subset=['ad_description'], **{'width-min': '300px'})
Edits: @Haritz Laboa: Thanks for confirming that 'width-min' works and not 'width'.
Upvotes: 10