Visidata: [wishlist diff] select rows with diffs from another sheet

Created on 22 Jan 2020  Â·  4Comments  Â·  Source: saulpw/visidata

Hi all,

I've been trying to find a way to :

  • Compare two CSV files
  • Export only the different rows or columns between those two CSV files in an outputted CSV file

(For the technical environment part, I’m using Debian 10)
If I’m right I should start by doing :

vd –diff xxx.csv yyy.csv

This will display me the differences between the files (if I understood the manual right).
Then from that I suppose that the easiest way would be to select the lines that are different between both files :

g | regex (regex which btw I don't know how to write)

I would then export those selected lines with :

“
Then to save as a new file :

Ctrl + S zzz.csv

So I'm sure that I'm missing a few things here and would be very thankful for anyone help.
Thank you all for your time reading this.

question

All 4 comments

Hi @jonathangrolleau, unfortunately the diff option is a hack that just adds a colorizer, and there's not really any way in stock VisiData to use that for selection or anything else. It's a good idea, though, and I'd love to see it implemented myself, probably as a plugin or app (vdiff). There's a lot we could do with it. If you know Python, it wouldn't be too hard to make a plugin that does what you want, and I'd be happy to help if you (or anyone) want to do the work.

BTW, I love seeing peoples' thought process around how they develop workflows, so thanks very much for the note!

Thank you for you answer Saul, do you know any other tool I could be using (and unfortunately I cannot use Python for this to my deepest regret) on linux ?

I'm sorry, I don't know what other tool you might use to diff csvs. If you come across one that works well, please post a link here.

@jonathangrolleau a tool you can use could be https://github.com/paulfitz/daff

Was this page helpful?
0 / 5 - 0 ratings

Related issues

baogorek picture baogorek  Â·  3Comments

aborruso picture aborruso  Â·  3Comments

aborruso picture aborruso  Â·  3Comments

suntzuisafterU picture suntzuisafterU  Â·  3Comments

aborruso picture aborruso  Â·  3Comments