title: Convert pandas columns to comma separated lists to be used in sql statements
body: <p>I have a dataframe and I am trying to turn the column into a comma separated list.  The end goal is to pass this comma seperated list as a list of filtered items in a SQL query.</p>
  <p>How do I go about doing this?</p>
  <pre><code>&gt; import pandas as pd
  &gt; 
  &gt; mydata = [{'id' : 'jack', 'b': 87, 'c': 1000},
  &gt;           {'id' : 'jill', 'b': 55, 'c':2000}, {'id' : 'july', 'b': 5555, 'c':22000}] 
    df = pd.DataFrame(mydata) 
    df
  </code></pre>
  <p>Expected solution - note the quotes around the ids since they are strings and the items in column titled 'b' since that is a numerical field and the way in which SQL works.      I would then eventually send a query like</p>
  <pre><code>select * from mytable where ids in (my_ids)  or values in (my_values):
  </code></pre>
  <p><code>my_ids =  'jack', 'jill','july'</code></p>
  <p><code>my_values = 87,55,5555</code></p>