5 ms·
NAME swizel - takes csv input, selects columns and arbitrarily selects output order OPTIONS change the field delimiter (default comma) handle trimming
by jhiant 4y ago
NAME
swizel - takes csv input, selects columns and arbitrarily selects output order
OPTIONS
change the field delimiter (default comma)
handle trimming whitespace per field (or an arbitrary set of chars, e.g. quotes)
ignore or transform a prefixed one-line header or comment (default #)
[bonus points] handle numeric fields (e.g. precision or float/int conversion)
OBLIGATORY
while all of this can already be done with a combination of cut, sed, tr and/or awk, it's a common task when working with columnar data and could be made more intuitive and less error prone. transforming columnar data mostly boils down to clean up and basic sanity checks. good karma on this one.
- e12e 4y agoReading this, I'd like a neural net trained on man pages as input, with C code as output :D
- hiq 4y agoHave you tried https://github.com/BurntSushi/xsv https://github.com/BurntSushi/xsv?
- nicoburns 4y agohttps://github.com/BurntSushi/xsv https://github.com/BurntSushi/xsv Can do at least some of these
- soheilpro 4y agohttps://csvkit.readthedocs.io https://csvkit.readthedocs.io