[英]How do I create a connection to Object Storage on Bluemix in a Data Science Experience Project?
[英]How do I access files on Bluemix Object Storage from Python on Data Science Experience?
我想將文件復制到DSX上的本地內存中,以便可以使用read_csv創建熊貓數據框。 我不想使用給定的“插入代碼”選項,因為它假定了列標題,而且代碼也不那么漂亮。 這是我的代碼:
import swiftclient
IBM_Objectstorage_Connection = swiftclient.Connection(key=objStorCred['password'],
authurl=objStorCred['auth_url'],
auth_version='3',
os_options={"project_id": objStorCred['projectId'],
"user_id": objStorCred['userId'],
"region_name": objStorCred['region']})
x = IBM_Objectstorage_Connection.get_account()
我已經嘗試過對象存儲管理員憑據和容器的憑據。 都不起作用。 我正在嘗試復制本教程中所做的操作,但似乎沒有用。 這是我的錯誤:
Authorization Failure. Authorization failed: The resource could not be found. (HTTP 404)
任何幫助將不勝感激!
您是否看過以下筆記本中提到的get_file_content(credentials)
方法:
content_string = get_file_content(credentials_1)
precipitation_df = pd.read_csv(content_string)
我已經使用過很多次了。 希望這可以幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.