DEV Community

Discussion on: How to preserve the data types when writing pandas DataFrame to Excel?

Collapse
 
ranggakd profile image
Retiago Drago

Some people on Telegram said the right approach is to pass either dtype or converters on pandas.read_excel(). It worked but in the end, it cannot 100% preserve the values.

Like this example:

Reading the data from query (initial)

RKAT ITS

Reading the same data from excel file (saved version)

RKAT _x0013_ ITS