title: pandas DataFrame to_sql Python
body: <p>I want to create new DB in mysql based on few csv files.
  what do I need to add? And how do I open a new db from python without manually opening it from phpmyadmin?</p>
  
  <pre><code>import pymysql
  import pandas as pd
  
  # Creating the DB:
  
  DB = pymysql.connect(host='localhost',
      user='root',
      passwd='',
      db='DB')
  
  csv1 = pd.read_csv('C:/.........csv')
  
  csv1SQL =pd.DataFrame.to_sql(name='Orders', con=DB, flavor=None, schema=None, if_exists='fail', index=True,                         index_label=None, chunksize=None, dtype=None)
  </code></pre>
  
  <p>cursor.execute(csv1SQL)</p>
  
  <pre><code>cursor = pymysql.cursor()
  </code></pre>
  
  <p>the error:</p>
  
  <pre><code>    "pandas.io.sql.DatabaseError: Execution failed on sql 'SELECT name FROM sqlite_master WHERE type='table' AND name=?;': not all arguments converted during string formatting"
  </code></pre>