Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created December 23, 2021 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ambda/0795313ba8ba9f1888358b630f1b98e7 to your computer and use it in GitHub Desktop.
Save 1ambda/0795313ba8ba9f1888358b630f1b98e7 to your computer and use it in GitHub Desktop.
# 2개의 Partition 으로 만든 뒤, JSON 포맷으로 GZIP 압축하여
# airbnb_listings 디렉토리에 (Jupyter Notebook 의 경우 현재 ipynb 노트북이 위치한 디렉토리)
# Overwrite (덮어쓰기) 저장합니다
dfListingSelected\
.repartition(2)\
.write\
.mode("overwrite")\
.format("json")\
.option("compression", "gzip")\
.save("airbnb_listings")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment