title: Create dataframe out of dictionary
body: <p>I have a dictionary that looks as below:</p>
  
  <pre><code>Tablas = 
  {'__v': 0,
   '_id': 'a',
   'approved': True}
  {'__v': 1,
   '_id': 'b',
   'approved': True}
  {'__v': 2,
   '_id': 'c',
   'approved': True}
  </code></pre>
  
  <p>I would like to loop through the 3 elements of the dictionary and add the elements to a data frame in a table containing three rows of data. The headers of the table should be the keys of the dictionary (e.g. _v,_id,approved) and the data of the table should be the values of the dictionary in 3 different rows.</p>
  
  <p>My problem is that with below code I only manage to get a dataframe with one row which is the last element of the dictionary.</p>
  
  <p>Could you please advise how can I get the desired table? I have try to find an answer in similar questions but I was not able to solve my issue. Below is the code I am using:</p>
  
  <pre><code>import pymongo
  import pprint
  from pymongo import MongoClient
  import pandas as pd      
  
  tablas = pd.DataFrame(db.users.find_one())
  
  for post in tablas:
      tablas.append(post, ignore_index=True)
  tablas.to_excel('check.xlsx')
  </code></pre>
  
  <p>The expected dataframe should look like below:</p>
  
  <p><a href="https://i.stack.imgur.com/vSRlA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vSRlA.png" alt="enter image description here"></a></p>