Interview Q&A / Data Science
Data Science interview questions
Statistics, pandas, cleaning data and exploratory analysis for analyst and data science roles.
Prefer rapid revision? Practise Data Science short interview answers →
- Why is apply slower than vectorised operations in pandas?
apply runs a Python function once per row or element, paying Python overhead each time. Vectorised operations such as column arithmetic or str methods run in compiled code on whole arrays, and are often tens of times faster.
IntermediateQuick answer1 min read