<< Prev Question Next Question >>

Question 21/63

In which order should the code blocks shown below be run in order to return the number of records that are not empty in column value in the DataFrame resulting from an inner join of DataFrame transactionsDf and itemsDf on columns productId and itemId, respectively?
1. .filter(~isnull(col('value')))
2. .count()
3. transactionsDf.join(itemsDf, col("transactionsDf.productId")==col("itemsDf.itemId"))
4. transactionsDf.join(itemsDf, transactionsDf.productId==itemsDf.itemId, how='inner')
5. .filter(col('value').isnotnull())
6. .sum(col('value'))

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (63q)
Question 1: In which order should the code blocks shown below be run in ...
Question 2: The code block shown below should add column transactionDate...
Question 3: Which of the following code blocks performs an inner join be...
Question 4: Which of the following code blocks returns all unique values...
Question 5: Which of the following DataFrame operators is never classifi...
Question 6: Which of the following statements about Spark's DataFrames i...
Question 7: Which of the following describes tasks?...
Question 8: Which of the following code blocks shows the structure of a ...
Question 9: Which of the following code blocks returns a DataFrame that ...
Question 10: The code block shown below should return a copy of DataFrame...
Question 11: The code block displayed below contains an error. The code b...
Question 12: The code block displayed below contains an error. The code b...
Question 13: Which of the following code blocks reads the parquet file st...
Question 14: Which of the following code blocks displays the 10 rows with...
Question 15: The code block shown below should return a DataFrame with on...
Question 16: Which of the following code blocks returns a DataFrame that ...
Question 17: Which of the following code blocks performs an inner join of...
Question 18: Which of the following code blocks returns a new DataFrame w...
Question 19: Which of the following is a viable way to improve Spark's pe...
Question 20: The code block displayed below contains an error. The code b...
Question 21: In which order should the code blocks shown below be run in ...
Question 22: Which of the elements that are labeled with a circle and a n...
Question 23: Which of the following code blocks reads in the JSON file st...
Question 24: Which of the following code blocks concatenates rows of Data...
Question 25: Which of the following describes a difference between Spark'...
Question 26: Which of the following describes Spark's standalone deployme...
Question 27: In which order should the code blocks shown below be run in ...
Question 28: The code block shown below should return a one-column DataFr...
Question 29: The code block shown below should return the number of colum...
Question 30: Which of the following DataFrame methods is classified as a ...
Question 31: The code block displayed below contains an error. The code b...
Question 32: Which of the following describes the role of the cluster man...
Question 33: The code block shown below should show information about the...
Question 34: Which of the following code blocks returns about 150 randoml...
Question 35: Which of the following code blocks returns a single-column D...
Question 36: Which of the following options describes the responsibility ...
Question 37: Which of the following code blocks applies the Python functi...
Question 38: The code block shown below should store DataFrame transactio...
Question 39: Which of the following statements about Spark's execution hi...
Question 40: Which of the following code blocks creates a new DataFrame w...
Question 41: Which of the following statements about executors is correct...
Question 42: Which of the following code blocks returns a 2-column DataFr...
Question 43: Which of the following describes a shuffle?...
Question 44: Which of the following statements about RDDs is incorrect?...
Question 45: The code block shown below should return a copy of DataFrame...
Question 46: Which of the following statements about DAGs is correct?...
Question 47: Which of the following describes a narrow transformation?...
Question 48: Which of the following code blocks returns all unique values...
Question 49: The code block displayed below contains an error. The code b...
Question 50: Which of the following describes a valid concern about parti...
Question 51: Which of the following code blocks applies the boolean-retur...
Question 52: The code block displayed below contains an error. The code b...
Question 53: Which of the following statements about the differences betw...
Question 54: Which of the following code blocks returns a copy of DataFra...
Question 55: Which of the following statements about reducing out-of-memo...
Question 56: Which of the following code blocks silently writes DataFrame...
Question 57: The code block displayed below contains multiple errors. The...
Question 58: The code block displayed below contains an error. When the c...
Question 59: Which of the following code blocks returns a DataFrame where...
Question 60: Which of the following code blocks reorders the values insid...
Question 61: The code block shown below should write DataFrame transactio...
Question 62: The code block shown below should set the number of partitio...
Question 63: The code block shown below should return a single-column Dat...