Read csv from Google Cloud storage to pandas dataframe

后端 未结 7 1059
时光说笑
时光说笑 2020-11-28 03:00

I am trying to read a csv file present on the Google Cloud Storage bucket onto a panda dataframe.

import pandas as pd
import matplotlib.pyplot as plt
import         


        
相关标签:
7条回答
  • 2020-11-28 03:50

    There are three ways of accessing files in the GCS:

    1. Downloading the client library (this one for you)
    2. Using Cloud Storage Browser in the Google Cloud Platform Console
    3. Using gsutil, a command-line tool for working with files in Cloud Storage.

    Using Step 1, setup the GSC for your work. After which you have to:

    import cloudstorage as gcs
    from google.appengine.api import app_identity
    

    Then you have to specify the Cloud Storage bucket name and create read/write functions for to access your bucket:

    You can find the remaining read/write tutorial here:

    0 讨论(0)
提交回复
热议问题