Wells Fargo Data Science Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Wells Fargo hiring for Data Science roles
Wells Fargo is a large US bank offering consumer banking, commercial banking, corporate and investment banking and wealth management. Its India centres in Hyderabad, Bengaluru and Chennai support technology, operations, analytics and risk. It hires for software engineers, testers, data analysts, data engineers and risk analysts.
For Data Science roles, this Wells Fargo practice set focuses most on Machine Learning (9), SQL for Data Science (5), Python for Data Science (5), Feature Engineering (4). It has 3 easy, 36 medium, 1 hard questions, so you can start easy and work up to the harder ones.
Company type
Banking & finance
Headquarters
San Francisco, California, USA
Main India offices
Hyderabad, Bengaluru, Chennai
Wells Fargo Data Science interview process
Online assessment (aptitude + technical)
Technical round
Managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for Wells FargoStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
It applies Bayes' theorem assuming features are independent given the class. The assumption is rarely true but the model is fast and works well for text.
02
Your fraud model has 99 percent accuracy, but the business says it catches almost no fraud. Why?
If only 1 percent of transactions are fraud, a model that predicts not fraud for everything is 99 percent accurate and useless. Accuracy hides the minority class. I would check the confusion matrix, recall on fraud cases and precision-recall AUC. Then fix it with class weights, resampling or a lower decision threshold, and choose the threshold based on the cost of missed fraud versus false alerts.
It lets a model weigh which input positions matter most for each output, computing weighted combinations of values from query-key similarity. It is the core of transformers.
The ROC curve plots true positive rate against false positive rate across thresholds. AUC is the probability that a random positive is ranked above a random negative; 0.5 is chance.
05
How do you pull large data from a SQL database into Pandas efficiently?
Push as much work as possible into SQL: filter, aggregate and select only needed columns before pulling. Use pd.read_sql with a SQLAlchemy engine and chunksize to stream large results. For very large extracts, export to Parquet from the warehouse and read that, which is much faster than row-by-row transfer. Set dtypes like category early, and never use SELECT star on a big table from a notebook.
06
What is the difference between semantic, instance and panoptic segmentation?
Semantic segmentation gives each pixel a class, such as road or car, but does not separate two cars. Instance segmentation separates individual objects of countable classes, giving each car its own mask. Panoptic segmentation combines both: every pixel gets a class, and countable objects also get an instance ID, while background stuff like sky stays semantic. Autonomous driving and robotics often need panoptic or instance output.
RNNs process sequences with a hidden state but struggle with long dependencies. LSTMs add gates that control what to remember or forget, easing the vanishing gradient.
The distribution of sample means approaches a normal distribution as the sample size grows (roughly 30+), whatever the population's shape. It lets us build confidence intervals and run hypothesis tests on means.
09
What is gradient descent and what does the learning rate do?
An optimisation method that updates weights in the opposite direction of the loss gradient. The learning rate sets the step size: too high and it diverges, too low and it is slow. Variants include SGD, mini-batch and Adam.
10
What is the difference between iterators and iterables in Python?
An iterable can produce an iterator (it has __iter__); an iterator has __next__ and remembers its position. A for-loop calls iter() on the iterable and then next() repeatedly.
11
Tell me about a computer vision project where data quality was the biggest challenge.
Situation: a shelf-detection model plateaued at low accuracy. Task: find out why and fix it. Action: I reviewed 500 errors and found that a third were labelling mistakes, with inconsistent boxes for partly hidden products. I rewrote the guidelines with visual examples, had a second annotator review hard images and relabelled the worst batch. Result: mAP rose by 9 points without changing the model, and labelling rework dropped sharply.
12
How do you use groupby with multiple aggregations?
Two-stage detectors, like Faster R-CNN, first propose candidate regions and then classify and refine each one, which gives strong accuracy, especially for small objects, but is slower. One-stage detectors, like YOLO and SSD, predict boxes and classes directly over a dense grid in a single pass, making them fast enough for real-time video. Modern one-stage models have closed most of the accuracy gap, so they dominate edge and video use cases.
14
Write SQL to compute funnel conversion from visit to cart to purchase.
WITH steps AS (
SELECT user_id,
MAX(CASE WHEN event = 'visit' THEN 1 ELSE 0 END) AS visited,
MAX(CASE WHEN event = 'add_to_cart' THEN 1 ELSE 0 END) AS carted,
MAX(CASE WHEN event = 'purchase' THEN 1 ELSE 0 END) AS purchased
FROM events
WHERE event_date >= '2026-10-01'
GROUP BY user_id
)
SELECT SUM(visited) AS visits, SUM(carted) AS carts, SUM(purchased) AS buyers,
ROUND(100.0 * SUM(carted) / NULLIF(SUM(visited), 0), 1) AS visit_to_cart_pct,
ROUND(100.0 * SUM(purchased) / NULLIF(SUM(carted), 0), 1) AS cart_to_buy_pct
FROM steps;
15
Your sales forecast scores well in k-fold cross-validation but fails in production. What could be wrong with the validation?
Random k-fold mixes future and past rows, so the model trains on data from after the period it predicts. That leaks information and inflates scores. Use time-based splits instead: train on an expanding or rolling window and validate on the next period, like TimeSeriesSplit in scikit-learn. Leave a gap between train and validation when features use lagged values, so the test reflects real forecasting conditions.
16
Write Python code to run an ADF stationarity test and difference the series if needed.
from statsmodels.tsa.stattools import adfuller
def is_stationary(s, alpha=0.05):
p_value = adfuller(s.dropna())[1]
return p_value < alpha
series = s.copy()
d = 0
while not is_stationary(series) and d < 2:
series = series.diff()
d += 1
print('differencing order d =', d)
A function using yield that produces values lazily, one at a time. It saves memory when processing large files or streams because the full sequence is never held in RAM.
18
Your notebook runs on your laptop but fails on a colleague's machine. How do you make the work reproducible?
First pin the environment: a requirements.txt or conda environment file with exact versions, or a Docker image. Set random seeds for NumPy, scikit-learn and any framework you use. Remove hard-coded local paths and read them from a config file. Make sure data comes from a shared, versioned location. Finally, restart the kernel and run the notebook top to bottom, so hidden cell order bugs are caught before sharing.
19
Your model's most important feature is customer_id. What is wrong?
An ID has no real meaning, so high importance means the model is memorising individual customers. It often happens when the same customers appear in both train and test, or when IDs were assigned in time order and act as a proxy for date or signup cohort. I would drop the ID, use a group-based split by customer, and if timing matters, add an explicit feature like account age instead.
20
How do you work with domain experts to find good features?
Situation: on an insurance claims model, my first features gave average results. Task: improve fraud detection. Action: I sat with two claim investigators for a day and asked what made them suspicious. They mentioned claims filed soon after policy start and repeated garage names. I turned these into features and checked them with the team. Result: recall at the same precision rose by 12 points. Experts often know signals the data hides.
21
Write Python code to calculate the sample size per group needed to detect a lift from 5 percent to 5.5 percent conversion.
First make the gaps explicit by reindexing to a full daily calendar so missing days appear as NaN instead of silently disappearing. For short gaps, linear or time-based interpolation is usually fine. If there is strong weekly seasonality, fill using the same weekday from neighbouring weeks or a seasonal decomposition. Add a flag column marking imputed days, and never treat missing as zero unless zero really happened.
23
Write Pandas code to create lag and rolling features for each customer.
df = df.sort_values(['customer_id', 'month'])
g = df.groupby('customer_id')['spend']
df['spend_lag1'] = g.shift(1)
df['spend_lag3'] = g.shift(3)
# shift first so the current month is not included
df['spend_roll3_mean'] = g.transform(lambda s: s.shift(1).rolling(3).mean())
24
Write scikit-learn code to get precision, recall and a confusion matrix at a custom threshold of 0.3.
In hard voting each model predicts a class and the majority wins. In soft voting each model gives class probabilities, they are averaged, and the class with the highest average wins. Soft voting usually works better because it uses each model's confidence, but it needs calibrated probabilities from all models. Hard voting is simpler and works even with models that only output labels.
An index is a separate sorted structure, usually a B-tree, that lets the database find rows without scanning the whole table, like a book index. It speeds up filters, joins and sorting on the indexed columns. Indexes cost storage and slow down inserts, updates and deletes because each index must be updated. They may be ignored for low-selectivity columns or when a function is applied to the column in WHERE.
Putting features on comparable ranges using standardisation or min-max scaling. Distance-based and gradient-based models (KNN, SVM, regression, neural nets) need it; tree models do not.
29
Write SQL to compute a running total of spend for each user.
SELECT user_id, order_date, amount,
SUM(amount) OVER (
PARTITION BY user_id
ORDER BY order_date
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
) AS running_spend
FROM orders
ORDER BY user_id, order_date;
30
Write SQL to show each customer's first order date, last order date and the gap between them in days.
SELECT
customer_id,
MIN(order_date) AS first_order,
MAX(order_date) AS last_order,
MAX(order_date) - MIN(order_date) AS days_between,
COUNT(*) AS orders
FROM orders
GROUP BY customer_id
ORDER BY days_between DESC;
-- PostgreSQL: DATE minus DATE gives days; use DATEDIFF in other engines
Guardrails are checks around the model that keep inputs and outputs safe and on-topic. Input guardrails detect prompt injection, abuse or off-topic requests. Output guardrails check for personal data, toxic content, policy violations or invalid formats before the answer reaches the user. They can be rules, classifiers or a second LLM call. Good guardrails also define fallback responses and log blocked cases for review.
It predicts from the k nearest labelled points. It is simple but slow at prediction time, sensitive to scaling and irrelevant features, and weak in high dimensions.
33
What is the difference between saving a model with pickle, joblib and ONNX?
pickle serialises Python objects; it is simple but tied to Python and library versions, and loading untrusted pickle files is a security risk. joblib is similar but more efficient for objects with large NumPy arrays, like scikit-learn models. ONNX is an open, language-neutral format that runs in optimised runtimes across languages and hardware, useful for fast serving. Always store library versions alongside pickle or joblib files.
34
What is an Overall Evaluation Criterion (OEC) in experimentation?
An OEC is a single agreed metric, or a weighted combination of metrics, that represents long-term business value and is used to judge experiments. Good OECs are sensitive enough to move within a test's duration yet aligned with long-term goals; for example, sessions per user with penalties for churn rather than raw clicks. Having an OEC prevents teams from each optimising their own metric and makes ship decisions consistent across the organisation.
35
Tell me about a time an experiment result changed a product decision.
Situation: the team was confident a redesigned home page would increase orders. Task: I owned the experiment design and analysis. Action: I set conversion as primary and session length and refunds as guardrails, ran it for two full weeks and found no lift in orders but a drop for older app versions. Result: we fixed the performance issue, retested, and shipped a version that raised orders by about 1.5 percent.
36
Your manager asks whether collecting more training data will improve the model. How do you answer using a learning curve?
A learning curve plots training and validation scores against the size of the training set. If both scores are low and close, the model has high bias and needs more features or a more flexible model. If training is high but validation is much lower and the gap narrows as data grows, the model has high variance and more data will help. It tells you whether collecting more data is worth the cost.
Power is the probability of detecting a real effect. Increase it with a larger sample, a bigger effect size, lower noise or a higher significance level.
39
What are naive and seasonal naive forecasts, and why should you always compute them?
A naive forecast predicts that the next value equals the last observed value. A seasonal naive forecast predicts the value from the same period last season, such as last Monday for next Monday. They take seconds to build and are surprisingly hard to beat on many business series. Always report your model's error relative to these baselines; if a complex model cannot beat seasonal naive, it is not adding value.
40
Write pytest unit tests for a feature function that computes days since last purchase.
import pandas as pd
from features import days_since_last_purchase
def test_basic_case():
df = pd.DataFrame({'customer_id': [1, 1], 'order_date': pd.to_datetime(['2026-01-01', '2026-01-10'])})
out = days_since_last_purchase(df, as_of='2026-01-15')
assert out.loc[1] == 5
def test_no_future_orders_used():
df = pd.DataFrame({'customer_id': [1], 'order_date': pd.to_datetime(['2026-02-01'])})
out = days_since_last_purchase(df, as_of='2026-01-15')
assert out.empty
Tips to crack the Wells Fargo Data Science interview
Learn US banking concepts like mortgages, deposits and regulatory reporting, which many India teams support.
Revise SQL, Python and testing basics for technology and analytics roles, using banking data examples where possible.
Prepare examples about risk awareness and following controls, as compliance is a strong theme at Wells Fargo.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Wells Fargo interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Wells Fargo Data Science interview?
Candidates usually go through 4 stages: Online assessment (aptitude + technical); Technical round; Managerial round; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Wells Fargo Data Science interview?
This practice set leans on Machine Learning (9), SQL for Data Science (5), Python for Data Science (5), Feature Engineering (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Wells Fargo interviewers ask you to walk through real work.
Are these the exact questions asked at Wells Fargo?
No. These are curated practice questions that match the skills and difficulty usually tested in banking & finance interviews like Wells Fargo's. They are not a leaked or verified list of past questions.
Where does Wells Fargo hire Data Science professionals in India?
Wells Fargo has large teams in Hyderabad, Bengaluru, Chennai. Openings and locations change often, so check the Wells Fargo careers page and filter by city and experience.