BdR76 / CSVLint

CSV Lint plug-in for Notepad++ for syntax highlighting, csv validation, automatic column and datatype detecting, fixed width datasets, change datetime format, decimal separator, sort data, count unique values, convert to xml, json, sql etc. A plugin for data cleaning and working with messy data files.
GNU General Public License v3.0
151 stars 8 forks source link

Remove a column #54

Closed amooefel closed 1 year ago

amooefel commented 1 year ago

Once the format of the file has been detected, you can add / split / search & replace by column, but I couldn't find an option to remove the column. For columns with varying length text, or columns at the end of the lines, they don't line up well to use Notepad's Column Mode selection tool. The Reformat --> Align Vertically, then a column select and delete is helpful for this, but it would be cleaner to have a simple option of just removing the column.

Thanks for a helpful tool!

BdR76 commented 1 year ago

Thanks for posting the issue. CSV Lint is meant for quickly finding and fixing (relatively) small issues with CSV files, and not meant as an ETL tool. So for structural changes (add/remove/reorder columns) generally you're better off using a spreadsheet or Python script.

However, the "Add column" dialog already has a remove column checkbox, so I could add an radio option "Add column: do not add column" although that doesn't sound very intuitive. I'll see what I can do in the next version.

BdR76 commented 1 year ago

I've just updated the New Column dialog so that you can right-click the radio buttons to deselect them. See commit https://github.com/BdR76/CSVLint/commit/a0fd0fc84be4c98e48b51042936e05264cf7a41f

You can now remove a column by checking the Remove original column checkbox and then deselecting the edit/split radio options. So it'll be a bit of a hidden feature, but I think it's better than adding a radio button with the label "Do not add column / Do nothing". It will be available in the next version, and you can download the beta DLL here to try it out.

BdR76 commented 1 year ago

The latest release v0.4.6.3 also includes this fix, and see the documentation here, it will be automatically available in the next update of Notepad++