The use case is that I have a very large CSV file which endless amount of columns of which many are empty. Instead of one by one selecting which columns to keep or delete, I’d like to delete all empty columns in one go.
Is this possible?
Secondly, I’d love conditional delete of columns in general terms. For example to delete any column which has a specific text string or combination of strings.
Perhaps this exists too? If not I’ll make a feature request of it. It would also tackle the first point in my questions.
This is a great question. We are able to use the flip tables step and filtering to remove blank columns. In this example, I created a dataset with blank columns spread throughout:
Finally, we flip the table back to its original orientation with another “Flip Tables” step. As long as your data has unique values in the first column, you should be done at this point.
If your data does include numbered values (duplicate cells in column 1 that are numbered with (1), (2), etc.), you can use an “Extract Text from Column” step to find all text before “(”, then remove the first column with a “Select Columns” step.
This approach would also work for conditionally deleting columns – instead of filtering to keep rows where the second column is not blank, you could filter to remove rows that contain a certain string.
Hope this helps! Let me know if you have any additional questions.
My pleasure – you’re certainly right about this being workaround!
Feel free to submit a request for this feature and our product team will be sure to consider the request. Hope this approach works for you in the meantime!