CsvHelper icon indicating copy to clipboard operation
CsvHelper copied to clipboard

Eliminate the columns if empty

Open sbandaru08 opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. Currently, when working with CSV files using CsvHelper, there isn't a built-in option to automatically eliminate or delete empty columns during the parsing process. This feature would be highly beneficial for users dealing with CSV files containing numerous columns, especially in scenarios where empty columns are not required for data processing or analysis. Describe the solution you'd like I would like to propose the addition of a configuration option or method within CsvHelper that allows users to specify whether empty columns should be eliminated during parsing. Example:

var config = new CsvConfiguration(CultureInfo.InvariantCulture)
{
    SkipEmptyColumns = true // or similar configuration option
};

With this enhancement, CsvHelper would intelligently skip or remove empty columns while parsing CSV files, streamlining the data processing workflow and improving overall efficiency.

I believe that implementing this feature would significantly benefit CsvHelper users, making it a more versatile and powerful tool for CSV data manipulation.

Describe alternatives you've considered

Additional context Add any other context or screenshots about the feature request here.

sbandaru08 avatar Mar 22 '24 05:03 sbandaru08

I don't understand. You only access the fields that you want to.

JoshClose avatar Mar 22 '24 22:03 JoshClose