Question: PySpark ( Python ) You are given a dataset for hard Black Friday Sales Data Set Link A. Set up your spark Environment on Colab

PySpark ( Python )
PySpark ( Python ) You are given a dataset for hard Black

You are given a dataset for hard Black Friday Sales Data Set Link A. Set up your spark Environment on Colab and instantiate a spark object B. Write proper PySpark Code to 1. Creat appropriate Schema Structure 2. Read the CSV file as a Spark Dataframe with the correct Schema. All data needs to be in a single Spark DataFrame 3. Print the Schema of your Spark Dataframe. 4. Show the first 9 rows as a table 5. Print a statistical summary that shows the min, max, mean, and median of Purchase column. 6. How many records contains at lease one missing value. 7. Print the unique values in the Occupation column. 8. find the number of records in your spark Dataframe per unique value in the occupation column. 9. find the total Purchase per Occupation 10. order age categories by total Purchase 11. Find out if M or F in the age 1835 made more Purchase

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!