In general, the variable inspector works as an intermediate output window. It shows the various variables involved in our code including the temporary ones such as iterators in the
Let’s understand this with the help of this code:
sum_val = 0
for each in [1, 2, "a", 4]:
sum_val += each
Since the list is so small, you would instantly understand the “a” value is a string type and hence won’t add to the int type values (1, 2, & 4). However, if we look at the output window, we get this error. Now the highlighted part doesn’t give us any information about what actually caused the error as in what exact value led to the error.
Imagine, identifying that when we have a dataframe column with 5000 values. Now in the variable inspector if we look at the iterator “each” we see the last value it tried to execute is “a”. This is where the variable inspector comes in handy, to help in identifying and debug the code
Coming to the mission-specific requirement. Here again, the concat_axis0 is a small resultant dataframe. so you won’t be wrong to look at it in the output window. however try to see the first two rows from happiness2016 dataframe in the output window and the variable inspector.
It’s easier to read in the latter.
Finally, question1 and question2 are actually created for the checking purpose of the mission, and nope they don’t need the hardcoded values to be correct. This must have been taken up in a former mission. use the df.shape method to complete this part.
Try the code, and let us know if you face any issue.
I hope the above response helps you somewhat.