I'm trying to create delta table in databricks. I'm using this link as a referrence for learning.Here it's mentioned that For all file types, I need to read the files into a DataFrame and write out in delta format:. So I wrote following code in python
import pandas as pd
df=pd.read_csv('my file path/data.csv')
df.write.format("delta").save("/mnt/delta/df")
spark.sql("CREATE TABLE df USING DELTA LOCATION '/mnt/delta/df/'")
But I got the error message
'DataFrame' object has no attribute 'write'
Can you please help me to resolve the issue?