day 5 | salary report | pyspark scenario based interview questions and answers

preview_player
Показать описание
day 5
salary report
pyspark scenario based interview questions and answers

Create DataFrame Code :
=====================

# Creating the Salary DataFrame
salary_data = [
(1, 'Rohan', 5000),
(2, 'Alex', 6000),
(3, 'Maryam', 7000)
]

salary_schema = "emp_id int, emp_name string, base_salary int"

# Creating the Income DataFrame
income_data = [
(1,'Basic', 100),
(2,'Allowance', 4),
(3,'Others', 6)
]

income_schema = "id int, income string, percentage int"

# Creating the Deduction DataFrame
deduction_data = [
(1,'Insurance', 5),
(2,'Health', 6),
(3,'House', 4)
]

deduction_schema = "id int, deduction string, percentage int"

#interview #spark #pyspark
Рекомендации по теме
Комментарии
Автор

Can we use Cross Join for Salary and Income Tables

srikarrar
Автор

Really appreciate this series but can we expect these videos more frequently? like 2-3 videos in a week? Thanks

atharvjoshi
Автор

I appreciate your initiative
In my pc its taking @ 2min for join execution, why ?

sanketsalokhe