title: Using a row in a dataframe inside of a SQL IN statement
body: <p>I have a row of a dataframe that I am trying to output into a list or tuple, that will go into a &quot;IN&quot; statement in an SQL query. This is the code I have so far.</p>
  <pre><code>check_query = f&quot;SELECT DISTINCT SSN AS SS, EnteredDate, CONVERT(VARCHAR, D, 23) AS F_D FROM PD WHERE EnteredDate IS NOT NULL AND SSN IN {tuple(list(df_to_add_pc['SS']))}&quot;
  print(check_query)
  </code></pre>
  <p>The output I am currently receiving is:</p>
  <pre><code>Execution failed on sql 'SELECT DISTINCT SSN AS SS, EnteredDate, CONVERT(VARCHAR, D, 23) AS F_D FROM PD WHERE EnteredDate IS NOT NULL AND SSN IN (1, 12, 123, 1234, 12345)'
  </code></pre>
  <p>Here is the Dataframe column list:</p>
  <pre><code>col_list = [&quot;SS&quot;, &quot;LN&quot;, &quot;FN&quot;, &quot;DB&quot;, &quot;G&quot;, &quot;F_D&quot;, &quot;SRC&quot;, &quot;Q_FACTOR&quot;]
  </code></pre>
  <p>It is using them as integers and they need to be strings. Is there any way convert these to a string and output them into the query the same way?</p>
  <p>Note: The SSN's inside of this question are obviously changed for security reasons. Also the variable type must be string as some of these SSN's have identifiers in front of them.</p>
  <p>Thanks in advance!</p>