deloitte interview question in pyspark| pyspark interview questions | #interview | #sql |#data
In this video we will be solving DELOITTE interview question in PySpark.
Dataframe Create Code :
======================
1)
product_data = [
(1, 'Laptops', 'Electronics'),
(2, 'Jeans', 'Clothing'),
(3, 'Chairs', 'Home Appliances')
]
product_schema = ['product_id', 'product_name', 'category']
product_df = spark.createDataFrame(data = product_data , schema = product_schema)
product_df.show()
2)
sales_data = [
(1, 2019, 1000.00),
(1, 2020, 1200.00),
(1, 2021, 1100.00),
(2, 2019, 500.00),
(2, 2020, 600.00),
(2, 2021, 900.00),
(3, 2019, 300.00),
(3, 2020, 450.00),
(3, 2021, 400.00)
]
sales_schema = ['product_id', 'year', 'total_sales_revenue']
sales_df = spark.createDataFrame(data = sales_data , schema = sales_schema)
sales_df.show()
Need Help ? Connect With me 1:1 - https://topmate.io/dewithdhairy
SQL Approach and Step by Step Solution Video :
• deloitte interview question in sql | sql i...
PySpark Installation and Setup : • Spark Installation | PySpark Installation ...
DSA In Python Interview Series : • dsa for data engineer | dsa for data analy...
PySpark Interview Series : • pyspark interview questions and answers
Pandas Interview Series : • pandas interview questions and answers
SQL Interview Series : • sql interview questions and answers
Let's connect on LinkedIn : / dhirajgupta141
#deloitte #sql #interview #dataengineers #dataanalytics #datascience #StrataScratch #Facebook #data #dataengineeringinterview #codechallenge #datascientist #pyspark #CodingInterview
#dsafordataguy