title: Export dataframe as csv file from google colab to google drive
body: <p>I want to upload a dataframe as csv from colab to google drive.I tried a lot but no luck. I can upload a simple text file but failed to upload a csv.</p>
  
  <p>I tried the following code:</p>
  
  <pre><code>import pandas as pd
  df=pd.DataFrame({1:[1,2,3]})
  df.to_csv('abc',sep='\t')
  auth.authenticate_user()
  gauth = GoogleAuth()
  gauth.credentials = GoogleCredentials.get_application_default()
  drive = GoogleDrive(gauth)
  uploaded = drive.CreateFile({'title': 'sample.csv', 'mimeType':'csv'})
  uploaded.SetContentFile('abc')
  uploaded.Upload()
  </code></pre>