While as producers of data visualization, we are mostly using other people's data, importing and reading data are our major activities. We do need to write or export data that we produced or processed, whether it is for our or others' current or future use.
We will demonstrate how to use the previously mentioned Python modules to import, export, and write data to various formats such as JSON, CSV, and XLSX.
For demonstration purposes, we are using the pregenerated dataset from the Importing data from fixed-width data files recipe.
For the Excel writing part, we will need to install the xlwt
module (inside our virtual environment) by executing the following command:
$ pip install xlwt