Log In
▼
Sign Up
Ask AI Tutor
Portal
Mock Tests
Data Science & Analytics
Python Data Science, Pandas & Predictive Modelling
25:00 Test Timer
Submit Quiz
Question 1 of 5
Flag for Review
In Pandas, what is the most memory-efficient and fastest way to compute a new column from two existing columns?
A
Use a Python for-loop with df.iterrows()
B
Use vectorized operations: df['c'] = df['a'] + df['b']
C
Use df.apply(lambda row: row['a'] + row['b'], axis=1)
D
Convert each row to a string and use regex
Peek Concept & Rationale
← Previous
Next Question →
Question Palette
1
2
3
4
5
Answered (0)
Unanswered (5)
Flagged (0)