azure Os错误操作在数据块中不受支持[重复]

olmpazwi  于 2023-03-09  发布在  其他
关注(0)|答案(1)|浏览(152)
    • 此问题在此处已有答案**:

Pandas: Write to Excel not working in Databricks(1个答案)
9天前关闭。
我有一个数据框,我试图将其转换为Excel工作表,但我得到一个错误--未找到操作这是我的数据集看起来像

FILE                                     PATH                           COLUMNS                                            TYPE
0   board_fact_price    /dbfs/mnt/global/systems/board/board_fact_pric...   ['CODE_SalesOrg', 'CODE_UnitOfMeasure', 'CODE_...   Intput
0   board_fact_quantity /dbfs/mnt/global/systems/board/board_fact_quan...   ['Month', 'Article', 'Account', 'Version', 'Un...   Intput
0   board_fact_sat_quantity /dbfs/mnt/global/systems/board/board_fact_sat_...   ['Month', 'Article', 'Account', 'Version Inter...   Intput
0   DISTRIBUTOR_SALES   /dbfs/mnt/sgi/input/processed/DISTRIBUTOR_SALE...   ['YEAR', 'SEASON', 'DISTRIBUTOR_NAME', 'CUSTOM...   Intput
0   board_dim_version   /dbfs/mnt/global/systems/board/board_dim_versi...   ['SalesOrg', 'Version', 'CurrentVersion', 'Ver...   Intput

当我尝试到转换我的dataframe到excel通过写

dataframe.to_excel("/dbfs/mnt/sgi/input/processing/campaign_tracking.xlsx")

我收到错误

plicqrtu

plicqrtu1#

现在已经解决了。

from shutil import copyfile
final = '/dbfs/mnt/sgi/input/processing/campaign_tracking.xlsx'
temp_file = '/tmp/campaign_tracking.xlsx'
dataframe.to_excel(temp_file)
copyfile(temp_file, final)

相关问题