Skip to content

Converter int is truncating floats #554

@zeycus

Description

@zeycus

Excel stores numbers as float, even numbers we enter as integers. Using the converter numbers=int truncates those floats to integers, without rounding them first. The result is that if in the cell you enter a 252, you may get a 251 when you read in python using numbers=int. That happens when the internal representation of 252 is, say, 251.999999999999423579.

I think just rounding before applying int would solve this issue nicely.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions