title: Pandas TypeError: sequence item 0: expected str instance, dict found when using to_sql
body: <p>I am trying to export a dataframe into a mysql database. I am getting the data via an Order and Inventory API call. </p>
  
  <p>I have successfully been able to save the Order and Inventory API calls into dataframes and export Order dataframe into a MySQL table. </p>
  
  <p>The Inventory dataframe however is throwing me the error: </p>
  
  <pre><code>TypeError: sequence item 0: expected str instance, dict found
  </code></pre>
  
  <p>I am not sure what I am doing wrong, I do suspect that the dataframe for inventory contains alot of nested json in many of the columns, but not sure what to do. </p>
  
  <p>Here is my code so far for inventory:</p>
  
  <pre><code>import pandas as pd
  
  #python libary to compare today date for birthday lists.
  import numpy as np
  import datetime as dt
  import datetime
  from pandas.io.json import json_normalize
  from pandas.io import sql
  import pymysql.cursors
  import json
  import pymysql
  import pandas.io.sql
  from sqlalchemy import create_engine
  
  headers_inventory = {
      'Accept': '',
      'Content-Type': '',
      'x-api-key': '',
      'x-organization-id': '',
      'x-facility-id': '',
      'x-user-id': '',
  }
  
  r_inventory = requests.get(' URL', headers=headers_inventory, verify=False)
  
  data = json.loads(r_inventory.text)
  df_inventory = json_normalize(data)
  print (df_inventory)
  
  engine = create_engine('mysql+pymysql://USERNAME:PWD@HOST:3306/DB')
  df_inventory.to_sql("inventory", engine, if_exists="replace", index = False)
  </code></pre>
  
  <p>Here is what the dataframe dtypes are:</p>
  
  <pre><code>int64 
  object
  float64
  </code></pre>