Create DataFrame Code
friends_data = [(1, 2),
(1, 3),
(1, 4),
(2, 1),
(3, 1),
(3, 4),
(4, 1),
(4, 3)]
friend_schema = "user_id int , friend_id int"
friends_df = spark.createDataFrame(data =friends_data , schema = friend_schema )
likes_data = [
(1, 'A'),
(1, 'B'),
(1, 'C'),
(2, 'A'),
(3, 'B'),
(3, 'C'),
(4, 'B')
]
like_schema = "user_id int , page_id string"
likes_df = spark.createDataFrame(data =likes_data , schema = like_schema )
display(friends_df)
display(likes_df)
Need Help ? Connect With me 1:1 - https://topmate.io/dewithdhairy
Let's connect on LinkedIn : / dhirajgupta141
pyspark 30 days challenge : • pyspark 30 days challenge
top interview question and answer in pyspark :
• top interview questions and answers in pys...
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
Your Queries :
===========
american express scenario based interview questions and answers in pyspark
american express online assessment
american express interview questions and answers
american express interview questions and answers for data engineer
#pyspark #americanexpress #dataanalytics #dataengineers #youtube #dataengineers #coding #interview #faang