Instead of integers I'm getting floats that end with decimals .999 or .001.
I'm trying to read an Excel .xlsx file containing product data into a Pandas Dataframe with read_excel. Normally the EAN (UPC) codes work like they should, but now for some reason they show up as a float instead of integers.
I've checked the file with Excel and Numbers, all the EANs there are integers and using Increase Decimal shows .000 for every single one.
If I specify dtype as int for the read_excel, it cuts the decimals and everything with .001 shows correctly, but the ones with .999 don't. If I don't use dtype it shows the column as float64
round seems to work, but I wouldn't want to use it, as this problem shouldn't exist in the first place.
For example:
| index | EAN | product |
|---|---|---|
| 18492 | 615357122276.9999 | Taylors Pure Assam musta tee 20ps |
| 18493 | 615357122252.9999 | Taylors hauduke 20pss lemon ginger |
| 18494 | 615357119764.9999 | Taylors green jasmine leaf tea 125g |
| 18495 | 615357119703.0001 | Taylors musta irtotee 125g English Break |