subject

Write a class named SatData that reads a JSON file containing data on 2010 SAT results for New York City and writes the data to a text file in CSV (comma-separated values) format. It just needs to read a local JSON file - it doesn't need to access the internet. Specifically, your class should have an init method that reads the file, and it should have a method named save_as_csv that takes as a parameter a list of DBNs (district bureau numbers) and saves a CSV file that looks like this, but with only the rows corresponding to the DBNs in the list (and also the row of column headers). You may assume that the DBNs in the list are all present in the JSON file. The rows in the CSV file must be sorted in ascending order by DBN. The name of the file must be output. csv. There is a csv module for Python, but you will not use it for this project. CSV is a very simple format - just commas separating columns and newlines separating rows. The JSON file will be named sat. json and will be provided - you d

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:00, kayladgranger
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
image
Computers and Technology, 23.06.2019 06:30, darlene93
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
image
Computers and Technology, 24.06.2019 12:00, yagalneedshelp8338
Match the function to its purpose. fast worth 50pts.
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, livie225
Type the correct answer in the box. spell all words correctly. what is the default margin width on all four sides of a document? by default, the document has a margin on all four sides.
Answers: 1
You know the right answer?
Write a class named SatData that reads a JSON file containing data on 2010 SAT results for New York...

Questions in other subjects: