0

I have some columns on my DF where I had to add a 0 if my data is 4 digits, if 5 digits, not modify :

df['X']=df['X'].apply(lambda x: '{0:0>5}'.format(x))

When I export the CSV and open it in Excel, it drops me the 0 for my 4 digits,

I tried to convert my column to str before exporting but it doesnt change anything,

Any issue?

Thanks.

0 Answers0