title: merge two dataframes with nested dictionaries
body: <p><strong>How can we merge two dataframes with columns which having nested dictionaries.</strong> Update the df1 with df2 in &quot;actions&quot; column. Is there any way to achieve this by using available methods like concat,append and merge..?</p>
  <pre><code>df1 = pd.DataFrame([
      {
          &quot;id&quot;: &quot;87c4b5a0db9f49c49f766436c9582297&quot;,
          &quot;actions&quot;: {
              &quot;sample&quot;: [
                  {
                      &quot;tagvalue&quot;: &quot;test&quot;,
                      &quot;status&quot;: &quot;created&quot;
                  },
                  {
                      &quot;tagvalue&quot;: &quot;test2&quot;,
                      &quot;status&quot;: &quot;created&quot;
                  }
              ]
          }
      },
      {
          &quot;id&quot;: &quot;87c4b5a0db9f49c49f766436c9582298&quot;,
          &quot;actions&quot;: {
              &quot;sample&quot;: [
                  {
                      &quot;tagvalue&quot;: &quot;test2&quot;,
                      &quot;status&quot;: &quot;created&quot;
                  }
              ]
          }
      }
  ])
  
  
  df2 = pd.DataFrame([
      {
          &quot;id&quot;: &quot;87c4b5a0db9f49c49f766436c9582297&quot;,
          &quot;actions&quot;: {
              &quot;sample&quot;: [
                  {
                      &quot;tagvalue&quot;: &quot;test&quot;,
                      &quot;status&quot;: &quot;updated&quot;
                  }
              ]
          }
      }
  ])
  
  df1.set_index('id', inplace=True)
  df2.set_index('id', inplace=True)
  
  
  # Need to merge the data based on id
  # TODO : Right way to merge to get the following output
  
  finalOutputExpectaion = [
      {
          &quot;id&quot;: &quot;87c4b5a0db9f49c49f766436c9582297&quot;,
          &quot;actions&quot;: {
              &quot;sample&quot;: [
                  {
                      &quot;tagvalue&quot;: &quot;test&quot;,
                      &quot;status&quot;: &quot;updated&quot;
                  },
                  {
                      &quot;tagvalue&quot;: &quot;test2&quot;,
                      &quot;status&quot;: &quot;created&quot;
                  }
              ]
          }
      },
      {
          &quot;id&quot;: &quot;87c4b5a0db9f49c49f766436c9582298&quot;,
          &quot;actions&quot;: {
              &quot;sample&quot;: [
                  {
                      &quot;tagvalue&quot;: &quot;test2&quot;,
                      &quot;status&quot;: &quot;created&quot;
                  }
              ]
          }
      }
  ]
  </code></pre>
  <p><strong>Note : finalOutputExpectaion- updated dataframe as dict(We'll get it by using to_dict(orient=records))
  Python Version : 3.7,
  Pandas Version : 1.1.0</strong></p>