Interview Q&A / Data Science

INTERVIEW Q&A · 56 QUESTIONS

Data Science interview questions

Statistics, pandas, cleaning data and exploratory analysis for analyst and data science roles.

  1. What is the difference between agg and transform in a pandas groupby?

    agg returns one row per group, shrinking the data. transform returns a result with the same length as the original, repeating each group value on every row, so you can add it as a column and do row-level calculations like shares.

    IntermediateQuick answer1 min read