Interview practice question
Parsing semi-structured log files
Data Analyst · Python and Pandas · Experienced
You need to extract fields like timestamp, user ID, endpoint and response time from millions of semi-structured log lines. How would you do it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Define regex with named groups.
- str.extract vectorised in pandas.
- Or DuckDB/Polars regex functions for scale.
- Handle malformed lines (count, sample).
- Store parsed output as Parquet.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.