🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: groupby and merge: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Students has 8 rows; a left merge with offers gives 9 rows. What is the most likely reason?
  2. Q2. Which join keeps only rows whose key exists in BOTH tables?
  3. Q3. How do you find students with no offer after a left merge?
  4. Q4. What does pivottable(index="company", columns="branch", aggfunc="count") show?
  5. Q5. Why keep each student's best offer before computing placement rates?
  6. Q6. What does this print? (code)
  7. Q7. What does this print? (code)
  8. Q8. Which join keeps every row from both tables, filling gaps with NaN?
  9. Q9. An offer has roll 109, but no student with roll 109 exists. What should the analyst do?
  10. Q10. What does named aggregation such as agg(avgcgpa=("cgpa", "mean")) give you?