Read csv from Google Cloud storage to pandas dataframe

后端 未结 7 1139
时光说笑
时光说笑 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:43

    read_csv does not support gs://

    From the documentation:

    The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. For instance, a local file could be file ://localhost/path/to/table.csv

    You can download the file or fetch it as a string in order to manipulate it.

提交回复
热议问题