Skip to content
loading...

How to create a nested dictionary from existing list of dictionaries

jmjjeena profile image J E E N A R J U N twitter logo ・1 min read

I already have a dictionary as follows:

[{ 
  'acct': '2020', 
  'date': '2020-04-13', 
  'amount': 70.0, 
 },
{ 
  'acct': '2020', 
  'date': '2020-04-13', 
  'amount': 30.0, 
 },
{ 
  'acct': '2020', 
  'date': '2020-04-10', 
  'amount': 70.0, 
 },
{ 
  'acct': '2019', 
  'date': '2020-04-10', 
  'amount': 50.0, 
 }]

I want to create a new nested dictionary → whose initial…

twitter logo DISCUSS
Discussion
markdown guide
Classic DEV Post from Aug 13 '19

How open-source will Tumblr become?

In case you hadn't read the news, Verizon sold Tumblr to Automattic. Verizon owned Tumblr after it ac...

J E E N A R J U N profile image
Fashion Management graduate to Software Engineer!