In this lab, we'll continue investigating new formats for datasets. Specifically, we'll investigate two of the most popular data formats for the web: JSON and XML including strenghts and weaknesses.
You will be able to:
- Effectively use the JSON module to load and parse JSON documents
- Read and access data stored in JSON and XML
- Compare and contrast the JSON and XML as data interchange types
import xml.etree.ElementTree as ET
#Your code here
#Answer: 1
# Your code here
Sort the DataFrame in descending order by the tag count. The first entry should demonstrate there are 286 row tags in the XML file.
(Your DataFrame will be a single column, so could also be thought of as a Series.)
import pandas as pd
#Your code here
#Your code here
### Your code here
#Your code here
#Your code here
Preview the Entry under meta -> view -> columns (the keys of three successively nested dictionaries)
The previous two questions previewed one entry from the data object within the json file, as well as the column details associated with that data from the meta entry within the json file. Both should have 19 entries. Create a DataFrame of the data. Be sure to use the information from the meta entry to add appropriate column names to your DataFrame.
#Your code here
#Your code here
#Your answer here
Congratulations! You've started exploring some more complicated data structures used for the web and got to practice data munging and exploring!