gee 把数据下载到本地
from google.colab import files
df.to_csv('filename.csv')
files.download('filename.csv')
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from google.colab import auth
from google.colab import files
from oauth2client.client import GoogleCredentials
auth.authenticate_user()
gauth = GoogleAuth()
gauth.credentials = GoogleCredentials.get_application_default()
drive = GoogleDrive(gauth)
from google.colab import drive
drive.mount('/gdrive')
with open('/gdrive/My Drive/foo.csv', 'w') as f:
df.to_csv(f)
from google.colab import drive
drive.mount('drive')
df.to_csv('data.csv')
!cp data.csv "drive/My Drive/"
from google.colab import drive
drive.mount('/drive')
df.to_csv('/drive/My Drive/folder_name/name_csv_file.csv')