Visualizing events with Excel
Recipe Difficulty: Easy
Python Version: 2.7 or 3.5
Operating System: Any
Let's take it one step further from the previous recipe with Excel. Excel is a very robust spreadsheet application and we can do a lot with it. We will use Excel to create a table and plot graphs of the data.
Getting started
There are a number of different Python libraries with varying support for Excel and its many features. In this recipe, we use the xlsxwriter
module to create a table and graph of the data. This module can be used for much more than that. This module can be installed by pip
using the following command:
pip install xlsxwriter==0.9.9
Note
To learn more about the xlsxwriter
library, visit https://xlsxwriter.readthedocs.io/.
We also use a custom utilcsv
module that we wrote based on the previous recipe to handle interactions with CSVs. All other libraries used in this script are present in Python's standard library.
How to do it...
We create an Excel spreadsheet via the following steps...