Hi there, I have follow 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
3 AK F 1913 Mary 21
4 AK F 1914 Mary 22
5 AK F 1915 Mary 23
6 AK F 1916 Mary 18
7 AK F 1917 Mary 21
8 AK F 1918 Mary 27
I want to see only one column with the names unique
this is my code:
[python[import pandas as pd
babynames = pd.read_csv('TopBabyNamesbyState.csv')
babynames = pd.unique(pd.Series(['Top Name']))
print(babynames)[/python]
With this code I get the number of all rows in the table.
What is the right code?
Thank you!
J
State Gender Year Top Name Occurences
0 AK F 1910 Mary 14
1 AK F 1911 Mary 12
2 AK F 1912 Mary 9
3 AK F 1913 Mary 21
4 AK F 1914 Mary 22
5 AK F 1915 Mary 23
6 AK F 1916 Mary 18
7 AK F 1917 Mary 21
8 AK F 1918 Mary 27
I want to see only one column with the names unique
this is my code:
[python[import pandas as pd
babynames = pd.read_csv('TopBabyNamesbyState.csv')
babynames = pd.unique(pd.Series(['Top Name']))
print(babynames)[/python]
With this code I get the number of all rows in the table.
What is the right code?
Thank you!
J