day 3 | consecutive days | pyspark scenario based interview questions and answers
HTML-код
- Опубликовано: 10 фев 2025
- day 3
consecutive days
pyspark scenario based interview questions and answers
Create DataFrame Code :
====================
data = [
(1, '2024-03-01'),
(1, '2024-03-02'),
(1, '2024-03-03'),
(1, '2024-03-04'),
(1, '2024-03-06'),
(1, '2024-03-10'),
(1, '2024-03-11'),
(1, '2024-03-12'),
(1, '2024-03-13'),
(1, '2024-03-14'),
(1, '2024-03-20'),
(1, '2024-03-25'),
(1, '2024-03-26'),
(1, '2024-03-27'),
(1, '2024-03-28'),
(1, '2024-03-29'),
(1, '2024-03-30'),
(2, '2024-03-01'),
(2, '2024-03-02'),
(2, '2024-03-03'),
(2, '2024-03-04'),
(3, '2024-03-01'),
(3, '2024-03-02'),
(3, '2024-03-03'),
(3, '2024-03-04'),
(3, '2024-03-04'),
(3, '2024-03-04'),
(3, '2024-03-05'),
(4, '2024-03-01'),
(4, '2024-03-02'),
(4, '2024-03-03'),
(4, '2024-03-04'),
(4, '2024-03-04')
]
schema = "user_id int , login_date string"
df = spark.createDataFrame(data = data , schema = schema)
df.display()
Let's connect on LinkedIn : / dhirajgupta141
pyspark 30 days challenge : • pyspark 30 days challenge
DSA In Python Interview Series : • dsa for data engineer ...
PySpark Interview Series : • pyspark interview ques...
Pandas Interview Series : • pandas interview quest...
SQL Interview Series : • sql interview question...
PySpark Installation and Setup : • Spark Installation | P...
#interview #spark #pyspark
Great work brother, keep it up
Amazing brother 💥 I learned lot from your channel. Keep rocking 💯
One good thing about this series is that you share the dataframes directly which makes it quite easy to start with coding directly. Quite helpful
Excellent series sir , please don't stop it
Very good explanation Man
Amazing
Thanks 😄
Does it matter if we use row_number or dense_rank? I tried the code with row_number and the output matched the expected result