Python and pandas
221 practice items · needed by 11 roles
Easy 78Medium 81Hard 62
Practice questions
- Python default list surpriseeasy
- Built-in memoisation in Pythoneasy
- Safe counting in a Python dicteasy
- Missing key in a Python Countereasy
- Grouping with defaultdicteasy
- What in checks on a Python dicteasy
- Creating an empty set in Pythoneasy
- Removing duplicates but keeping ordereasy
- Looping over keys and values in Pythoneasy
- Removing a missing item from a Python seteasy
- Inverting a Python dicteasy
- Python sorted() versus list.sort()easy
- What bisect_left returnseasy
- Python queue: deque or listeasy
- Max-heap with Python heapqeasy
- Using a list as a dict key in Pythonmedium
- Subtracting two Countersmedium
- Common letters with Counter &medium
- Tie order in Counter.most_commonmedium
- Is Python dict order guaranteedhard
- Set order changing between runshard
- Python keys 1, 1.0 and Truehard
- Dataclass objects in a Python sethard
- NaN membership in a Python sethard
- Deleting from a dict while loopinghard
- Equal priorities in Python heapqhard
- A script that hangs forevermedium
- Data type for rupee amountseasy
- Modern auto-increment columnmedium
- UUID keys that index wellmedium
- Changing int to bigintmedium
- When an int key runs outhard
- Duplicate emails differing in casehard
- ReLU applied to a vectoreasy
- Broadcasting a column and a roweasy
- Imputing missing incomeeasy
- How KNNImputer fills a gapeasy
- Rows after a merge on duplicate keysmedium
- Missing values in XGBoostmedium
- Parsing a JSON reply in Pythoneasy
- Tracing a retry helpermedium
- Cosine of a scaled vectormedium
- Counting missing values in pandaseasy
- pandas mean with a missing valueeasy
- value_counts with normalizeeasy
- COUNT of a column with NULLseasy
- Changing an item in a tupleeasy
- Reading a missing dictionary key safelyeasy
- List comprehension with a conditioneasy
- is versus == for two listseasy
- Slicing part of a stringeasy
- Floor division with a negative numbereasy
- Checking 0.1 + 0.2 == 0.3easy
- Formatting a price with an f-stringeasy
- Why use with open()easy
- Most common item with Countereasy
- What if __name__ == "__main__" doeseasy
- Saving the result of list.sort()easy
- Dates read as plain texteasy
- Keeping the latest row per emaileasy
- Sorting by city then by saleseasy
- Getting the weekday from a date columneasy
- Shape after summing along axis 0easy
- A random sample that repeatseasy
- Filtering rows for several citieseasy
- Renaming one columneasy
- Turning a groupby result into a tableeasy
- Labelling orders as high or loweasy
- Values from np.linspaceeasy
- Reshaping with -1easy
- Dropping rows with no emaileasy
- Duplicates hiding behind spaces and caseeasy
- An extra "Unnamed: 0" columneasy
- Top three products by saleseasy
- Share of orders above a thresholdeasy
- dtype of an array with NaNeasy
- Grouping values with defaultdicteasy
- Items in one set but not botheasy
- Numbering rows from 1easy
- Percentage change between dayseasy
- Index of the largest valueeasy
- Grouping sales by montheasy
- f-string with an equals signeasy
- groupby with transformmedium
- Row count after a mergemedium
- groupby with a missing keymedium
- NOT IN returns no rowsmedium
- Copying a list of listsmedium
- Summing a generator twicemedium
- return inside try with finallymedium
- Sorting by score, then by namemedium
- What *args and **kwargs receivemedium
- zip with lists of different lengthmedium
- Inverting a dict with repeated valuesmedium
- Calling a typed function with stringsmedium
- Row counts from loc and iloc slicesmedium
- Combining two conditions in a filtermedium
- Setting a flag through chained indexingmedium
- Named columns from groupbymedium
- Customers who never orderedmedium
- Blank cells in a pivot tablemedium
- Shape after meltmedium
- Converting a column with NaN to integersmedium
- map and replace on unknown codesmedium
- Splitting customers into quartiles by spendmedium
- Duplicate index after concatmedium
- Best-selling product in each citymedium
- resample raises a TypeErrormedium
- A 7-day window on irregular datesmedium
- A huge text column with few valuesmedium
- A slow row-wise applymedium
- Showing UTC timestamps in Dubai timemedium
- Catching duplicate keys in a mergemedium
- Average price weighted by quantitymedium
- Showing every copy of a duplicatemedium
- Running total per customermedium
- Days since the previous purchasemedium
- Dates like 03/04/2026 in an Indian filemedium
- Moving an index level to columnsmedium
- Row percentages in a crosstabmedium
- Recommended way to make random numbersmedium
- Pulling a PIN code out of an addressmedium
- Using a variable inside query()medium
- A DataFrame that became Nonemedium
- Columns called price_x and price_ymedium
- Ranking scores with tiesmedium
- Bad dates turning into NaTmedium
- Building a long string in a loopmedium
- Forward fill without crossing customersmedium
- pivot raises a duplicate-entries errormedium
- Filtering text with missing valuesmedium
- Numbering each customer's ordersmedium
- Which city had top salesmedium
- Sorting words by lengthmedium
- Dummy columns for four citiesmedium
- Arabic text turns into \u codesmedium
- Shape after NumPy broadcastinghard
- Rolling mean at the edgeshard
- Lambdas created in a loophard
- A loop that ignores Ctrl+Chard
- Reading a global before assigning ithard
- A list default in a dataclasshard
- round() on .5 valueshard
- A decorator hides the function namehard
- nunique and unique disagreehard
- Integer overflow in a NumPy arrayhard
- Row count after explodehard
- Day-over-day change for many storeshard
- Integers turn into floats in iterrowshard
- Views and copies in NumPyhard
- Merging an int key with a text keyhard
- First quartile of four valueshard
- Different standard deviations for the same datahard
- Adding 1 to a big float32 valuehard
- NaN keys in a pandas mergehard
- Sum of a column that is all missinghard
- A helper that changes the caller's datahard
- Adding a month to 31 Januaryhard
- Assigning a Series with a different indexhard
- groupby().first() mixes rowshard
- Dividing by zero in pandashard
- Latest exchange rate before each tradehard
- Matrix product of two arrayshard
- Memory report far below real usehard
- Two-level column names after agghard
- Business days for a Saudi officehard
- Integers turn into floats after concathard
- Does np.vectorize make code fasthard
- Which bin holds a boundary valuehard
- Comparing two Series with NaNhard
- Memory saved by a smaller integer typehard
- Month-end dates with date_rangehard
- Decimal from a float or a stringhard
- Where NaN goes in a descending sorthard
- Splitting requests into batchesmedium
- More threads, no extra throughputhard
- State leaking between requestshard
- Dividing two integers in SQLeasy
- Lost leading zeros in IDseasy
- Counting missing values in pandaseasy
- Total sales per city in pandaseasy
- Type of a 1 to 5 ratingeasy
- Box plots per city in Pythoneasy
- SUM ignores some numberseasy
- Cleaning extra spaces from nameseasy
- Filling a pattern from one exampleeasy
- Splitting "City, State" into two columnseasy
- Deleting repeated rowseasy
- Deleting duplicate rowseasy
- Filling missing income valuesmedium
- Same cleaning every Mondaymedium
- Outlier cutoff with the IQR rulemedium
- Rows after a pandas left mergemedium
- Lookup fails for values that look identicalmedium
- ID 1001 not foundmedium
- Removing commas from amountsmedium
- Filling blanks with the value abovemedium
- LAG in pandasmedium
- Marking duplicates in an UPDATEmedium
- RANK in pandasmedium
- Filtering NaN with == in pandashard
- 16-digit numbers lose a digithard
- COUNTIF finds duplicates that are nothard
- TRIM does not remove a spacehard
- Times stored as texthard
- Duplicates that Power Query keepshard
- Last known value with IGNORE NULLShard
- A CSV bigger than memoryeasy
- Data type for phone numberseasy
- Codes losing their leading zeroseasy
- Data type for amounts in rupeeseasy
- Is 03/04/2026 March or Aprilmedium
- A slow Python UDF in PySparkhard
- Every task loads the last tablehard
- Template lost inside an f-stringhard
- Storing money as integer filshard
- Dates without a time zonemedium
- Saving an Arabic namemedium
- Sending money amounts in JSONhard
- DSO bug on quarterly datamedium
- Averaging margins across storeshard