Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 )
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ (b) Show that X ,, - p X if and only if d( X ,, X) ->0.

Answered: 1 week ago

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago

Question

Explain the characteristics of a good system of control

Answered: 1 week ago

Question

State the importance of control

Answered: 1 week ago