(May-10-2018, 11:15 AM)Jack_Sparrow Wrote: ....
df= babynames.loc[babynames.'Top Name'=='Michael', :]
This should have given you exception. You may use dot reference to a column only if it can be tokenized to a legal Python name - which is not the case. Second selector is redundant
df= babynames.loc[babynames['Top Name']=='Michael']will do the trick
PS And now mods will give you grief for bad formatting - and they will be right
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.