← 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])))
- A.3
- B.2
- C.1
- 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 →