此问题在此处已有答案:
Pandas: Write to Excel not working in Databricks(1个答案)
11天前关闭。
我试图将.docx文件保存在azure存储帐户中,但不起作用:
我这样做:
挂载存储账号:
storage_account_name = ""
storage_account_access_key = ""
container_name = "docs"
mount_point = "/mnt/my_mount_point"
dbutils.fs.mount(
source=f"wasbs://{container_name}@{storage_account_name}.blob.core.windows.net",
mount_point=mount_point,
extra_configs={f"fs.azure.account.key.{storage_account_name}.blob.core.windows.net": storage_account_key}
)
字符串
尝试保存:
from docx import Document
doc = Document()
doc.add_heading('My Document Title', level=1)
temp_file_path = '/dbfs/tmp/docgerada.docx'
*doc.save(temp_file_path)*
destination_path = 'my_mount_point/new_document.docx'
dbutils.fs.cp('file:'+temp_file_path, f'/mnt/{destination_path}')
型
获取错误:
OSError: [Errno 95] Operation not supported
型
1条答案
按热度按时间ryoqjall1#
这是有效的:
字符串