Python index

Hi, Could anyone please help to explain the logic or workflow of this part of code:

scores_urban = students.G3[students.address == ‘U’]

I still dont get it. so please help to explain.

Do you have a link to the lesson?

You’re creating a variable called scores_urban that equals ‘df.col_name[df.col_name == ‘U’]’, or, you’re locating addresses that are indicated with a “U” and assigning them to the variable scores_urban.