Interview Q&A · questions with model answers

pandas Interview Questions

Part of the study plan for: Machine Learning Engineer · Data Engineer

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. What is the difference between loc and iloc in pandas, and what is the SettingWithCopyWarning?

    loc selects by labels (index values and column names); iloc selects by integer positions. The SettingWithCopyWarning appears when you assign into something that might be a copy of a slice, so the…

  2. When would you use merge, join or concat in pandas?

    merge joins two DataFrames on columns like SQL (inner, left, right, outer); join is a convenience for joining on the index; concat stacks DataFrames vertically (more rows) or side by side (more…

Was this page helpful?

Report a mistake