Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
Which of the following statements correctly tests if the number of rows in a table equals 10 in Python, using the provided code snippet: row_count = spark.sql('select count(*) from table').collect()[0][0]?
row_count = spark.sql('select count(*) from table').collect()[0][0]
A
assert (row_count = 10, 'Row count did not match')
B
assert if (row_count = 10, 'Row count did not match')
C
assert row_count == 10, 'Row count did not match'
D
assert if row_count == 10, 'Row count did not match'
E
assert row_count = 10, 'Row count did not match'