-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi! As an idea: val content = buildString {
appendLine("NAME,$name")
appendLine("TOTAL,${df.count()}")
append(df.toCsvStr())
}
File("output").writeText(content) |
Beta Was this translation helpful? Give feedback.
-
|
@koperagen's solution will produce what you expect indeed :) However, I do need to mention that putting data like that in the header does not produce valid CSV. It will be difficult to read it with another program unless it has a However, there is the possibility to specify |
Beta Was this translation helpful? Give feedback.

Hi! As an idea: