Skip to content
Snippets Groups Projects
Commit 2f4da7d8 authored by Nischol Antao's avatar Nischol Antao
Browse files

Obtained the Answer to Question 1 in Pandas. Also added a fun aside for...

Obtained the Answer to Question 1 in Pandas. Also added a fun aside for tracking the Most_Frequent_Player_Birthdays
parent 846f857a
No related branches found
No related tags found
No related merge requests found
1
\ No newline at end of file
,,birthCountry,birthCountry,birthCountry,birthCountry,playerID,playerID,playerID,playerID
,,count,unique,top,freq,count,unique,top,freq
birthMonth,birthDay,,,,,,,,
1.0,1.0,58,6,USA,51,58,58,rothgcl01,1
1.0,2.0,52,2,USA,50,52,52,ruberso01,1
1.0,3.0,58,5,USA,51,58,58,sullijo07,1
1.0,4.0,53,7,USA,42,53,53,sizemsc01,1
1.0,5.0,68,6,USA,62,68,68,gantnji01,1
1.0,6.0,57,6,USA,52,57,57,staigro01,1
1.0,7.0,60,7,USA,49,61,61,grubefr01,1
1.0,8.0,56,6,USA,48,56,56,suttebr01,1
1.0,9.0,47,4,USA,39,47,47,stancch01,1
1.0,10.0,53,9,USA,42,53,53,chambcl01,1
1.0,11.0,48,5,USA,41,48,48,berryne01,1
1.0,12.0,57,7,USA,51,57,57,hudsona01,1
1.0,13.0,50,5,USA,45,50,50,drakeol01,1
1.0,14.0,47,5,USA,43,47,47,piscost01,1
1.0,15.0,43,5,USA,37,43,43,solaito01,1
1.0,16.0,59,5,USA,54,59,59,watsojo01,1
1.0,17.0,56,4,USA,52,56,56,jordata01,1
1.0,18.0,45,4,USA,37,45,45,mcguimi01,1
1.0,19.0,53,8,USA,44,53,53,dowelke01,1
1.0,20.0,49,8,USA,36,49,49,rodrijo03,1
1.0,21.0,59,4,USA,54,59,59,adamsri02,1
1.0,22.0,37,7,USA,29,37,37,valdejo01,1
1.0,23.0,55,6,USA,48,55,55,obandsh01,1
1.0,24.0,54,7,USA,47,54,54,dicksjo01,1
1.0,25.0,43,8,USA,36,43,43,turnbde01,1
1.0,26.0,47,6,USA,37,47,47,frazilo01,1
1.0,27.0,52,4,USA,47,52,52,borkobo01,1
1.0,28.0,56,6,USA,47,56,56,burrial01,1
1.0,29.0,43,6,USA,38,43,43,edmonbr01,1
1.0,30.0,41,4,USA,37,41,41,shanldo01,1
1.0,31.0,59,4,USA,53,59,59,hendrti01,1
2.0,1.0,58,4,USA,47,58,58,selleju01,1
2.0,2.0,58,4,USA,53,58,58,sarmima01,1
2.0,3.0,40,5,USA,36,40,40,mauner01,1
2.0,4.0,44,7,USA,37,44,44,creelke01,1
2.0,5.0,38,5,USA,32,38,38,rodriro01,1
2.0,6.0,41,3,USA,38,41,41,longda02,1
2.0,7.0,57,5,USA,46,57,57,reillba01,1
2.0,8.0,44,6,USA,39,44,44,dillast01,1
2.0,9.0,53,6,USA,45,53,53,robelto01,1
2.0,10.0,69,11,USA,56,69,69,hemanru01,1
2.0,11.0,43,4,USA,40,43,43,mabeuch01,1
2.0,12.0,63,4,USA,58,63,63,beswiji01,1
2.0,13.0,65,6,USA,60,65,65,fitzbch01,1
2.0,14.0,52,10,USA,41,52,52,clemepa02,1
2.0,15.0,54,8,USA,41,54,54,joneste02,1
2.0,16.0,49,4,USA,43,49,49,scheija01,1
2.0,17.0,44,3,USA,42,44,44,machami01,1
2.0,18.0,55,5,USA,48,55,55,riosal01,1
2.0,19.0,43,4,USA,40,43,43,mooreja01,1
2.0,20.0,53,5,USA,46,53,53,hirshja01,1
2.0,21.0,44,3,USA,39,44,44,remneal01,1
2.0,22.0,66,5,USA,59,66,66,jesseda01,1
2.0,23.0,46,7,USA,38,46,46,hulswru01,1
2.0,24.0,49,8,USA,39,49,49,moorega01,1
2.0,25.0,55,5,USA,50,55,55,riegeel01,1
2.0,26.0,48,5,USA,44,48,48,towerjo01,1
2.0,27.0,41,9,USA,30,41,41,spande01,1
2.0,28.0,48,6,USA,42,48,48,wohlfji01,1
2.0,29.0,13,2,USA,12,13,13,mingost01,1
3.0,1.0,48,5,USA,43,48,48,boonege01,1
3.0,2.0,52,5,USA,48,52,52,wheelri01,1
3.0,3.0,52,6,USA,45,52,52,barnesk01,1
3.0,4.0,64,6,USA,56,64,64,graylo01,1
3.0,5.0,57,9,USA,47,57,57,crandde01,1
3.0,6.0,42,6,USA,34,42,42,hannage01,1
3.0,7.0,49,4,USA,45,49,49,richajr01,1
3.0,8.0,47,4,USA,42,47,47,lukasma01,1
3.0,9.0,52,6,USA,46,52,52,quinlfr01,1
3.0,10.0,53,3,USA,51,53,53,sullimi01,1
3.0,11.0,45,6,USA,36,45,45,ruary01,1
3.0,12.0,66,5,USA,60,66,66,delaceu01,1
3.0,13.0,57,7,USA,48,57,57,staehma01,1
3.0,14.0,49,4,USA,44,49,49,murdowi01,1
3.0,15.0,50,4,USA,46,50,50,kingne01,1
3.0,16.0,50,5,USA,44,50,50,wanerll01,1
3.0,17.0,41,5,USA,34,41,41,gomezpa01,1
3.0,18.0,50,5,USA,43,50,50,wrighru01,1
3.0,19.0,35,4,USA,31,35,35,messebo01,1
3.0,20.0,57,4,USA,54,57,57,parkeri01,1
3.0,21.0,43,4,USA,36,43,43,perrybo01,1
3.0,22.0,53,5,USA,47,53,53,soltemo01,1
3.0,23.0,44,4,USA,39,44,44,smootho01,1
3.0,24.0,48,5,USA,39,48,48,karsast01,1
3.0,25.0,50,5,USA,45,50,50,mazzile01,1
3.0,26.0,45,5,USA,39,45,45,klugmjo01,1
3.0,27.0,53,5,USA,48,53,53,ruthvdi01,1
3.0,28.0,37,4,USA,34,37,37,melanma01,1
3.0,29.0,50,5,USA,42,50,50,youngcy01,1
3.0,30.0,37,5,USA,31,37,37,baldwda01,1
3.0,31.0,42,6,USA,34,42,42,pfeffbi01,1
4.0,1.0,50,6,USA,43,50,50,bradlge02,1
4.0,2.0,49,6,USA,43,49,49,radatdi01,1
4.0,3.0,49,5,USA,43,49,49,gasparo01,1
4.0,4.0,55,5,USA,48,55,55,nunezre01,1
4.0,5.0,38,7,USA,30,38,38,delarjo01,1
4.0,6.0,43,4,USA,40,43,43,amarial01,1
4.0,7.0,44,5,USA,39,44,44,sandoda01,1
4.0,8.0,68,6,USA,57,68,68,daniepe01,1
4.0,9.0,48,7,USA,40,48,48,frankfr02,1
4.0,10.0,55,4,USA,52,55,55,wolffro01,1
4.0,11.0,55,7,USA,45,55,55,scarsst01,1
4.0,12.0,59,5,USA,52,59,59,oneilmi02,1
4.0,13.0,43,3,USA,41,43,43,chambwe01,1
4.0,14.0,52,3,USA,48,52,52,hoovepa01,1
4.0,15.0,40,6,USA,34,40,40,danksjo01,1
4.0,16.0,47,7,USA,41,47,47,lonboji01,1
4.0,17.0,40,7,USA,33,40,40,fuchsju99,1
4.0,18.0,52,5,USA,45,52,52,madrial01,1
4.0,19.0,52,7,USA,43,52,52,maynebr01,1
4.0,20.0,48,6,USA,43,48,48,hollato01,1
4.0,21.0,43,3,USA,40,43,43,reinewa01,1
4.0,22.0,43,3,USA,40,43,43,burksa01,1
4.0,23.0,41,8,USA,32,41,41,harmoch01,1
4.0,24.0,40,6,USA,35,40,40,worthre01,1
4.0,25.0,59,6,USA,52,59,59,espinda01,1
4.0,26.0,51,7,USA,43,51,51,wendljo01,1
4.0,27.0,46,3,USA,41,46,46,slaugen01,1
4.0,28.0,44,6,USA,33,44,44,hurstbi01,1
4.0,29.0,52,5,USA,44,52,52,houseto01,1
4.0,30.0,32,2,USA,30,32,32,cahiljo01,1
5.0,1.0,43,8,USA,33,43,43,whitebi02,1
5.0,2.0,33,6,USA,26,34,34,bressed01,1
5.0,3.0,36,3,USA,34,36,36,dreifda01,1
5.0,4.0,48,4,USA,43,48,48,babinch01,1
5.0,5.0,46,6,USA,39,46,46,paganjo01,1
5.0,6.0,52,7,USA,42,52,52,stemmbi01,1
5.0,7.0,35,5,USA,31,35,35,dysonsa01,1
5.0,8.0,34,5,USA,28,34,34,broutda01,1
5.0,9.0,56,3,USA,53,56,56,sutkogl01,1
5.0,10.0,54,5,USA,45,54,54,cumbejo01,1
5.0,11.0,43,5,USA,37,43,43,vaughpo01,1
5.0,12.0,57,5,USA,52,57,57,dawkitr01,1
5.0,13.0,58,7,USA,51,58,58,mcgeaja01,1
5.0,14.0,47,6,USA,41,47,47,lawrebr02,1
5.0,15.0,47,5,USA,41,47,47,matthda01,1
5.0,16.0,39,5,USA,35,39,39,pattebo01,1
5.0,17.0,40,5,USA,32,40,40,norrile01,1
5.0,18.0,49,6,USA,41,49,49,coangi01,1
5.0,19.0,49,6,USA,44,49,49,fussech01,1
5.0,20.0,51,6,USA,41,51,51,grantge01,1
5.0,21.0,54,4,USA,50,54,54,regalru01,1
5.0,22.0,48,7,USA,39,48,48,mccarto02,1
5.0,23.0,56,6,USA,48,56,56,millebi01,1
5.0,24.0,59,8,USA,48,59,59,burnsde01,1
5.0,25.0,60,8,USA,49,60,60,wickebo01,1
5.0,26.0,43,4,USA,39,43,43,lathach01,1
5.0,27.0,41,7,USA,34,41,41,jahajo01,1
5.0,28.0,46,6,USA,37,46,46,olivele01,1
5.0,29.0,38,3,USA,36,38,38,rosentr01,1
5.0,30.0,42,5,USA,36,42,42,kimmiwa01,1
5.0,31.0,29,4,USA,22,29,29,loftoke01,1
6.0,1.0,51,5,USA,46,51,51,templch01,1
6.0,2.0,46,6,USA,40,46,46,valdere01,1
6.0,3.0,42,7,USA,33,42,42,dwyerji01,1
6.0,4.0,48,5,USA,44,48,48,aylwadi01,1
6.0,5.0,47,3,USA,44,47,47,jacobbe01,1
6.0,6.0,53,10,USA,42,53,53,devliji01,1
6.0,7.0,44,4,USA,40,44,44,chalmge01,1
6.0,8.0,48,5,USA,42,48,48,clarkwe01,1
6.0,9.0,43,4,USA,39,43,43,fontemi01,1
6.0,10.0,46,5,USA,39,46,46,henryea01,1
6.0,11.0,39,5,USA,33,39,39,koellbr01,1
6.0,12.0,41,6,USA,36,41,41,mottbi01,1
6.0,13.0,42,4,USA,37,42,42,diggibe01,1
6.0,14.0,42,3,USA,39,42,42,watkiha99,1
6.0,15.0,55,3,USA,53,55,55,hurleje01,1
6.0,16.0,48,6,USA,42,48,48,rauchbo01,1
6.0,17.0,39,5,USA,34,39,39,tatest01,1
6.0,18.0,39,5,USA,32,39,39,mccarto03,1
6.0,19.0,47,8,USA,38,47,47,mientdo01,1
6.0,20.0,48,8,USA,40,48,48,gwosddo01,1
6.0,21.0,33,6,USA,26,33,33,marteje01,1
6.0,22.0,47,5,USA,42,47,47,kawakke01,1
6.0,23.0,40,3,USA,38,40,40,clausal01,1
6.0,24.0,38,3,USA,36,38,38,freemsa01,1
6.0,25.0,41,5,USA,35,41,41,gelnajo01,1
6.0,26.0,41,5,USA,36,41,41,dukesel01,1
6.0,27.0,50,5,USA,44,50,50,davenlu01,1
6.0,28.0,53,6,USA,47,53,53,mcglike01,1
6.0,29.0,56,5,USA,48,56,56,radcljo01,1
6.0,30.0,46,6,USA,39,46,46,smithha07,1
7.0,1.0,50,4,USA,46,50,50,perezch01,1
7.0,2.0,40,8,USA,32,40,40,allenbo03,1
7.0,3.0,55,4,USA,51,55,55,tovarce01,1
7.0,4.0,52,8,USA,45,52,52,dermoma01,1
7.0,5.0,44,7,USA,38,44,44,krolja99,1
7.0,6.0,44,5,USA,38,44,44,carliwa01,1
7.0,7.0,54,4,USA,49,54,54,simmojo02,1
7.0,8.0,65,6,USA,58,65,65,moragda01,1
7.0,9.0,51,4,USA,47,51,51,blackbu01,1
7.0,10.0,46,4,USA,43,46,46,godwity01,1
7.0,11.0,40,4,USA,36,40,40,thomast01,1
7.0,12.0,50,2,USA,49,50,50,hafeyto01,1
7.0,13.0,47,7,USA,40,47,47,winero01,1
7.0,14.0,55,5,USA,48,55,55,westma01,1
7.0,15.0,59,5,USA,52,59,59,mccoyar01,1
7.0,16.0,40,2,USA,39,40,40,allisbi01,1
7.0,17.0,38,3,USA,35,38,38,delabst01,1
7.0,18.0,49,6,USA,44,49,49,penara02,1
7.0,19.0,55,6,USA,47,55,55,cokeph01,1
7.0,20.0,44,4,USA,40,44,44,jenkity01,1
7.0,21.0,53,9,USA,44,53,53,werdepe01,1
7.0,22.0,47,5,USA,42,47,47,chavean02,1
7.0,23.0,45,3,USA,42,45,45,stankjo01,1
7.0,24.0,38,6,USA,31,38,38,pilledu01,1
7.0,25.0,40,8,USA,28,40,40,riggash01,1
7.0,26.0,53,5,USA,48,53,53,thomale02,1
7.0,27.0,59,6,USA,51,59,59,medinyo01,1
7.0,28.0,32,3,USA,30,32,32,paronch01,1
7.0,29.0,47,3,USA,43,47,47,jokiser01,1
7.0,30.0,48,4,USA,45,48,48,witteje01,1
7.0,31.0,55,5,USA,51,55,55,foxte01,1
8.0,1.0,49,6,USA,43,49,49,andersc01,1
8.0,2.0,47,9,USA,37,47,47,sinclst01,1
8.0,3.0,47,4,USA,44,47,47,meyerda01,1
8.0,4.0,74,7,USA,65,74,74,surhobj01,1
8.0,5.0,53,4,USA,48,53,53,lukoned01,1
8.0,6.0,57,3,USA,53,57,57,sturgbo01,1
8.0,7.0,57,7,USA,50,57,57,grayji01,1
8.0,8.0,56,4,USA,52,56,56,esmonji01,1
8.0,9.0,61,5,USA,56,61,61,huntebu01,1
8.0,10.0,57,5,USA,52,57,57,mertzji01,1
8.0,11.0,54,6,USA,43,54,54,coopeca01,1
8.0,12.0,56,10,USA,45,56,56,lathrbi01,1
8.0,13.0,61,4,USA,57,61,61,patteco01,1
8.0,14.0,47,7,USA,40,47,47,horlejo01,1
8.0,15.0,74,5,USA,64,74,74,novoaro01,1
8.0,16.0,56,8,USA,49,56,56,fothebo01,1
8.0,17.0,68,7,USA,62,68,68,neveler01,1
8.0,18.0,58,4,USA,55,58,58,cramedi01,1
8.0,19.0,56,5,USA,50,56,56,fieldjo03,1
8.0,20.0,55,5,USA,50,55,55,cecenjo01,1
8.0,21.0,66,7,USA,58,66,66,valdeis01,1
8.0,22.0,55,3,USA,52,55,55,jacksda03,1
8.0,23.0,59,6,USA,53,59,59,glasnty01,1
8.0,24.0,58,6,USA,48,58,58,waszgbj01,1
8.0,25.0,65,3,USA,63,65,65,roberra01,1
8.0,26.0,56,9,USA,42,56,56,halmagr01,1
8.0,27.0,63,4,USA,60,63,63,kellypa02,1
8.0,28.0,49,3,USA,46,49,49,witasja01,1
8.0,29.0,65,4,USA,61,65,65,akejo01,1
8.0,30.0,67,4,USA,63,67,67,millebi02,1
8.0,31.0,70,6,USA,60,70,70,ehretre01,1
9.0,1.0,51,4,USA,45,51,51,robintr01,1
9.0,2.0,51,5,USA,46,51,51,thomami01,1
9.0,3.0,51,3,USA,49,51,51,goeckbi01,1
9.0,4.0,55,4,USA,51,55,55,wrighke01,1
9.0,5.0,62,4,USA,56,62,62,carribi01,1
9.0,6.0,51,5,USA,46,51,51,gilbepe01,1
9.0,7.0,58,7,USA,49,58,58,sullile01,1
9.0,8.0,47,6,USA,42,47,47,wiseca01,1
9.0,9.0,56,5,USA,51,56,56,stronjo01,1
9.0,10.0,51,4,USA,48,51,51,robbibr01,1
9.0,11.0,50,4,USA,47,50,50,spencgl01,1
9.0,12.0,60,6,USA,52,60,60,johnsma02,1
9.0,13.0,55,5,USA,50,55,55,wiseri01,1
9.0,14.0,42,3,USA,40,42,42,fanniji01,1
9.0,15.0,57,6,USA,52,57,57,carrido01,1
9.0,16.0,60,6,USA,55,60,60,raineti01,1
9.0,17.0,59,4,USA,56,59,59,sudhowi01,1
9.0,18.0,47,4,USA,44,47,47,scottto01,1
9.0,19.0,62,5,USA,57,62,62,clarkca01,1
9.0,20.0,43,4,USA,40,43,43,snopech01,1
9.0,21.0,59,6,USA,48,59,59,ariasjo01,1
9.0,22.0,70,6,USA,62,70,70,jimerch01,1
9.0,23.0,49,4,USA,41,49,49,martido01,1
9.0,24.0,61,6,USA,52,61,61,gilbrro01,1
9.0,25.0,55,6,USA,48,55,55,schluno01,1
9.0,26.0,50,3,USA,48,50,50,shantbo01,1
9.0,27.0,53,5,USA,49,53,53,langma01,1
9.0,28.0,73,8,USA,61,73,73,jennibi01,1
9.0,29.0,58,7,USA,52,58,58,stewagl01,1
9.0,30.0,55,7,USA,46,55,55,fritzha01,1
10.0,1.0,48,5,USA,43,48,48,sterrdu01,1
10.0,2.0,58,5,USA,51,58,58,womacsi01,1
10.0,3.0,59,7,USA,52,59,59,cordewi01,1
10.0,4.0,69,3,USA,66,69,69,scalebo01,1
10.0,5.0,49,5,USA,42,49,49,chadwhe99,1
10.0,6.0,68,6,USA,59,68,68,zamloca01,1
10.0,7.0,57,4,USA,54,57,57,donnefr01,1
10.0,8.0,61,6,USA,56,61,61,willibe01,1
10.0,9.0,55,3,USA,50,55,55,gibrast01,1
10.0,10.0,60,5,USA,51,60,60,gordodo01,1
10.0,11.0,48,5,USA,42,48,48,willich01,1
10.0,12.0,64,6,USA,55,64,64,moriaed01,1
10.0,13.0,57,2,USA,56,57,57,crabtti01,1
10.0,14.0,64,7,USA,51,64,64,kellypa03,1
10.0,15.0,49,4,USA,44,49,49,cruzju02,1
10.0,16.0,52,5,USA,46,52,52,mastepa01,1
10.0,17.0,57,4,USA,48,57,57,almonhe01,1
10.0,18.0,62,5,USA,57,62,62,loberha01,1
10.0,19.0,60,7,USA,52,60,60,austije01,1
10.0,20.0,42,5,USA,34,42,42,blachty01,1
10.0,21.0,50,7,USA,42,50,50,stubbfr01,1
10.0,22.0,52,6,USA,45,52,52,thomabr01,1
10.0,23.0,46,4,USA,39,46,46,bunniji01,1
10.0,24.0,60,6,USA,50,60,60,ziemst01,1
10.0,25.0,62,6,USA,53,62,62,lowerte01,1
10.0,26.0,59,3,USA,54,59,59,gogolbi01,1
10.0,27.0,59,8,USA,49,59,59,jacksja01,1
10.0,28.0,50,4,USA,46,50,50,tucketo01,1
10.0,29.0,42,5,USA,36,42,42,romerma01,1
10.0,30.0,66,8,USA,56,66,66,mccargr01,1
10.0,31.0,57,5,USA,52,57,57,freisda01,1
11.0,1.0,59,8,USA,46,59,59,comptcl01,1
11.0,2.0,56,10,USA,45,56,56,sullijo06,1
11.0,3.0,51,6,USA,45,51,51,mccorji01,1
11.0,4.0,60,6,USA,53,60,60,bailema01,1
11.0,5.0,57,5,USA,46,57,57,sheehto01,1
11.0,6.0,52,5,USA,45,52,52,munsojo01,1
11.0,7.0,54,5,USA,44,54,54,hattejo01,1
11.0,8.0,39,5,USA,32,39,39,alfoned01,1
11.0,9.0,63,5,USA,59,63,63,damicje02,1
11.0,10.0,60,3,USA,55,60,60,carnejo01,1
11.0,11.0,59,7,USA,52,59,59,elliogl01,1
11.0,12.0,45,5,USA,39,45,45,reedbi01,1
11.0,13.0,56,5,USA,49,56,56,priceja01,1
11.0,14.0,38,10,USA,26,38,38,kutynma01,1
11.0,15.0,56,5,USA,52,56,56,paynemi01,1
11.0,16.0,50,6,USA,43,50,50,malliro01,1
11.0,17.0,58,4,USA,53,58,58,sorrepa01,1
11.0,18.0,77,5,USA,71,77,77,moyerja01,1
11.0,19.0,51,7,USA,45,51,51,harmabr01,1
11.0,20.0,57,4,USA,53,57,57,ritchja01,1
11.0,21.0,52,5,USA,47,52,52,wilsoga02,1
11.0,22.0,44,5,USA,38,44,44,wardco01,1
11.0,23.0,65,4,USA,60,65,65,cruzto02,1
11.0,24.0,53,7,USA,44,53,53,lopezjo01,1
11.0,25.0,51,7,USA,42,51,51,vernojo01,1
11.0,26.0,59,4,USA,55,59,59,walkbo01,1
11.0,27.0,38,4,USA,34,38,38,bevillo01,1
11.0,28.0,53,6,USA,45,53,53,westma02,1
11.0,29.0,49,6,USA,43,49,49,beltrfr01,1
11.0,30.0,46,5,USA,40,46,46,jennial01,1
12.0,1.0,53,7,USA,46,53,53,jordani01,1
12.0,2.0,39,4,USA,34,39,39,tayloha05,1
12.0,3.0,57,8,USA,49,57,57,putnapa01,1
12.0,4.0,52,6,USA,43,52,52,infanal01,1
12.0,5.0,57,6,USA,51,57,57,lewissc01,1
12.0,6.0,49,5,USA,44,49,49,hyzduad01,1
12.0,7.0,46,5,USA,39,46,46,riversa01,1
12.0,8.0,45,7,USA,39,45,45,thoneja01,1
12.0,9.0,53,4,USA,49,53,53,browncu01,1
12.0,10.0,63,5,USA,52,63,63,hehlja01,1
12.0,11.0,51,3,USA,47,51,51,blancda01,1
12.0,12.0,37,6,USA,30,37,37,thomago01,1
12.0,13.0,51,4,USA,46,51,51,wilsost01,1
12.0,14.0,59,7,USA,53,59,59,lawrebo01,1
12.0,15.0,42,4,USA,36,42,42,leylaji99,1
12.0,16.0,46,3,USA,43,46,46,biancto01,1
12.0,17.0,52,6,USA,42,52,52,vogelda01,1
12.0,18.0,49,5,USA,45,49,49,baxesmi01,1
12.0,19.0,61,7,USA,53,61,61,baislje01,1
12.0,20.0,55,6,USA,49,55,55,mutisje01,1
12.0,21.0,60,5,USA,55,60,60,teagata01,1
12.0,22.0,56,5,USA,51,56,56,underto01,1
12.0,23.0,60,5,USA,51,60,60,lidgebr01,1
12.0,24.0,40,6,USA,32,40,40,adamsri01,1
12.0,25.0,66,7,USA,57,66,66,jonesji01,1
12.0,26.0,55,5,USA,47,55,55,boscajc01,1
12.0,27.0,45,3,USA,43,45,45,klausbo01,1
12.0,28.0,35,5,USA,30,35,35,brougca01,1
12.0,29.0,40,6,USA,34,40,40,davisbr03,1
12.0,30.0,40,7,USA,34,40,40,vioxji01,1
12.0,31.0,38,6,USA,29,38,38,byrneto01,1
#-------------------------------------------------------------------------------
# Name: Q1_Player_Country_Origins
# Purpose: Find Which Countries produce the most major league baseball players
#
# Author: antaonn
#
# Created: 16/04/2018
# Copyright: (c) antaonn 2018
# Licence: <your licence>
#-------------------------------------------------------------------------------
import os.path
import pandas as pd
# This is only needed for the Local Folder Structure in the project
my_path = os.path.abspath(os.path.dirname(__file__))
masterpath = os.path.join(my_path, "../data/Master.csv")
fieldingpath = os.path.join(my_path, "../data/Fielding.csv")
# Create Data Frames for Salary Table and Team Table
df_master = pd.read_csv(masterpath)
df_field = pd.read_csv(fieldingpath)
# From the Fielding Database extract a single entry for a player for a given year
df_field_filt = df_field.filter(items=['playerID', 'yearID']).drop_duplicates()
#print df_field_filt
# For Fun find the most frequent and least frequent birthdays of all MLB Players
# From the Master Player Database extract the country of birth for every player
##df_master_filt = df_master.filter(items=['playerID', 'birthCountry', 'birthMonth', 'birthDay'])
##df_master_filt.groupby(['birthMonth', 'birthDay']).describe().to_csv('Birthday.csv')
# From the Master Player Database extract the country of birth for every player
df_master_filt = df_master.filter(items=['playerID', 'birthCountry'])
#print df_master_filt
# Merge Databases so we get country of origin
merge_master_field = df_field_filt.merge(df_master_filt).sort_values('yearID')
#print merge
merge_master_field_filt = merge_master_field.filter(items=['yearID', 'birthCountry'])
yearlist = merge_master_field_filt.yearID.unique()
for year in yearlist:
merge_master_field_filt_year = merge_master_field_filt[(merge_master_field_filt.yearID == year)]
yearlycountrylist = merge_master_field_filt_year.birthCountry.unique()
for country in yearlycountrylist:
print (year, country, merge_master_field_filt_year[(merge_master_field_filt_year.birthCountry == country)]['birthCountry'].count())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment