Ravindra BagaleCourses & study guides मराठी Track your progress

18. Interview Questions and Answers

Data Science

18.1 Python and Jupyter

Q1. Why use a virtual environment?

A venv isolates project packages so versions do not clash with other projects. I create one per course or client project and install pandas, numpy, matplotlib and seaborn there before launching Jupyter.

Q2. List vs dict — when do you use each?

A list is an ordered sequence (e.g. city names). A dict maps keys to values (e.g. city → manager). For tabular analysis I move to pandas quickly; lists/dicts stay for small configs.

Q3. What is a Jupyter notebook good for?

Combining code, results and markdown narrative in one place — ideal for EDA and sharing an analysis path. For production pipelines I would later refactor stable code into .py modules.

Ravindra Bagale's Tip

In an interview, do not stop at "I know Python"; describe a habit you really follow. For example, say that you make one venv per project, install pandas, numpy, matplotlib and seaborn inside it, and save the versions with pip freeze > requirements.txt. For notebooks, say that you restart the kernel and run all cells before sharing, so the results do not depend on cells run out of order.