# How To Crack Spotify Data Science Technical Screen Interview

#### List of exact Python/SQL commands and experimentation topics you should know to nail Spotify Tech Screen

[](https://downloads.tatevaslanyan.com/six-figure-data-science-eBook)

Image Source: [@felipepelaquim](https://www.pexels.com/photo/light-vacation-art-hand-10465965/)

If you are preparing for Technical Screen or Technical Interview at Spotify then most likely you are looking for answers to the following questions:

*   *How can I start preparing for Spotify Data Science tech interview?*
*   *What can I expect from Spotify Data Science tech interview?*

This article will cover the following topics:

**\- Tech Screen Duration  
\- Part 1: Python Question  
\- Part 2: SQL Question  
\- Part 3: A/B Testing Question**

### Tech Screen Duration

This technical interview takes about 45 minutes and is divided into three parts: Python, SQL, and Experimentation.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1723919375231/440243dc-847d-4902-b9e3-1ef833ac0b19.jpeg)

Image Source: [cottonbro](https://www.pexels.com/photo/listening-to-music-on-a-smartphone-5077404/)

### Part 1: Python Question

The first tech screen question is usually a data wrangling or data transformation question which you should do in Python, although you can do it in SQL too. This question aims to find out whether you can make use of some basic concepts such as filtering and aggregation in **Python**. Whether you can make use of the two most popular libraries: **Pandas** and **NumPy.**

#### Example Question

How to fix a bug in the data where a specific device’s data is halved for some reason?

Learn the basic functionalities in **Pandas** such as grouping, summing, averaging, filtering (with single and multiple values) such as:

*   **df.groupby(“x”)**
*   **df.groupby(“x”)\[“y”\].sum()**
*   **df.groupby(“x”)\[“y”\].avg()**
*   **df\[df\[“x”\] == k\]**
*   **df\[df.x.isin(\[k,l\])\]**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1723919377409/a269ac70-3d11-4c41-a865-7c8e15570e43.png)

Learn the basic filtering function in **Numpy:**

*   df\[“new\_vb”\] = np.where(condition, value if condition true, value if condition false)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1723919379266/b78eb19d-c144-4ca6-9dfb-b8e87b6c8b0f.png)

### Part 2: SQL Question

The second question on the tech screen is a coding question in **SQL** where you need to know the basic SQL functions to filter the data, to perform joins between the two data while knowing the concept of **A/B testing** in depth.

To solve this problem you will need to be familiar with the basic concepts behind A/B testing such as control vs experimental groups, selecting primary success or performance metrics, and calculating it per each of these two groups. Everything you need to know about A/B testing to solve this problem can be found here: [https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a](https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a)

[**Simple and Complete Guide to A/B Testing**  
*End-to-end A/B testing for your Data Science experiments for non-technical and technical specialists with examples and…*towardsdatascience.com](https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a "https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a")[](https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a)

To solve this problem learn the following basic functions in **SQL**:

*   **SELECT**
*   **COUNT**
*   **AVG**
*   **LEFT JOIN, RIGHT JOIN**
*   **WHERE**
*   **GROUP BY**
*   **HAVING**
*   **ORDER BY**
*   **LIMIT**

You should be able to calculate metrics such as average screen time per control and experimental group where user information is in one table and screen time is in another. This means you should be able to join two tables and also keep the data only for the users who partipated in the A/B test (LEFT JOIN or RIGHT JOIN) depending on your choice of table ordering.

For example:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1723919381230/daf85013-d93b-4f5e-9cb8-ce7ea1e2a70d.png)

One thing you want to keep in mind is that you only need the usage data of the A/B test users after the A/B test started for them.

### Part 3: A/B Testing Question

The third and final section of the interview is about A/B testing. These are static questions that you can find in every single experimentation-related interview such as:

*   p-values
*   statistical significance
*   hypothesis-testing
*   t-test vs z-test
*   confidence interval
*   Type I and Type II error
*   and more

Study the following 2 blog posts that contain everything basic statistical concepts such as p-values etc and about A/B testing, then you will be able to answer all the questions asked during this last part of the tech screen.

[**Fundamentals Of Statistics For Data Scientists and Data Analysts**  
*Key statistical concepts for your data science or data analytics journey*towardsdatascience.com](https://towardsdatascience.com/fundamentals-of-statistics-for-data-scientists-and-data-analysts-69d93a05aae7 "https://towardsdatascience.com/fundamentals-of-statistics-for-data-scientists-and-data-analysts-69d93a05aae7")[](https://towardsdatascience.com/fundamentals-of-statistics-for-data-scientists-and-data-analysts-69d93a05aae7)

[**Simple and Complete Guide to A/B Testing**  
*End-to-end A/B testing for your Data Science experiments for non-technical and technical specialists with examples and…*towardsdatascience.com](https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a "https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a")[](https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1723919383468/851942f8-8258-4e5b-a481-d2ec45145238.jpeg)

Image Source: [cottonbro](https://www.pexels.com/@cottonbro?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)

***Disclaimer****: you can find more information about the type of questions to expect during Spotify or any other company’s interview questions on the websites such as Glassdoor.com.*

### If you liked this article, here are some other articles you may enjoy:

[**Simple and Complete Guide to A/B Testing**  
*End-to-end A/B testing for your Data Science experiments for non-technical and technical specialists with examples and…*towardsdatascience.com](https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a "https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a")[](https://towardsdatascience.com/simple-and-complet-guide-to-a-b-testing-c34154d0ce5a)

[**Fundamentals Of Statistics For Data Scientists and Data Analysts**  
*Key statistical concepts for your data science or data analytics journey*towardsdatascience.com](https://towardsdatascience.com/fundamentals-of-statistics-for-data-scientists-and-data-analysts-69d93a05aae7 "https://towardsdatascience.com/fundamentals-of-statistics-for-data-scientists-and-data-analysts-69d93a05aae7")[](https://towardsdatascience.com/fundamentals-of-statistics-for-data-scientists-and-data-analysts-69d93a05aae7)

***Thanks for the read***

*I encourage you to* [***join Medium***](https://tatev-aslanyan.medium.com/membership) *to have* *complete access to all my articles about Data Science, Machine Learning, AI, and other topics.*

*Follow me up on* [***Medium***](https://medium.com/@tatev-aslanyan) *to read more articles about various Data Science and Data Analytics topics. For more hands-on applications of Machine Learning, Mathematical and Statistical concepts check out my* [***Github***](https://github.com/TatevKaren) *account.  
I welcome feedback and can be reached on* [***LinkedIn***](https://www.linkedin.com/in/tatev-karen-aslanyan/)*.*

***Happy learning!***
