Skip to content

Instantly share code, notes, and snippets.

@Hehehe421
Created September 5, 2023 22:59
Show Gist options
  • Save Hehehe421/f2973dd645dc2b08a10409452ea173da to your computer and use it in GitHub Desktop.
Save Hehehe421/f2973dd645dc2b08a10409452ea173da to your computer and use it in GitHub Desktop.
# Create a temp table from DataFrame generated for example
listing_df.createOrReplaceTempView("listing_df")
# Call the function to rank listings by region
ranked_listings = rank_listings_by_region("Region_3", spark)
# Show the ranked listings
ranked_listings.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment