title: Pandas DataFrame to BigQuery - Missing column of data
body: <p>I am running some RFM analysis on my data in Python and have adapted Joal Correia's github code (below), which outputs the results to a CSV, to also add the results to a dataframe then publish this to a BigQuery table.</p>
  
  <p>It works, but I am missing the first column of my data in BigQuery, the 'customer' id, which is the only string in my results. The column is in the .csv, and in the dataframe in python, just not in the BQ results, can anyone tell me where I am losing this?</p>
  
  <p>Note: I have removed most of the RFM code to de-cluttered this post, the lines below show my additions.</p>
  
  <p><strong>UPDATE: I ran print(results.keys()) and I do not see 'customers' in this list, is this related to it not being visible in the export?</strong></p>
  
  <pre><code>Index(['recency', 'frequency', 'monetary_value', 'R_Quartile', 'F_Quartile',
         'M_Quartile', 'RFMClass'],
        dtype='object')
  </code></pre>
  
  <p><a href="https://github.com/joaolcorreia/RFM-analysis" rel="nofollow noreferrer">https://github.com/joaolcorreia/RFM-analysis</a></p>
  
  <pre><code>import sys, getopt
  import pandas as pd
  from datetime import datetime
  from google.cloud import bigquery
  
  .....
  
         rfmSegmentation['RFMClass'] = rfmSegmentation.R_Quartile.map(str) + rfmSegmentation.F_Quartile.map(str) + rfmSegmentation.M_Quartile.map(str)
  
  # Output the results as a CSV
     rfmSegmentation.to_csv(outputfile, sep=',')
  
  # Once the CSV is generated we also drop the results into a DataFrame and output to BigQuery.
  
     results = pd.DataFrame(rfmSegmentation)
     print(results.head())
     destination_table = 'xxx.RFM'
     project_id = 'xxx'
     results.to_gbq(destination_table, project_id, chunksize=10000, verbose=True, reauth=False, if_exists='replace', private_key='xxx.json')
  
  
     print (" ")
     print (" DONE! Check %s" % (outputfile))
     print (" ")
  </code></pre>
  
  <p>Here are the results of my script in the CSV, with 'customer' present and below in BigQuery, where the column is not present:</p>
  
  <p><a href="https://i.stack.imgur.com/61DSe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/61DSe.png" alt="CSV"></a></p>
  
  <p><a href="https://i.stack.imgur.com/gNbwb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gNbwb.png" alt="BigQuery"></a></p>