Multiple Choices: Joining Data Frames

  1. Which of the following dplyr functions keeps only the rows that have matching values in both tables?
  1. What does left_join return when used on two data frames?
  1. Which function includes all rows from both tables, with NA values in place where there are no matches?
  1. If right_join is applied to two tables, what will the result include?
  1. Which of the following commands can help avoid NA values when joining data with only common records between two data frames?
  1. What argument should you use in dplyr joins to specify which columns to join by, if the column names differ between two tables?
  1. Which dplyr join function would be best suited for combining a table of employees with another table of department names, ensuring that every employee appears, even if they don’t have a department?
  1. What is the outcome if full_join is used on two data frames with no matching keys?
  1. When using inner_join, what happens to rows in either data frame that do not have matching keys in the other data frame?

  1. In a left_join, which table’s rows are guaranteed to appear in the result regardless of matches in the other table?