Thanks to visit codestin.com
Credit goes to github.com

Skip to content

header names for new columns created with 'summary' #254

@MostafaYA

Description

@MostafaYA

Prerequisites

  • make sure you're are using the latest version by csvtk version
  • read the usage

Describe your issue

  • describe the problem
  • provide a reproducible example

Hi, may you consider changing ":" with "_" for the auto generated column headers after running some commands like summary because I thinks it conflicts with other commands when piping the output and I have to correct this with rename .

here is an example

cat test
f1,f2,f3,f4,f5
foo,bar,xyz,1,0
foo,bar2,xyz,1.5,-1
foo,bar2,xyz,3,2
foo,bar,xyz,5,3
foo,bar2,xyz,N/A,4
bar,xyz,abc,NA,2
bar,xyz,abc2,1,-1
bar,xyz,abc,2,0
bar,xyz,abc,1,5
bar,xyz,abc,3,100
bar,xyz2,abc3,2,3
cat test | csvtk summary -g f1,f2  -f f5:median | csvtk sort -k "f5:median":nr
[ERRO] invalid sort type: median}

This however works

cat test | csvtk summary -g f1,f2  -f f5:median | csvtk sort -k 3:nr
  • may be you can allow users to choose the header name they want

Thank you

I'm grateful to users who have greatly helped to report bugs and suggested new features.

I may respond to issues or fix bugs quickly, but I usually implement new features periodically (two or more weeks).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions