title: sfdc select result in pandas dataframe
body: <p>How can I insert the output of query_result in pandas dataframe? The query result first gets 500 records and using QueryMore the remaining records are pulled. I am unable to push everything in df along with column names. </p>
  
  <pre><code>#!/usr/bin/env python3
  
  import beatbox
  import sqlalchemy
  
  engine_str = 'mysql+mysqlconnector://db-user:db-pass@localhost/db-name'
  engine = sqlalchemy.create_engine(engine_str, echo=False, encoding='utf-8')
  connection = engine.connect()
  
  sf = beatbox._tPartnerNS
  service = beatbox.Client()
  def sync_user(objectSOQL):
      service.login('sfdc-username', 'sfdc-creds')
      query_result = service.query(objectSOQL)
      while True:
          for row in query_result[sf.records:]:
              SQL_query = 'INSERT INTO user(' \
                          'id, ' \
                          'name, ' \
                          'department, ' \
                          'sales_team) ' \
                          'VALUES(' \
                          '\"{}\",\"{}\",\"{}\",\"{}\"' \
                          ') ON DUPLICATE KEY UPDATE '\
                          'name = VALUES(name), '\
                          'department = VALUES(department), '\
                          'sales_team = VALUES(sales_team) '\
                          .format(
                          row[2],
                          row[3],
                          row[4],
                          row[5]
                          )
              # SQL_query = SQL_query.replace('\"None\"', 'NULL')
  
              try:
                  connection.execute(SQL_query)
              except Exception as e:
                  print(id, e)
  
          if str(query_result[sf.done]) == 'true':
              break
          query_result = service.queryMore(str(query_result[sf.queryLocator]))
  
  if __name__ == "__main__":
      SOQL = 'SELECT id, Name, Department, Sales_Team__c FROM User'
      sync_user(SOQL)
  </code></pre>