Forum

Notifications
Clear all

AI4I-1-Q error in grading one of the quiz questions  

   RSS

0

There is an error in the grading for https://makerspace.aisingapore.org/courses/ai-for-industry/lessons/lib-4-merging-dataframes-with-pandas/quizzes/ai4i-2-q-libraries-and-data-manipulation-quiz/

 

The 4th question asks you to fill in a couple of blanks:

combined = df.____(df_new_features, on=’patient_id’).____(by=[‘Age’,’BMI’])

The expected answer is:

combined = df.join(df_new_features, on='patient_id').sort_values(by=['Age', 'BMI'])

however, there is an alternative:

combined = df.merge(df_new_features, on='patient_id').sort_values(by=['Age', 'BMI'])

I have tried out both variants on my computer, and they yield the same results.

 

 

 

Topic Tags
2 Answers
0

Thanks @bguiz for the feedback! You're right! The quiz has been updated to accept df.merge

@siowy 👍

0

I tried the following and both not accepted.

combined = df.join(df_new_features, on='patient_id').sort_values(by=['Age', 'BMI'])

combined = df.merge(df_new_features, on='patient_id').sort_values(by=['Age', 'BMI'])

 

Btw, the df_new_features patients_id do not match with the df's patients_id. How will these bring the expected result shown in the quiz? Any clues?

Hi @rajesh300976!
It works. You can compare your answer with this screenshot.

Screenshot   12 8 2020 , 2 41 33 PM
Share:

Delete your account