Top 80+ Data Engineer Interview Questions and Answers

They write a function that filters by date and returns aggregates. What if two events share a timestamp? When the python round asks a question that maps to a SQL window function, the SQL-only candidates freeze. It is the single most senior-signaling habit in a DE Python interview.
The result will be a series, thus we need to convert it into the Data Frame by using the ‘to_frame’ function and then reset indexes. First step is to calculate the email activity by each user. If there are users with the same email activity, then rank those users alphabetically. We need to find the email activity for each user and then rank all the users based on their email activity in the descending order. This python data engineer interview question has one table with 4 fields.
In multi-class problems, cross-entropy loss considers the predicted probabilities across all https://uvik.io/ possible classes. It penalizes the model more heavily when it is very confident about an incorrect prediction. For binary classification, cross-entropy loss looks at the predicted probability for the correct class. As the model improves its predictions, the cross-entropy loss decreases. A lower value indicates better model performance, with 0 being ideal. It measures how well a model’s predicted probabilities match the true labels for a set of data points.

No Days Off

A generator holds one element of state; a list holds everything. When the data doesn’t need to exist all at once, as when streaming a large file or chaining transforms. Iteration follows insertion order, so a counting dict doesn’t come back sorted or most-common-first.

  • Both reading and writing a key count as touching it, so the next eviction removes whatever key has stayed idle longest.
  • Counting stage boundaries in a plan tells you how many shuffles a job pays for.
  • This process helps improve model performance and reduce overfitting.
  • Shallow copy (copy.copy or list.copy()) duplicates only the top-level container; nested objects are shared between original and copy.

If multiple endpoints share the highest latency, the second-highest is the next unique latency value below that. When you need exactly 1 row per group, as in deduplication, ROW_NUMBER with a tie-breaking column keeps the choice stable. Ranking questions are where most window function answers go wrong, because the 3 ranking functions agree until 2 rows tie. Move the condition into the ON clause so it filters what joins rather than what survives. ROWS counts rows, not days, so a day with no sales shrinks the window to fewer calendar days. Skip the deduplication and a user who logs in twice on 1 day gets a streak that jumps a gap.

További hírek

Kérdése van?