In this section, we will first look at how we can manipulate XML data in Python followed by how we can manipulate JSON data. After that, we will look at the pandas Python utility with a focus on CSV.
Data manipulation and parsing with XML, JSON, and CSV data
XML data manipulation
In this section, we will look at how can we manipulate XML data in Python. While there are many ways to parse XML documents in Python, the simple and the most widely used method is using the XML.etree module. Let's see the following example, which will illustrate how easy and simple it is to parse XML documents and strings in Python. Create a script called xml_parser.py. We will use an XML document called exmployees.xml:
As can be seen in the...