Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
Given a Spark DataFrame 'df' with a numerical column 'sales', write a code snippet that computes the summary statistics for the 'sales' column using the .summary() method and explain the output.
A
df.sales.summary()
print(A)
B
df.select('sales').summary()
print(B)
C
df['sales'].summary()
print(C)
D
df['sales'].describe()
print(D)