Skip to content

Add support for column specs when reading data #340

@holgerbrandl

Description

@holgerbrandl

Very often column type guessing does not work as intended by the user. Thus it would be helpful to support an optional column spec. This is very common in other tabular apis, see e.g. col_types argument in https://readr.tidyverse.org/reference/read_delim.html#arguments

Note: krangl supported this for all readers previously in a very similar manner:

DataFrame.readExcel(
                excelFile.absolutePath,
                sheet = "Equipment",
                colTypes = CompactColumnSpec("sis??bbsds")
            )

See https://github.com/holgerbrandl/krangl/blob/master/src/main/kotlin/krangl/TableIO.kt#L226

It would be great if kdf could be extended similarly to support a wider set of input formats directly without manual correction (as suggested in https://kotlin.github.io/dataframe/read.html#reading-excel).

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchThis requires a deeper dive to gather a better understanding

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions