Well done! Finally, it's time to put everything together. We're going to read data from one csv file, analyze its contents, and save the results into another csv file.
Suppose we've implemented a system to manage credit cards. The
system_logs.csv file contains all logs from our application:
INFO,New card added.
INFO,New user created.
ERROR,Attempt to delete another user's card.
We want to analyze the contents of this file, get all possible
log_levels, and count the number of logs with a given log level. As a result, we want to create a
logs_report.csv file that will provide all unique logging levels together with the number of logs on that level. For instance: