In the “Intro to Pandas” 4th document with the marvel_df project, there appears to be an error. To “modify the first_appearance of ‘Vision’ to year 1964” the answer key is given as
so you mean the column name is not first_appearance but First appearance?
Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.
No, that has nothing to do with it (I copied the code from what I was working on, and I used capital letters in my own case when I made the data frame because it personally bothered me to use lower case for the labels), the .loc function doesn’t work to change the information in a single cell, the .at (or .iat) function does
The exercise is to change (only) the “first_appearance of ‘Vision’” to the year 1964.
The issue is the answer key sort of thing telling you how to do this is wrong, because .loc doesn’t do this. It will change the value of ‘Vision’ to 1964, but from my experience it also messes with the rest of the first_appearance values in the data frame as well. The function to change only a single value in a cell is .at or .iat