In the previous chapter, you learned how to apply Python programming to the task of processing data from external files. This chapter will build on the skills covered in the previous chapter with an introduction to the XML and CSV data formats. In addition to python's built-in tools for handling CSV and XML files, I will also cover pandas, which is a popular framework for working with tabular data. This chapter will include the following sections:
- Logistical overview
- Understanding the CSV format
- Introducing the
csv
module - Using the
csv
module to read and process CSV data - Using the
csv
module to write CSV data - Using the
pandas
module to read and process data - Handling non-standard CSV encoding and dialect
- Understanding XML
- Using the
xml.etree.ElementTree
module to parse XML data