Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import csv
- json_file_name = input("Enter the name of the input file: ")
- csv_file_name = input("Enter the name of the output file: ")
- try:
- with open(json_file_name) as json_file:
- data = json.load(json_file)
- for dicti in data:
- row = [dicti["stationId"], dicti["name"]]
- except IOError:
- print("\nThere was an error in handling the file.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement