🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Project and Interview: all 10 questions

Quiz: Project and Interview · Question 8 of 10

What does this print? (code)

What does this print?

import pandas as pd
a = pd.DataFrame({"roll": [1, 2]})
b = pd.DataFrame({"roll": [3]})
print(len(pd.concat([a, b])))
  1. A.3
  2. B.2
  3. C.1
  4. D.6
Answer & explanation

Correct answer: 3

concat stacks the tables; merge would join them on a key.

Can you get the rest right without peeking?

Take the timed Quiz: Project and Interview quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →