Interview questions

Frequently asked questions with concise model answers. Try answering aloud before expanding.

loc vs iloc? Easy

loc selects by labels (index names, column names, boolean arrays); iloc selects by integer positions.

How do you handle missing data? Medium

Inspect with isna().sum(), then drop (dropna), fill with a constant/mean/median/mode (fillna), forward-fill for time series, or impute with a model — choosing based on why data is missing.