Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
What distinguishes DataFrame.transform() from DataFrame.apply() in pandas-on-Spark?
DataFrame.transform()
DataFrame.apply()
A
transform allows the function to return an output of arbitrary length, while apply requires the same length as the input.
transform
apply
B
Both transform and apply require the function to return the same length as the input.
C
transform requires the function to return the same length as the input, while apply allows an arbitrary length.
D
Both transform and apply allow an arbitrary length for the output.