I would have assumed that `Dataframe.readDelimStr(...
# datascience
d
I would have assumed that
Dataframe.readDelimStr()
would be able to read space delimited or tab delimited formats (like lots of cli outputs use...), but it seems that it's stuck on CSV and doesn't even have an option to provide a delimiter...
In the end I used:
Copy code
val spaceRegex = "\\s\\s+".toRegex()
fun String.spaceDelimToDataFrame() = split("\n").map { it.split(spaceRegex) }.toDataFrame()
👍 1
But it's really funny naming... it seems like the readCSVs support delimiters, whereas the readDelimStr doesn't, and readCSV doesn't have a str version..
r
There's also
readTSV
function which actually I think does the trick
n
Totally an oversight, here goes fix https://github.com/Kotlin/dataframe/pull/743
👍🏼 1
👍 1