I've split a column using a regex. Some cells in a newly created column are OK, other ones have an exclamation mark ! in it. When I press e to edit those ! cells, the change is not reflected in that cell.
This is probably something obvious. How to resolve this problem ?
Hi @zaiste! This is a common problem for me too. The issue is not the exclamation mark, but trying to edit a derived column. Derived columns are immutable, because they are actually recalculated from the source column at every turn. So if you edited the source column, you would see the change reflected in the split column.
If you don't want to (or can't) edit the source column, you can 'freeze' the derived (split) column with ' (tick). Then you should be able to edit the frozen column and hide the original derived column.
Thank you for this explanation! I'm slowly starting to understand the whole picture. I'll play with those suggestions.
My problem is that I'm trying to 芦 clean 禄 some cells in a context of a particular column. In my specific example, it is about removing some text which is not present in each cell (thus ! marks).
Is there maybe a more idiomatic approach in VisiData for such manipulation. I'm probably doing something stupid here...
PS. I've recently discovered VisiData and it became one of my favorite tools of 2018. Thanks for creating it!
Thanks @zaiste! It sounds like you want to do a bulk regex substitution in the column. You can use *a/b to create a new column from the current column with all a replaced with b (where a is a regex, and b can be nothing if you want to delete a--in this case you can omit the /), and then hide the original column. Or, if you want to do the substitution in place, use g* similarly. g* is also particularly useful if you want to do the substitution only in the selected rows.
@saulpw that works perfectly! Thanks
Most helpful comment
Hi @zaiste! This is a common problem for me too. The issue is not the exclamation mark, but trying to edit a derived column. Derived columns are immutable, because they are actually recalculated from the source column at every turn. So if you edited the source column, you would see the change reflected in the split column.
If you don't want to (or can't) edit the source column, you can 'freeze' the derived (split) column with
'(tick). Then you should be able to edit the frozen column and hide the original derived column.