Replies: 2 comments 3 replies
-
I don't know of a way to generate a header row like that. You can use The closest thing I can think of is doing it with a custom command in your import string
from visidata import BaseSheet
@BaseSheet.api
def addDefaultHeader(sheet):
sheet.options.header = 0
sheet.reload()
sheet.vd.sync()
sheet.updateColNames(string.ascii_lowercase.split(), sheet.visibleCols)
BaseSheet.addCommand(
"",
"add-default-header",
"sheet.addDefaultHeader()",
"add a default header row",
) Which would let you run a |
Beta Was this translation helpful? Give feedback.
-
You could do |
Beta Was this translation helpful? Give feedback.
-
I have plenty of CSVs without a header line, e.g.:
For the moment I generate headers before I look at the file in vd:
and then I have in
vd
:but is there an easy way/command line option to tell
vd
to generate some default headers?Beta Was this translation helpful? Give feedback.
All reactions