Closed
Description
input file is 6 random zip codes. the first one being "02494" with a column header called 'Zip'
test_file = pd.read_excel("test_zips.xlsx", header=0, dtype={'Zip':object})
print(test_file)
print("\n")
test_file = pd.read_excel("test_zips.xlsx", header=0, converters = {'Zip': str})
print(test_file)
output
Zip
0 2494
1 12010
2 97007
3 14224
4 80922
5 12205
Zip
0 2494
1 12010
2 97007
3 14224
4 80922
5 12205`
-- but using read_csv works fine
as you can see leading 0 is there.