PySpark Certification Practice Test 02
DataFrame Operations and Transformations
PySpark Certification Practice Test 02
DataFrame Operations and Transformations
Insightful Saga — Modern Data Engineering Certification Preparation
Question 21
A newly joined Data Engineer at an e-commerce company receives a customer dataset containing more than 50 columns. Business users only need: - customer_id - customer_name - country The engineer wants to reduce unnecessary data processing as early as possible. Which PySpark operation should be used?
### Explanation select() allows engineers to choose only required columns.
Question 22
A retail company wants to identify transactions where: sales_amount > 10000 Which DataFrame operation is MOST appropriate?
Question 23
A banking company stores customer information. Engineers want to create a new column: is_premium_customer based on account balance conditions. Which operation should be used?
Question 24
A healthcare company receives source files containing duplicate patient records. Engineers need unique patient rows before loading downstream systems. Which operation is most appropriate?
Question 25
A telecom company wants to sort customers from highest monthly usage to lowest. Which DataFrame operation should be applied?
Question 26
A newly joined Engineer notices a column: customer_temp_field is no longer needed. What is the BEST operation?
Question 27
A retail company stores product prices as strings. Engineers must perform mathematical calculations. Which operation should be applied first?
Question 28
An insurance company wants to classify policyholders as: - High Risk - Medium Risk - Low Risk based on risk scores. Which PySpark function is most suitable?
Question 29
A logistics company must return only shipments delivered successfully. Which operation should be applied?
Question 30
A company receives customer data with: First_Name Business standards require: first_name What operation is MOST appropriate?
Question 31
A Data Engineer wants to know how many records exist after filtering. Which operation will trigger execution?
Question 32
A retail company needs the first 100 records for testing. Which operation should be considered?
Question 33
Two regional sales datasets have identical schemas. Business users want both datasets combined into one. Which operation should be used?
Question 34
A healthcare company needs the average patient age. Which operation category should be used?
Question 35
A banking company wants to determine the number of unique customers. What combination is MOST appropriate?
Question 36
A manufacturing company loads machine readings. Engineers create five new columns using withColumn(). When are these transformations actually executed?
### Explanation PySpark transformations are lazily evaluated.
Question 37
A retail analyst requests all customer records where: Country = 'India' AND Sales > 50000 Which operation should be applied?
Question 38
A telecom company wants to replace NULL values in a usage column with 0. Which operation is most appropriate?
Question 39
A newly joined engineer notices some columns contain unexpected leading and trailing spaces. Which function should be evaluated?
Question 40
A global retailer processes billions of records daily. Management asks: "Why are operations like select(), filter(), and withColumn() called transformations?" Choose the BEST answer.
### Explanation Transformations build the logical execution plan. Spark executes them only when an action such as count(), show(), or collect() is triggered. --- --- title: PySpark Certification Practice Test 03 description: Data Engineer Review Notes --- # PySpark Certification Practice Test 03