Free practice
Python Interview Questions for Data Analysts
30 original interview-style problems solved in a real in-browser Python editor with NumPy and Pandas, instant answer checking and step-by-step solutions.
30 questions · 7 Easy · 18 Medium · 5 Hard
Showing 30 of 30 questions
- Clean messy city names from a CRM exportEasyStrings & Text CleaningZomatoRazorpay
- Total campaign revenue from prices and quantitiesEasyLists & LoopsFlipkartMeesho
- Count orders by payment channelEasyDictionariesPaytmSwiggy
- Bucket engagement scores into segmentsEasyFunctions & LogicDeloitteAccenture
- Median salary without using a libraryEasyStatisticsTCSInfosys
- Z-score normalise a spend array with NumPyMediumNumPyAmazonMyntra
- Rolling average of daily active usersMediumNumPyGoogleOla
- De-duplicate a signup table in pandasMediumPandas — CleaningZohoFreshworks
- Revenue by city with GroupByMediumPandas — GroupBySwiggyDunzo
- Join orders with the customer masterMediumPandas — JoinsAmazonNykaa
- Monthly active users from an event logMediumDates & Time SeriesMicrosoftPhonePe
- Top-selling product in every cityHardPandas — GroupByFlipkartWalmart
- Month-1 retention by signup cohortHardPandas — JoinsGoogleZomato
- RFM scoring for a customer baseHardPandas — CleaningNykaaDeloitte
- Pivot monthly revenue by city for the leadership deckMediumPandas — GroupBySwiggyNykaa
- Fill missing product ratings the defensible wayEasyPandas — CleaningAmazonNykaa
- Validate a join before you trust the numbersMediumPandas — JoinsRazorpayDeloitte
- De-duplicate CRM leads and keep the latest touchMediumPandas — CleaningSalesforceFreshworks
- Resample daily orders into a monthly summaryMediumDates & Time SeriesMyntraBigBasket
- Extract order IDs from support ticket textEasyStrings & Text CleaningZohoFreshworks
- Flag transaction outliers with the IQR ruleMediumStatisticsHDFCRazorpay
- Build a monthly cohort retention matrixHardPandas — GroupBySwiggyCred
- Compute profit margin per category with groupbyMediumPandas — GroupByDeloitteAccenture
- One-hot encode a categorical column for modellingMediumPandas — CleaningFractalMu Sigma
- Shrink a DataFrame's memory footprintMediumPandas — CleaningAmazonWalmart
- Unpivot a wide survey export into tidy rowsMediumPandas — CleaningDeloitteNielsen
- Produce a data-quality audit for a raw extractHardPandas — CleaningAccentureEY
- Show each category as a percent of its city revenueMediumPandas — GroupByNykaaTata CLiQ
- Report week-over-week growth in ordersMediumDates & Time SeriesZeptoPhonePe
- Forward-fill sparse inventory snapshots to a daily seriesMediumDates & Time SeriesBigBasketWalmart
Python practice FAQs
How the in-browser Python editor works, how answers are checked, and how much practice Indian data-analyst interviews actually expect.
Do I need to install Python to use this practice section?
No. The editor runs real CPython compiled to WebAssembly inside your browser, so your code executes on your own machine with nothing to install and nothing sent to a server. NumPy and Pandas load on demand the first time your code imports them.
Are these actual Python interview questions for data analysts?
Every problem is written from scratch by our mentors, based on the questions Indian analytics teams actually ask in screening rounds and take-home tests — string and date cleaning, groupby aggregation, joins, cohort retention, RFM segmentation and data-quality checks. They are original problems, not copies of any question bank.
Which Python libraries are supported?
The Python standard library plus NumPy and Pandas, which is what a data-analyst interview will test you on. Import them normally; the runtime fetches the package the first time you use it.
How is my answer checked?
Each question runs a fixed data fixture, then your code, then a set of hidden assertions against the exact values your function returns. You see which assertions passed, what was expected and what your code produced — the same feedback loop as an automated take-home test.
Is this really free?
Yes. Every question, the editor and the step-by-step explanations are free to use, with no credit card and no trial limit. Signing in only adds progress tracking across questions.
How many Python questions should a fresher solve before interviews?
For an entry-level analyst role in India, work through every Easy and Medium problem here — around 20 questions — and make sure you can re-solve each one from a blank editor. That is usually enough to clear a screening round comfortably. Add the Hard problems if you are targeting product companies or a data-scientist title.
I have 3-5 years of experience in a non-data role. Where should I start?
Start with the Pandas cleaning and groupby questions rather than the string and loop basics — those are the ones that appear in lateral interviews. Then move to the Hard set (cohort retention, RFM, data-quality audit), because experienced candidates are expected to reason about the business meaning of the numbers, not only the syntax.
Will practising here help me switch into an analytics job?
Practice clears the coding screen; a portfolio and structured interview preparation get you the offer. Learners typically pair this section with our live Data Analytics with Agentic AI program for projects and placement support, or book a mock interview for one-to-one feedback on how you explain your answers.
Should I practise SQL as well?
Yes — almost every Indian data-analyst interview begins with SQL and only then moves to Python. Our free SQL practice section runs a real Postgres database in the browser with 50 interview problems, and the two sections together cover most screening rounds.
How long does the free Python compiler take to start?
The runtime downloads once, usually in a few seconds on a normal broadband or 4G connection, and is then cached by your browser. NumPy and Pandas add a short one-time load the first time a question imports them.
Want to go from practice to placement?
Our live cohorts take you from Python and Pandas fundamentals to agentic analytics projects, portfolio reviews and mock interviews with mentor feedback.