Combining datasets
How to join two datasets
Open the datasets in VisiData.
a.
vd d1.tsv d2.tsv
or
b. Presso
and enter a filepath for each file.- Press
S
to open up the Sheets Sheet. Through here, you can navigate to every sheet by pressingEnter
on the row it is referenced in. - Navigate to the sheets you want the join, and set their shared columns as key columns with
!
. - Press
S
to return to the Sheets sheet. Select the sheets you want to merge withs
. - Optional: If performing a left outer join, use
Shift+J
orShift+K
to reorder the sheets. The first sheet will be the one for whom all rows will be retained. Type
&
to open the join-chooser, and select your desired jointype withEnter
.
jointype | description |
---|---|
inner |
keeps only rows which match keys on all sheets |
outer |
keeps all rows from first selected sheet |
full |
keeps all rows from all sheets (union) |
diff |
keeps only rows NOT in all sheets |
extend |
keeps all rows and retain SheetType from first selected sheet |
merge |
Merges differences from other sheets into first sheet |
How to append two datasets
- Open the datasets with VisiData.
- Press
Shift+S
to open the Sheets sheet. - Use
s
ort
to select the sheets to merge. - Type
&
and pressEnter
onappend
to concatenate the selected datasets.