Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14126

How to save pyspark Dataframe to downloadable excel file in Databricks

$
0
0
import pandas as pdimport xlsxwriterpandasDf=REV_COMP_DF.toPandas()pandasDf.to_excel('/tmp/revenue.xlsx',engine='xlsxwriter',header=True)dbutils.fs.mv('file:/tmp/revenue.xlsx','RESULT/revenue.xlsx')test=pd.read_excel('/dbfs/RESULT/revenue.xlsx')

Tried the above code, but it's create file in dbfs, but we cannot download the file locally.Is there any way to create downloadable excel files from pyspark dataframes in databricks.

Tried the above code, but it's create file in dbfs, but we cannot download the file locally.Is there any way to create downloadable excel files from pyspark dataframes in databricks.


Viewing all articles
Browse latest Browse all 14126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>