cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Pandas .to_excel not saving to workspace

Ramonrcn
New Contributor

Hi!

I was always able to export pandas datasets to my workspace on databricks, just like in a local machine using df.to_excel('filename', index=False).

but since i got some permissions updates to some new catalogs, when i try to export a dataset using .to_excel the cell runs ok, but the file isn't created nowhere in my workspace. Even when i tried some known working previous notebooks, the cell runs but no files are created.

any suggestions on how to solve this issue?

2 REPLIES 2

Kaniz_Fatma
Community Manager
Community Manager

Hi @Ramonrcn,

  • Please ensure you have permission to write files in your workspace and verify that you can create files in other locations. 
  • If you have the relevant permissions correctly, ensure the specified file path is valid, using an absolute or correct relative path within your workspace.
  • Let me know if you need further assistance! ๐Ÿ˜Š

Ramonrcn
New Contributor

Just to update the situation, and to help anyone with the same problem in the future:
What hapened was thas my cluster was updated to use Unity Catalogs, and with that i had to specify the full path to my workspace.

df_pandas.to_excel('/Workspace/Users/ramon.nogueira@docway.co/inner_path/file.xlsx')

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!