May-10-2018, 11:15 AM
Hi there,
this is my table:
State Gender Year Top Name Occurences
0 AK F 1910 Mary 14
1 AK F 1911 Mary 12
2 AK F 1912 Mary 9
(Tha table has a lot of different names, state etc.)
I want to select the column "Top Name", where Name == Michael.
This is my code:
df= babynames.loc[babynames.'Top Name'=='Michael', :]
The problem is, that this column name has an "escape" Top_Name
So I don't know how to write this in my code...
Thank you!
J
this is my table:
State Gender Year Top Name Occurences
0 AK F 1910 Mary 14
1 AK F 1911 Mary 12
2 AK F 1912 Mary 9
(Tha table has a lot of different names, state etc.)
I want to select the column "Top Name", where Name == Michael.
This is my code:
df= babynames.loc[babynames.'Top Name'=='Michael', :]
The problem is, that this column name has an "escape" Top_Name
So I don't know how to write this in my code...
Thank you!
J