Can you explain the SettingWithCopyWarning: why it happens, what it indicates, and how to avoid it?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks why pandas raises SettingWithCopyWarning, what it says about the code that triggered it, and how to avoid it. Tests understanding of chained indexing, views versus copies, and how to write a filtered assignment safely in current pandas versions.