I had a question on Mission 10 (Sorting Values) in the “Exploring Data with Pandas: Intermediate”.
The URL is: Learn data science with Python and R projects
top_japanese_employer = f500.loc[(f500.loc[:,"country"]=="Japan") & (f500.loc[:,"employees"].sort_values()) & (f500.loc[:,"company"])].head(1)
What I expected to happen: I thought I would get the same answer, however, I’m not. The correct answer is just an integer. Mine is giving me the whole row. How do you write the code in one step/no intermediates?