+ - 0:00:00
Notes for current slide
Notes for next slide

Data Wrangling 2

Bora Jin

1 / 11

Today's Goal

  • Combine data from different sources using a well-chosen join function in the format something_join(x, y):

    • left_join(): return all rows from x for all columns in x and y
    • right_join(): return all rows from y for all columns in x and y
    • full_join(): return all rows from both x and y for all columns in x and y
    • inner_join(): return all rows from x where there are matching values in y, returning all combination of multiple matches in the case of multiple matches for all columns in x and y
    • semi_join(): return all rows from x where there are matching values in y, keeping just columns from x
    • anti_join(): return all rows from x where there are not matching values in y, keeping just columns from x
3 / 11

Quiz

Q - Which join function might you use when you want to expand x by appending all variables in y for all the rows in x?

4 / 11

Quiz

Q - Which join function might you use when you want to expand x by appending all variables in y for all the rows in x?

4 / 11

Quiz

Q - Which join function might you use when you want a dataset with all the rows and the columns in x and y?

5 / 11

Quiz

Q - Which join function might you use when you want a dataset with all the rows and the columns in x and y?

5 / 11

Quiz

Q - Which join function might you use when you want rows in x that are not in y?

6 / 11

Quiz

Q - Which join function might you use when you want rows in x that are not in y?

6 / 11

Quiz

Q - Which join function might you use when you want a dataset with all the columns from x and y and only the rows existing in both data frames?

7 / 11

Quiz

Q - Which join function might you use when you want a dataset with all the columns from x and y and only the rows existing in both data frames?

7 / 11

Quiz

Q - Which join function might you use when you want rows in x that exist also in y?

8 / 11

Quiz

Q - Which join function might you use when you want rows in x that exist also in y?

8 / 11

Questions?

9 / 11

Let's Practice Together!

Go to AE 06: Data Wrangling 2

10 / 11

Bulletin

  • Watch videos for Prepare: May 20

  • Submit your ae06

  • Lab 02 due Friday, May 20 at 11:59pm

  • HW 01 due Tuesday, May 24 at 11:59pm

11 / 11
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow