Skip to content

Promote mixed int/float columns to float #192

@nilshg

Description

@nilshg

In Excel files which have decimal and round numbers in them, the round numbers are often displayed as integers unless the user deliberately adds decimal places.

When these columns are read in, currently this results in the column ending up as Any, even when using infer_eltypes = true.

In my opinion, there are three ways of dealing with this:

  • Promoting to float - I think this is preferrable, and likely what the user wants 99% of the time
  • Returning a Union{Int, Float64} column - preserves the type in case integers were intentionally stored as such in Excel
  • Returning a Real column - probably not ideal given the non-concrete type

Any of them is probably better than returning Any.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions