Typical API data formats
Many websites offer their data via an API, which bridges applications via standardized architecture. While we are not going to cover the details of using APIs here as site-specific documentation is usually available online; we will show you the three most common data formats as used in many APIs.
CSV
CSV (Comma-Separated Values) is one of the oldest file formats, which was introduced long before the internet even existed. However, it is now becoming deprecated as other advanced formats, such as JSON and XML, are gaining popularity. As the name suggests, data values are separated by commas. The preinstalled csv
 package and the pandas
package contain classes to read and write data in CSV format. This CSV example defines a population table with two countries:
Country,Time,Sex,Age,Value United Kingdom,1950,Male,0-4,2238.735 United States of America,1950,Male,0-4,8812.309
JSON
JSON (JavaScript Object Notation) is gaining popularity these days due to its efficiency and simplicity...