title: Passing a column name as a variable to a select statement in a function in python / pandas
body: <p>assume I have a function:</p>
  
  <pre><code>def retrieve (c,y):
       df = pd.read_sql("select Year, ? from table where Year=? ",db, params=(c,y))
       return df
  </code></pre>
  
  <p>I want to be able to call the function as follows:</p>
  
  <pre><code>retrieve("col_name",2001)
  </code></pre>
  
  <p>When I remove the column name as a variable that I can pass along, it works fine. But I need to be able to pass the column name too. Is there a way I can make this work?</p>