Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

save data in excel

hello, in fabric dataflow, after some transformations, I have got the data. Now I would like to save this data as excel. How do I do this?  thanks
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous 
    I am adding the code snippet here:

     

     

    import pandas as pd
    df = spark.sql("SELECT * FROM lakehouse_1.customers_1000")
    df1= df.toPandas()
    df1.to_excel('abfss://[email protected]/lakehouse_1.Lakehouse/Files/sample.xlsx')

     


    Just replace with the abfss path of your lakehouse files folder.



     



    Hope this helps.