Creating a file takes the body of the file; I am its first parameter. If you check the documentation for file create , you can fill out several fields. In the example below, you would add them to comma-separated file_metadata.
file_metadata = {'name': 'photo.jpg'} media = MediaFileUpload('files/photo.jpg', mimetype='image/jpeg') file = drive_service.files().create(body=file_metadata, media_body=media, fields='id').execute()
I suggest you read the file upload section of the documentation in order to better understand how the upload works and what files you can actually read from in the Google driver. I'm not sure if this will give you access to google colaborate
Possible fix for your code.
I'm not a python developer, but I think you can set your title by doing this.
uploaded = drive.CreateFile({'xyz.csv': 'C:/Users/abc/Google Drive/def/xyz.csv', 'name': 'xyz.csv'})
source share