Which of the following is a transformation operation in PySpark?
PySpark Quiz Round

Quiz
•
Other
•
Professional Development
•
Hard

Ankita Chatterjee
Used 1+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
count()
filter()
reduce()
collect()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true for RDD?
RDD is programming paradigm
RDD in Apache Spark is an immutable collection of objects
It is a database
None of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
words_list = sc.parallelize ( ["pyspark", "quiz", "questions", "at", "quiz.com"] )
filtered_words = words_list.filter(lambda x: 'quiz' in x)
matched_words= filtered_words.collect()
print(matched_words)
[ "quiz", "quiz.com" ]
[ "quiz" ]
["quiz.com" ]
Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Let us consider, we have a data frame "df". Then what does the expression '[.]{2,}' signify for the following transformation?
df = df.withColumn('var_addrss', sf.regexp_replace('var_addrss', '[.]{2,}', ''))
A single dot (".") followed by 2 integers
A single dot (".") followed by the integer '2'
Single dot (".") appearing twice consecutively
None of these
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Let us consider, we have a data frame "df". Then what does the expression '^[0]*' signify for the following transformation?
df = df.withColumn('var_addrss', sf.regexp_replace('var_addrss', '^[0]*', ''))
The value starts with 0 OR followed by a sequence of 0s
The value starts with 0 and ends with 0
The value starts with 0 and followed by a sequence of 0s
The value starts with anything other than 0
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Let's assume we have the following data frame "df".
How to display the 'age' column in descending order?
display(df.orderBy(df.age.desc()))
display(df.sort(df.age.desc()))
display(df.orderBy(df.age, sort = desc()))
None of these
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the data type of the columns for the following PySpark data frame "df"?
df = spark.read.format("csv").option("header", "true").option("inferSchema", "false").option("delimeter", ",").load("/mnt/temp/test.csv")
Data types of columns will be int
Data types of columns will be read as per the data types defined in the file
Data types of all columns will be string
None of the above
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions

Quiz
•
1st Grade - Professio...
11 questions
Excel Imil Quiz

Quiz
•
Professional Development
15 questions
Ora 07-005

Quiz
•
Professional Development
10 questions
Data Dynamos Quiz Day 2

Quiz
•
Professional Development
10 questions
IKC Workshop

Quiz
•
Professional Development
10 questions
Session 3 Review

Quiz
•
Professional Development
14 questions
NEO Week 2 Day 3

Quiz
•
Professional Development
10 questions
CSS flexbox quiz

Quiz
•
Professional Development
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade