Skip to content

Support whitelisting header names when preprocessing a CSV #57

@BBertram-hex

Description

@BBertram-hex

Until now CSV Columns can only be discarded, e.g. using

    CSV:
      preprocessing:
        - ExtractHeaders
        - DeleteColumnByName: "Header to be ignored"

Make it easier to write a rule that matches only a small subset of the columns in a CSV with many columns.
Like:

  - name: "Rule, whitelisting columns starting with 'Center' or 'Pos'"
    pattern_include:
      - "**/*.csv"
    CSV:
      preprocessing:
        - ExtractHeaders
        - KeepColumnsByName:
            - "Center*"
            - "Pos*"

The globbing would be nice, because headers are named similarly for quantities that are to be tested with the same error bounds, like:
Pos* matches "Pos.y", "Position x", "Position x [mm]", "Position x [cm]"

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions