1

I have a csv file that I want to edit manually on my Mac. I work with data digitization from PDFs, and sometimes rare errors occur that I just want to fix manually.

For the sake of reproducibility, I want to edit the csv file recording every change in a log file. For example, I change the entry "Callfornia" to "California" for a certain observation, and the log file records:

Line 5, Column "address", change "Callfornia" to "California"

I know I can write a script (eg, in Python) that will make the changes I want, and this will be reproducible. However, in my workflow, it would be easier to have a WYSIWYG editor that also keeps track of what is going on.

3

Try using version-control software, such as Git. You can then edit the file however you want, such as with your favorite text editor, and you'll be able to look at previous versions and the differences between versions.

2
  • Agreed, it is common practice to track CSV versions with git. – asuka Apr 27 at 5:25
  • Great idea, I even found a diff tool that specifically creates the log in the format I want, pypi.org/project/csv-diff – roussanoff Apr 27 at 9:04
1

Recently I came across "Dolt - It's git for data". Maybe it's worth a look.

It's not CSV based (but similar to mySQL), and not WYSIWYG.

Dolt does not track schema changes, however (= columns added, removed, renamed...)

But it does track the data changes you describe, and enables you to do diffs, snapshots, rollbacks, time-travel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.