How to save a file in the format Feather \ storage from Spark?

Is it possible to export a data frame from Apache Spark to a pen ( https://github.com/wesm/feather ) file?

+4
source share
1 answer

IIUC you can try:

import feather
import pandas as pd

#df is spark df
pdf = df.toPandas()
feather.write_dataframe(pdf, 'test.feather')
+2
source

All Articles