Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Json to csv
#6
Thank you. Updated the code. Still needs to add some of the implementation. Please feel free to post the solutions.
with open("C:/Temp/doc.csv","w") as s_doc:
  csvwriter = csv.writer(s_doc)
  header = ['name','no','result','grade']
  for d in d3.keys():
    if type(d3[d] is list:
     csvwriter.writerow([d3['name'],d3['no'],d,','.join(d3[d]))
Reply


Messages In This Thread
Json to csv - by pramod - Apr-20-2020, 11:25 PM
RE: Json to csv - by micseydel - Apr-20-2020, 11:43 PM
RE: Json to csv - by pramod - Apr-21-2020, 12:17 AM
RE: Json to csv - by pramod - Apr-23-2020, 09:58 PM
RE: Json to csv - by pyzyx3qwerty - Apr-21-2020, 09:14 AM
RE: Json to csv - by anbu23 - Apr-21-2020, 12:55 PM
RE: Json to csv - by pyzyx3qwerty - Apr-24-2020, 10:33 AM
RE: Json to csv - by pramod - Apr-22-2020, 01:06 AM
RE: Json to csv - by anbu23 - Apr-24-2020, 08:26 AM
RE: Json to csv - by micseydel - Apr-24-2020, 07:44 PM
RE: Json to csv - by anbu23 - Apr-25-2020, 02:31 AM
RE: Json to csv - by pyzyx3qwerty - Apr-25-2020, 09:07 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020