8000 Allow cut on non-existent columns · Issue #156 · shenwei356/csvtk · GitHub
[go: up one dir, main page]

Skip to content
Allow cut on non-existent columns #156
@tseemann

Description

@tseemann
% csvtk version
csvtk v0.23.

% cat foo.csv
A,B
1,2
3,4

% csvtk cut -f A,C foo.csv

# THIS HAPPENS
[ERRO] column "C" not existed in file: a.csv

# DESIRED OPTION 1
% csvtk cut --allow-missing-col -f A,C foo.csv
A
1
3

# DESIRED OPTION 2
% csvtk cut --blank-missing-col  -f A,C foo.csv
A,C
1,
3,

This would be usefulf or cleaning large datatsets that I need to merge or get partial versions from different sources.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0