What does the pandas assign() method do and why is it useful in method chaining?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks what the pandas DataFrame assign() method does and why it suits method chaining. Tests what the method returns, how callable values see the intermediate result of a chain, and the pitfalls around index alignment and lambdas.