I would recommend at this stage to get comfortable with the documentation for such functions as well. The content in that Step has a link to the documentation for that function that should help clarify few things for you.
It’s the same concept as when you went through the Python introductory Missions.
Indexing is simply when you try to extract a certain value from a container.
In the introductory python Missions, you used indexing to find items in a list (the container), for example -
a = [4, 5, 6]
You can access
a using indexing -
a. The index for
Similarly, you are trying to get values from your
combined dataframe using
dups as an index.
In pandas, working with dataframes, indexing gets more functionality than simple lists.
dups is a pandas Series which, for each row, contains either
So, you can use
dups as an index to access rows in
combined corresponding to the
dups which are
It’s similar to the following example -
a = [True, False, True]
b = [2, 3, 4]
If I did
b[a], I would get
(The above example is just for the explanation and not valid code.)