qobjects = [
{
question: "What is a correct syntax for changing the 'Firstname' column in the first row to 'John'?",
options: [
"df.loc[0, 'Firstname'] = 'John'",
"df.loc[0]['Firstname'] = 'John'",
"df.loc[0, 'Firstname', 'John']"
],
correct: 0
},
{
question: "Consider the following code:for x in df.index:
if df.loc[x, 'Duration'] > 120:
df.drop(x, inplace = True)
What will happen in the result when the value for 'Duration' is higher than 120?",
options: [
"The Duration value will be set to 120",
"The Duration column will be deleted",
"The entire row will be deleted"
],
correct: 2
}
]