pyspark scenario based interview questions and answers
capgemini interview question and answers
Create DataFrame :
================
lift_data = [
(1,300),
(2,350)
]
lift_schema = "id int , capacity_kg int"
lift_df = spark.createDataFrame(data = lift_data , schema = lift_schema)
lift_passengers_data = [
('Rahul',85,1),
('Adarsh',73,1),
('Riti',95,1),
('Viraj',80,1),
('Vimal',83,2),
('Neha',77,2),
('Priti',73,2),
('Himanshi',85,2)
]
lift_passengers_schema = "passenger_name string , weight_kg int, lift_id int"
lift_passengers_df = spark.createDataFrame(data = lift_passengers_data , schema = lift_passengers_schema)
lift_df.display()
lift_passengers_df.display()
Need help ? Connect with me 1:1 - topmate.io/dew...
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...
#pyspark #capgemini #capgeminioffcampus
26 сен 2024