UC Volumes: writing xlsx file to volume

DylanStout
Contributor

How to write a DataFrame to a Volume in a catalog?

We tried the following code with our pandas Dataframe:

dbutils.fs.put('dbfs:/Volumes/xxxx/default/input_bestanden/x test.xlsx', pandasDf.to_excel('/Volumes/xxxx/default/input_bestanden/x test.xlsx'))
 
This results in the error:
([Errno 95] Operation not supported)

on

pandasDf.to_excel('/Volumes/xxxx/default/input_bestanden/x test.xlsx'))

 
 

Did you use an AI to create this answer? You are posting a solution that is irrelevant to the question asked.

Itay_Wagner
New Contributor II

Hi, did you find a solution that works? I'm having this same issue

NandiniN
Databricks Employee
Databricks Employee

I was able to upload, using 

dbutils.fs.cp('/FileStore/excel-1.xlsx', 'dbfs:/Volumes/xxx/default/xxx/x_test.xlsx')
Maybe space in the name is causing an issue for you.