Home > Blockchain >  How to prevent the loss of leading zeros when importing data via read_excel?
How to prevent the loss of leading zeros when importing data via read_excel?

Time:08-10

I have a problem with detection of the column types when importing data into R using the read_excel function of readxl package.

There are lot's of Q&As that are similar to my issue like enter image description here

code

df = pd.read_excel('data.xls',dtype={'a':str,'b':str})

output enter image description here

  • Related