Repository navigation
Answered by
koperagen
Nov 3, 2025
Replies: 2 comments
|
Hi! As an idea: val content = buildString {
appendLine("NAME,$name")
appendLine("TOTAL,${df.count()}")
append(df.toCsvStr())
}
File("output").writeText(content) |
0 replies
Answer selected by
hantsy
|
@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 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Hi! As an idea: