Created
April 8, 2025 19:57
-
-
Save lalitsingh24x7/03971ccd9632a1194934c25b7a4925ee to your computer and use it in GitHub Desktop.
sample_data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create the customers DataFrame | |
| customers_data = [(101, "Lalit"), (102, "Neha")] | |
| customers = spark.createDataFrame(customers_data, ["customer_id", "customer_name"]) | |
| # Create the orders DataFrame | |
| orders_data = [(1, 101, 250), (2, 102, 150), (3, 0, 100), (4, None, 200)] | |
| orders = spark.createDataFrame(orders_data, ["order_id", "customer_id", "order_amount"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment