What is the difference between .values and .to_numpy() in pandas?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how the pandas .values attribute and the .to_numpy() method differ when pulling the data out of a Series or DataFrame. Tests knowledge of extension dtypes such as nullable integers and categoricals, explicit dtype and missing-value control, and copy behavior.