Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created December 25, 2021 00:36
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/c2b6e995d53f6f010c9ed42a5bdab7dc to your computer and use it in GitHub Desktop.
Save 1ambda/c2b6e995d53f6f010c9ed42a5bdab7dc to your computer and use it in GitHub Desktop.
from pyspark.sql.types import *
from pyspark.sql.functions import *
from pyspark.sql.window import Window
df = spark.read.format("parquet").load("./airbnb_listings_parquet")
# Parquet 파일 대신 사용
df = spark.read.load("./airbnb_listings.csv",
format="csv", inferSchema=True, header=True,
quote='"', escape='"', sep=',', multiline=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment