I stumbled over ``` DataFrame.readDelim( ...
# datascience
h
I stumbled over
Copy code
DataFrame.readDelim(
        SleepPattern::class.java.getResourceAsStream("/data/iris.txt")!!,
        csvType = CSVType.TDF,
        delimiter = '\t'
    )
Without the seemingly redundant
delimiter
argument, it wont read the file correctly (but still reading with
,
as delimiter) . I know there is also
readTsv
but
readDelim
is sometimes handy as well. Is this a bug?
n
Kind of bug, yes. Looks like in this overload
delimeter
overrides
csvType
. For another,
csvType
will work:
Copy code
public fun DataFrame.Companion.readDelim(
    reader: Reader,
    format: CSVFormat = CSVFormat.DEFAULT.withHeader(),
    colTypes: Map<String, ColType> = mapOf(),
    skipLines: Int = 0,
    readLines: Int? = null,
    parserOptions: ParserOptions? = null,
): AnyFrame
I wouldn't say it's intended, should be fixed