title: Using SQL commands in Python
body: <p>I used the following code in iPython in order to get some information from a database's table in the form of a pandas dataframe.</p>
  
  <pre><code>import sqlite3
  con = sqlite3.connect('-----.db') 
  a = pd.read_sql('SELECT * FROM table1, con) 
  c= con.cursor
  </code></pre>
  
  <p>I have table 1 as a dataframe named a. However, I need to carry out a number of inner joins between different tables from the database. My question would be how to use SQL commands within iPython using these dataframes? I tried c.execute(''' sql command for inner join''') but the error says that the dataframes mentioned are not tables.
  Any help?</p>