Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Python Code Only: Please give the code for doing these tasks in a python program also give screenshots. Thanks I have sample 3 json files

Python Code Only: Please give the code for doing these tasks in a python program also give screenshots. Thanks I have sample 3 json files in the directory: 1. Load the directory with the 3 files in python. 2. Read all three file from the directory. 3. Convert the contents of all these files into a three separate CSV File. (So there are three CSV files. One CSV file for each json file.) 4. Now do step three again but convert information from all three json files into one CSV file. (So put all the information from all three json files is in one CSV file.). 5. Load directory into your Python program and read contents from a selected file and that file is converted into a CSV file. (For example: I load the directory with three json files. The program reads all three files. But I want the contents from only File2 and convert that to CSV file).

Here is the sample files: File1.json { "store_name": "The Online Store", "Store_type": "Book Store", "Genre": "fantasy", "Titles": ["This Life", "Happiness", "God Father", "Princes Bride"] "Detail": { "Authors": { "Bobby brown" : ["Audio Book", "Book", "Video", "Interviews"] "Sandy Jason" : ["Audio Book", "Video"] "Micheal O'Brien" : ["Book", "Interview"] "Melissa Knight" : ["Book"] }, "Price": [ { "type": "Hardcover", "price": 16.65 }, { "type": "Kiddle Edition", "price": 7.03 } ] }

File2.json { "store_name": "Shop with us", "Store_type": "Book Store", "Genre": "comics", "Titles": ["Robocop", "Dog Agent", "Water"] "Detail": { "Authors": { "Busy Bee" : ["Audio Book", "Book", "Video", "Interviews"] "Brook Harold" : ["Interviews", "Video"] "Masha Wisely" : ["Book", "Interview"] }, "Price": [ { "type": "Hardcover", "price": 20.00 }, { "type": "Kiddle Edition", "price": 5.99 } ] }

File3.json { "store_name": "15th avenue", "Store_type": "Book Store", "Genre": "Horror", "Titles": ["Black Beauty", "War agents", "Clarity"] "Detail": { "Authors": { "Bugs Bunny" : ["Audio Book", "Book", "Video", "Interviews"] "Marla Hudson" : ["Interviews", "Video"] "Missy Brown" : ["Book", "Interview"] } }

Output Should look like this for all three files question 3:

Output
store_name store_type Genre Titles Authors Audio Book Book Video Interview Hardcover Kidle Edition
The online store Book Store fantasy This Life Bobby Brown Y Y Y Y 16.65 7.03
The online store Book Store fantasy Happiness Sandy Jason Y Y 16.65 7.03
The online store Book Store fantasy God Father Micheal O'Brien Y Y 16.65 7.03
The online store Book Store fantasy Princes Bride Melissa Knight Y 16.65 7.03
Shop with us Book Store comics

Robocop

Busy Bee Y Y Y Y 20.00 5.99
Shop with us Book Store comics Dog Agent Brook Harold Y Y 20.00 5.99
Shop with us Book Store comics Water Masha Wisely Y Y 20.00 5.99
15th Avenue Book Store Horror Black Beauty Bugs Bunny Y Y Y Y
15th Avenue Book Store Horror War Agents Marla Hudson Y Y
15th Avenue Book Store Horror Clarity Missy Brown Y Y

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students explore these related Databases questions

Question

pls refer above. computer science math

Answered: 3 weeks ago