What does astype() do in pandas?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Explain what pandas astype() does, what it returns, and how it behaves with invalid strings, missing values and lossy casts such as float to int. Tests practical knowledge of pandas dtypes and when a converter such as to_numeric is the better choice.