Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
nested dictionaries to CSV
#2
We can help you with this, but note that we are not going to write the code for you.

My guess is that you should flatten the nested dictionary first, and then write out the flattened dictionary. How you do the flattening is going to depend on the structure of the nested dictionary. To retain the information currently in the nesting structure, I would generally go with a unique id for each entry and a parent for each entry showing how it is nested.

So we would need to see a large enough subset of the nested dictionary to understand it's structure, and the code you have written so far.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
nested dictionaries to CSV - by mart79 - Jul-23-2019, 01:17 PM
RE: nested dictionaries to CSV - by ichabod801 - Jul-23-2019, 01:31 PM
RE: nested dictionaries to CSV - by mart79 - Jul-25-2019, 08:30 AM
RE: nested dictionaries to CSV - by mart79 - Jul-25-2019, 11:16 AM
RE: nested dictionaries to CSV - by ichabod801 - Jul-25-2019, 11:50 AM
RE: nested dictionaries to CSV - by mart79 - Jul-25-2019, 12:35 PM
RE: nested dictionaries to CSV - by ichabod801 - Jul-25-2019, 05:28 PM
RE: nested dictionaries to CSV - by mart79 - Jul-26-2019, 10:33 AM
RE: nested dictionaries to CSV - by ichabod801 - Jul-26-2019, 12:14 PM
RE: nested dictionaries to CSV - by mart79 - Jul-29-2019, 04:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Searching through Nested Dictionaries and Lists Dave_London 1 9,155 Jul-09-2020, 03:36 PM
Last Post: mrdominikku
  Creating Nested Dictionaries Confusion gw1500se 2 2,201 May-18-2020, 11:16 PM
Last Post: gw1500se
  Finding value in nested dictionaries with lists mart79 16 8,508 Mar-08-2020, 08:16 PM
Last Post: ndc85430
  Transform simplified dictionary to nested dictionaries bhojendra 1 2,408 Jul-02-2019, 02:05 PM
Last Post: ichabod801
  Help to flatten list of nested dictionaries shawbapmp 4 5,804 Feb-25-2019, 10:18 PM
Last Post: shawbapmp
  Nested Dictionaries with Lists BriHaug 1 57,653 Feb-23-2019, 02:10 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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