Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pandas excel import truncating long string

I have an excel file with the below cell content

\\pathxx01\xxx project\71 XXXX XXXXXXX Team\Landlord Billing/

However, when importing the excel into a pandas dataframe with pd.read_excel method, the string is truncated to

\\pathxx01\xxx project\71 XXXX XXXXXXX Team\Lan...

Is there any way to avoid this truncation and keep the original string?

like image 598
banana_99 Avatar asked Oct 14 '25 08:10

banana_99


1 Answers

As determined from the comments, it's not actually being truncated. Pandas is just displaying it truncated because there is little screenspace where you're displaying it.

You can use this to force Pandas to display the full columns without truncating them:

pd.set_option('display.max_colwidth', None)