Wanted to write csv file in append mode on Azure Databricks. The below code is working fine on my local machine.(Jupyter notebook)
df = pd.read_csv("/dbfs/mnt/dev/tmp/ml_p/csv_append.csv")
df+6
Ans [1]: https://i.sstatic.net/sXsgH.png
when I opened the same csv file and wanted to save the file after performing the operation. I got , OSError: [Errno 95] Operation not supported
with open('/dbfs/mnt/dev/tmp/ml_p/csv_append.csv', 'a') as f:
(df + 6).to_csv(f, header=False)
Is there is another alternative to write the CSV file in append mode? or Can I achieve the same using pyspark.