I'm trying to compress a csv, located in an azure datalake, to zip. The operation is done with python code in databricks, where I created a mount point to relate directly dbfs with the datalake.
This is my code:
import os
import zipfile
csv_path= '/dbfs/mnt/<path>.csv'
zip_path= '/dbfs/mnt/<path>.zip'
with zipfile.ZipFile(zip_path, 'w') as zip:
zip.write(csv_path) # zipping the file
But I'm getting this error:
OSError: [Errno 95] Operation not supported
Is there any way of doing it?
Thank you in advance.



