Snippets Collections
storage_client = storage.Client()
 
data_bucket = storage_client.bucket(BUCKET_NAME)

destination_blob_name = 'abstract/kpi_cluster.tsv'
source_file_name = 'kpi_cluster.tsv'
blob = data_bucket.blob(destination_blob_name)

blob.upload_from_filename(source_file_name)

print('File {} uploaded to {}.'.format(
  source_file_name,
  destination_blob_name))
import pandas as pd
from google.cloud import storage

BUCKET_NAME = 'zhibo-work'

# Create a Cloud Storage client to download the data
storage_client = storage.Client()

# Download the data
data_bucket = storage_client.bucket(BUCKET_NAME)
blob = data_bucket.blob('description/data_gics.csv')
blob.download_to_filename('data_gics.csv')
star

Wed Feb 16 2022 07:55:18 GMT+0000 (Coordinated Universal Time)

#gcp
star

Thu Jan 20 2022 00:01:12 GMT+0000 (Coordinated Universal Time)

#pandas #gcp

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension