Week 5 • Tuesday

Block 44: Text & Log File Parsing

Extract structured data from plain text and log files.

Concepts

Code Examples

See exercise below.

Exercise

Read a log file; count ERROR, WARNING, and INFO lines separately. Extract timestamps and messages from each line into a DataFrame.

Homework

Write a function parse_log(filepath) → DataFrame that generalizes this pattern. Wednesday