I'm trying to read csv format file line-by-line like below to convert origin file to target file.
csvReader().open("test.csv") {
readNext()
}
While reaidng csv file, I want to create txt file with tsv format like below.
id title price_pc shipping rental_info
uniqueID producttitle 1434000 0 23900^60
I've previously used Kotlin DataFrame
which can solve your problem. You can find more information here
This is a sample code for you need:
fun main() {
DataFrame.read("test.csv").writeCSV("test.tsv", CSVFormat.TDF)
}