Explain Shell Script Line-by-Line for Data Science Workflows
Capital OneData Scientist · Technical ScreenLast updated
This question evaluates familiarity with shell scripting for reproducible data-science workflows, Python object-oriented design including transformer patterns (fit/transform separation), outlier detection and imputation strategies, code-style critique, and unit testing competency.
Scenario
Technical screening for a Principal Data Scientist: reviewing shell script and Python classes
Question
Explain, line by line, what the provided virtual-environment shell script does. What advantages does shell scripting offer in data-science engineering workflows? Given the OutlierHandler class, describe its overall purpose. Why is separating fit() and transform() methods beneficial in a transformer class? Point out any coding-style or design issues you see in the class. Write one high-impact unit test you would add for OutlierHandler. For the three imputation classes shown, summarize their high-level functionality. Identify and justify any coding-style problems in the imputation script (e.g., use of "from numpy import *").
Hints
Focus on readability, testability, and reproducibility. Think about modular design and unit testing.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.