-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Description
$ <<. cat >old.csv
color,count
red,3467
orange,670
yellow,27
blue,6944
.
$ <<. cat >new.csv
color,count
red,3472
blue,6838
orange,694
purple,12
.
$ # with --lp, --rp
<new.csv mlr --c2p \
join -f old.csv --ul --ur -j color --lp=old_ --rp=new_ \
+ unsparsify
color old_count new_count count
red 3467 3472 -
blue 6944 6838 -
orange 670 694 -
purple - - 12
yellow - - 27
$ # vs with `rename` on both files
<new.csv mlr --c2p \
rename count,new_count \
+ join -f <(mlr -c rename count,old_count old.csv) --ul --ur -j color \
+ unsparsify
color old_count new_count
red 3467 3472
blue 6944 6838
orange 670 694
purple - 12
yellow 27 -
(The example is based on https://miller.readthedocs.io/en/latest/misc-examples/#showing-differences-between-successive-queries)
aborruso
Metadata
Metadata
Assignees
Labels
No labels