chapter twelve
Data sets come in a variety of file formats: comma-separated values (CSV), tab-separated values (TSV), Excel workbooks (XLSX), and more. Some data formats do not store data in tabular format; instead, they nest collections of related data inside a key-value store. Consider the following two examples. Figure 12.1 stores data in a table, and figure 12.2 stores the same data in a Python dictionary.
Figure 12.2 A Python dictionary (key-value store) with the same data
{
2000: [
{
"Award": "Best Actor",
"Winner": "Russell Crowe"
},
{
"Award": "Best Actress",
"Winner": "Julia Roberts"
}
],
2001: [
{
"Award": "Best Actor",
"Winner": "Denzel Washington"
},
{
"Award": "Best Actress",
"Winner": "Halle Berry"
}
]
}