Skip to content

Instantly share code, notes, and snippets.

@bh1995
Last active January 11, 2021 22:04
Show Gist options
  • Save bh1995/79abb062e6d3660ee4213636af9fc489 to your computer and use it in GitHub Desktop.
Save bh1995/79abb062e6d3660ee4213636af9fc489 to your computer and use it in GitHub Desktop.
listings_df = listings_df.select("id","price","review_scores_rating",\
"city","neighbourhood_cleansed","property_type").cache()
reviews_df = reviews_df.select("listing_id","date", "comments").cache()
# Show the first 5 rows (same as head(5) in pandas)
print(listings_df.count())
print(reviews_df.count())
listings_df.show(5)
reviews_df.show(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment