title: Parse multiple columns from a dictionary column in python pandas dataframe
body: <p>I have a pandas dataframe consisting of two columns. One column is ID and the other is a nested dictionary of 100+ keys and values.</p>
  
  <p>I'm trying to parse the dictionary column into multiple columns (a column for each key) but I could not figure it out.</p>
  
  <p>What I was able to do is to manually specify each column's name and use the apply function to extract the values from the dictionary:</p>
  
  <pre><code>def get_col(row):
      d = ast.literal_eval(row["dictionary_col"])
      js = json.dumps(d["key1"])
      return js
  
  
  df["key1"]=df.apply(lambda row: get_col(row),axis=1)
  </code></pre>
  
  <p>How can I create a column in <code>df</code> for each key in <code>dictionary_col</code>?</p>
  
  <p>I found some methods that convert a dictionary to a dataframe but they didn't work since my dictionary is in a column in a dataframe (with the other column being id).</p>