Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miller: paragrafo join #16

Open
aborruso opened this issue Nov 28, 2021 · 1 comment
Open

Miller: paragrafo join #16

aborruso opened this issue Nov 28, 2021 · 1 comment
Assignees

Comments

@aborruso
Copy link
Owner

Appunti

cat person.csv

id_p,gender
456,F
789,F
123,M

cat weight.csv

id_w,weight
123,200
999,160
789,155

left_join

mlr --c2p --barred join --ul -j id_p -l id_p -r id_w -f person.csv then unsparsify weight.csv
+------+--------+--------+
| id_p | gender | weight |
+------+--------+--------+
| 123  | M      | 200    |
| 789  | F      | 155    |
| 456  | F      | -      |
+------+--------+--------+

right_join

mlr --c2p --barred join --ur -j id_w -l id_p -r id_w -f person.csv then unsparsify weight.csv
+------+--------+--------+
| id_w | gender | weight |
+------+--------+--------+
| 123  | M      | 200    |
| 999  | -      | 160    |
| 789  | F      | 155    |
+------+--------+--------+

full_join

mlr --c2p --barred join --ul --ur -j id_p -l id_p -r id_w -f person.csv then unsparsify weight.csv
+------+--------+--------+------+
| id_p | gender | weight | id_w |
+------+--------+--------+------+
| 123  | M      | 200    | -    |
| -    | -      | 160    | 999  |
| 789  | F      | 155    | -    |
| 456  | F      | -      | -    |
+------+--------+--------+------+

semi_join

The first output table of

mlr --c2p --barred join --ul -j id_p -l id_p -r id_w -f person.csv weight.csv
+------+--------+--------+
| id_p | gender | weight |
+------+--------+--------+
| 123  | M      | 200    |
| 789  | F      | 155    |
+------+--------+--------+

+------+--------+
| id_p | gender |
+------+--------+
| 456  | F      |
+------+--------+

anti_join

mlr --c2p --barred join --np --ul -j id_p -l id_p -r id_w -f person.csv then unsparsify weight.csv
+------+--------+
| id_p | gender |
+------+--------+
| 456  | F      |
+------+--------+
@aborruso aborruso self-assigned this Dec 9, 2021
@aborruso
Copy link
Owner Author

Accoppiare con questo tipo di immagine

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant