Most Popular Baby Names in New York πΆ
Most Popular Baby Names in New York πΆ
From the Social Security Administration.
import pandas as pd
df = pd.read_csv('/home/andy/Desktop/NY.TXT',header=None)
pt=df.pivot_table(index=2, columns=3, aggfunc='sum').droplevel(0,axis=1).fillna(0)
z = pt.T
z=((z/z.sum())*100).fillna(0).T
z.idxmax(axis=1).to_csv('/home/andy/Desktop/mostpop.csv')
1910 | Mary | 1920 | John | 1940 | Robert | 1960 | Michael | 1980 | Michael | 2000 | Michael |
1911 | Mary | 1921 | John | 1941 | Robert | 1961 | Michael | 1981 | Michael | 2001 | Michael |
1912 | Mary | 1922 | John | 1942 | Robert | 1962 | Michael | 1982 | Michael | 2002 | Michael |
1913 | Mary | 1923 | John | 1943 | Robert | 1963 | Michael | 1983 | Michael | 2003 | Michael |
1914 | John | 1924 | John | 1944 | Robert | 1964 | John | 1984 | Michael | 2004 | Michael |
1915 | Mary | 1925 | John | 1945 | Robert | 1965 | Michael | 1985 | Michael | 2005 | Michael |
1916 | Mary | 1926 | John | 1946 | Robert | 1966 | Michael | 1986 | Michael | 2006 | Michael |
1917 | John | 1927 | John | 1947 | Robert | 1967 | Michael | 1987 | Michael | 2007 | Michael |
1918 | John | 1928 | John | 1948 | Robert | 1968 | Michael | 1988 | Michael | 2008 | Michael |
1919 | John | 1929 | John | 1949 | Robert | 1969 | Michael | 1989 | Michael | 2009 | Michael |
1930 | John | 1950 | Robert | 1970 | Michael | 1990 | Michael | 2010 | Isabella | ||
1931 | Robert | 1951 | Robert | 1971 | Michael | 1991 | Michael | 2011 | Michael | ||
1932 | John | 1952 | Robert | 1972 | Michael | 1992 | Michael | 2012 | Sophia | ||
1933 | John | 1953 | Robert | 1973 | Michael | 1993 | Michael | 2013 | Sophia | ||
1934 | Robert | 1954 | Robert | 1974 | Michael | 1994 | Michael | 2014 | Jacob | ||
1935 | Robert | 1955 | Robert | 1975 | Michael | 1995 | Michael | 2015 | Liam | ||
1936 | Robert | 1956 | Michael | 1976 | Michael | 1996 | Michael | 2016 | Liam | ||
1937 | Robert | 1957 | Michael | 1977 | Michael | 1997 | Michael | 2017 | Liam | ||
1938 | Robert | 1958 | Michael | 1978 | Michael | 1998 | Michael | 2018 | Liam | ||
1939 | Robert | 1959 | John | 1979 | Michael | 1999 | Michael | 2019 | Liam | ||
2020 | Liam |