project-lib

How can I save a binary file to my project assets using project-lib python?

守給你的承諾、 提交于 2019-12-25 00:57:08
问题 The project lib documentation shows how to save a pandas dataframe to the project assets: # Import the lib from project_lib import Project project = Project(sc,"<ProjectId>", "<ProjectToken>") # let's assume you have the pandas DataFrame pandas_df which contains the data # you want to save in your object storage as a csv file project.save_data("file_name.csv", pandas_df.to_csv()) # the function returns a dict which contains the asset_id, bucket_name and file_name # upon successful saving of