title: Pandas writing dataframe to other postgresql schema
body: <p>I am trying to write a pandas DataFrame to a PostgreSQL database,
  using a schema-qualified table.</p>
  
  <p>I use the following code:</p>
  
  <pre><code>import pandas.io.sql as psql
  from sqlalchemy import create_engine
  
  engine = create_engine(r'postgresql://some:user@host/db')
  
  c = engine.connect()
  conn = c.connection
  
  df = psql.read_sql("SELECT * FROM xxx", con=conn)    
  df.to_sql('a_schema.test', engine)
  
  conn.close()
  </code></pre>
  
  <p>What happens is that pandas writes in schema "public", in a table named 'a_schema.test',
  instead of writing in the "test" table in the "a_schema" schema.</p>
  
  <p>How can I instruct pandas to use a schema different than public?</p>
  
  <p>Thanks</p>