2016 NHL Hockey Data Set - Sasha Kandrach


In [1]:
import pandas as pd 
import matplotlib.pyplot as plt 
%matplotlib inline

In [215]:
df= pd.read_excel("NHL 2014-15.xls")

In [6]:
!pip install xlrd


Requirement already satisfied (use --upgrade to upgrade): xlrd in /Users/skkandrach/.virtualenvs/lede/lib/python3.5/site-packages

In [50]:
df.columns.value_counts()


Out[50]:
DOB               1
GvA               1
Sh                1
OTA               1
SRA GAR           1
Cap Cost          1
Misses            1
Minor             1
Ginj              1
Grit              1
MsS               1
HitF              1
End Team          1
GVT/60            1
S/P               1
G                 1
IPP               1
OTGP              1
FO%               1
HF/60             1
Days              1
PST               1
GWG               1
Blocked           1
OGVT              1
B/60              1
OPS               1
dFenwick60        1
PS/60             1
dCFImpact         1
                 ..
Misc              1
PTS               1
Ctry              1
dFenwickImpact    1
Teams             1
DPS               1
dFFImpact         1
+/-               1
dCorsi60          1
Nat               1
dCorsiImpact      1
OGIT              1
TOI/G             1
Last Name         1
Sh GAR            1
CoSH%             1
PSG               1
First Name        1
G/60              1
DIT               1
SOS               1
PS                1
HitA              1
Pos               1
HT                1
Wt                1
Draft             1
3rd Star          1
Rk                1
1G                1
dtype: int64

Here's all of our data:


In [8]:
df.head()


Out[8]:
# DOB Birth City S/P Ctry Nat HT Wt S Draft ... dFAImpact dFenwickImpact dFenwick60 Days Ginj Injury Cap Cost CHIP Bonuses GVS
0 8.0 Feb 25 '87 Muskegon MI USA US 74 218 L 2005.0 ... -49.38 -9.36 -0.60 186 11.0 Hand, Shoulder 1.800 0.088 0.0 5.340426
1 41.0 Jul 16 '87 Edina MN USA US 75 202 L NaN ... -6.27 10.41 22.57 29 NaN NaN 0.106 0.000 0.0 -0.443079
2 25.0 Jun 18 '90 St. John's NL CAN CA 74 206 L 2008.0 ... -4.07 0.95 3.33 5 NaN NaN 0.017 0.000 0.0 -0.104713
3 27.0 Apr 26 '77 Seria NaN BRN NaN 72 200 R 1996.0 ... -1.23 -19.42 -2.36 186 5.0 Undisclosed 0.700 0.043 0.0 0.980851
4 32.0 Jan 03 '91 Kleinburg ON CAN CA 70 187 L NaN ... 1.05 0.41 2.26 2 NaN NaN 0.006 0.000 0.0 0.299817

5 rows × 120 columns

Here are each of the columns in the data set:


In [304]:
df.columns


Out[304]:
Index(['#', 'DOB', 'Birth City', 'S/P', 'Ctry', 'Nat', 'HT', 'Wt', 'S',
       'Draft',
       ...
       'dFenwickImpact', 'dFenwick60', 'Days', 'Ginj', 'Injury', 'Cap Cost',
       'CHIP', 'Bonuses', 'GVS', 'birthyear'],
      dtype='object', length=121)

Let's count how many players are from each country:


In [11]:
df['Ctry'].value_counts().head(10)


Out[11]:
CAN    453
USA    222
SWE     64
CZE     33
RUS     29
FIN     25
SVK     11
CHE     10
DEU      9
DNK      7
Name: Ctry, dtype: int64

Let's count how many players are from each country: they're basically the same but in some cases are slightly different


In [12]:
df['Nat'].value_counts().head(10)


Out[12]:
CA    454
US    221
SE     64
CZ     33
RU     30
FI     25
SK     11
CH     10
DE      8
DK      7
Name: Nat, dtype: int64

And now let's look at the top ten highest birth cities


In [10]:
df['Birth City'].value_counts().head(10)


Out[10]:
Toronto        33
Edmonton       25
Winnipeg       15
Ottawa         14
Calgary        12
Montreal       11
Stockholm      10
Mississauga    10
London          9
Minneapolis     8
Name: Birth City, dtype: int64

Let's look at how many of those Toronto-born players were drafted before 2006


In [14]:
df[(df['Birth City'] == 'Toronto') & (df['Draft'] < 2006.0)].head()


Out[14]:
# DOB Birth City S/P Ctry Nat HT Wt S Draft ... dFAImpact dFenwickImpact dFenwick60 Days Ginj Injury Cap Cost CHIP Bonuses GVS
60 46.0 Dec 15 '86 Toronto ON CAN CA 76 216 R 2005.0 ... 0.15 -3.56 -10.64 5 NaN NaN 0.016 0.000 0.0 -0.202585
113 23.0 Jun 08 '82 Toronto ON CAN CA 69 190 L 2001.0 ... 33.61 -78.72 -4.99 186 14.0 Illness, Jaw, Lower body, Upper body 5.000 0.122 0.0 0.031915
142 16.0 Apr 25 '87 Toronto ON CAN CA 70 207 L 2005.0 ... 1.00 -2.48 -26.62 21 NaN NaN 0.096 0.000 0.0 -0.072135
145 7.0 Jun 14 '87 Toronto ON CAN CA 70 184 L 2005.0 ... 12.05 -22.59 -1.36 186 NaN NaN 3.000 0.000 0.0 1.187234
146 26.0 Jan 27 '83 Toronto ON CAN CA 73 200 L 2001.0 ... -42.93 73.10 8.63 164 1.0 Flu 0.551 0.008 0.0 1.959460

5 rows × 120 columns

Let's look at how many of those Edmonton-born players were drafted before 2006


In [307]:
df[(df['Birth City'] == 'Edmonton') & (df['Draft'] < 2006.0)].head()


Out[307]:
# DOB Birth City S/P Ctry Nat HT Wt S Draft ... dFenwickImpact dFenwick60 Days Ginj Injury Cap Cost CHIP Bonuses GVS birthyear
80 19.0 Sep 27 '83 Edmonton AB CAN CA 76 212 L 2002.0 ... -56.56 -2.73 186 10.0 Flu, Groin 5.400 0.132 0.0 -6.219149 83
82 55.0 Jan 19 '84 Edmonton AB CAN CA 74 225 R 2002.0 ... 114.43 5.87 186 10.0 Lower body, Upper body 3.367 0.041 0.0 4.006383 84
130 25.0 May 02 '79 Edmonton AB CAN CA 75 213 L 1997.0 ... -67.64 -4.82 186 NaN NaN 2.000 0.000 0.0 -1.285106 79
224 29.0 Apr 03 '82 Edmonton AB CAN CA 74 215 R 2000.0 ... -16.22 -0.95 186 4.0 Illness, Lower body 2.917 0.036 0.0 -4.436170 82
240 21.0 Mar 17 '79 Edmonton AB CAN CA 71 184 L 1997.0 ... -87.87 -4.54 186 9.0 Concussion 3.250 0.357 0.0 -3.044681 79

5 rows × 121 columns

Let's look at how many of those Minneapolis-born players were drafted before 2006


In [20]:
df[(df['Birth City'] == 'Minneapolis') & (df['Draft'] < 2006.0)].head()


Out[20]:
# DOB Birth City S/P Ctry Nat HT Wt S Draft ... dFAImpact dFenwickImpact dFenwick60 Days Ginj Injury Cap Cost CHIP Bonuses GVS
22 42.0 May 01 '84 Minneapolis MN USA US 75 221 R 2003.0 ... 20.59 0.67 0.04 186 1.0 Concussion 4.500 0.055 0.0 4.295745
503 7.0 Mar 05 '81 Minneapolis MN USA US 73 200 L 2000.0 ... -23.59 6.78 0.32 186 8.0 Undisclosed 5.000 0.488 0.0 -1.068085
542 39.0 Jan 09 '84 Minneapolis MN USA US 73 190 L 2004.0 ... -15.11 10.19 9.43 26 NaN NaN 0.077 0.000 0.0 -0.100252
606 11.0 Jul 28 '84 Minneapolis MN USA US 71 197 L 2003.0 ... 23.85 -40.65 -2.28 186 6.0 Concussion, Soreness 7.538 0.460 0.0 2.431915

4 rows × 120 columns

Concussions...that's always a fun topic. Let's look at the players from each country that reported a concussion. We'll start with the United States:


In [98]:
usa_concussion = df[(df['Ctry'] == 'USA') & (df['Injury'] == 'Concussion')]

In [99]:
usa_concussion[["First Name", "Last Name"]]


Out[99]:
First Name Last Name
22 David Backes
358 Jack Hillen

Hmmm... only two reported concussions in professional hockey?! highly doubtful...let's look at the injuries that were reported as 'Undisclosed' and call them mystery injuries:


In [101]:
usa_mystery_injury = df[(df['Ctry'] == 'USA') & (df['Injury'] == 'Undisclosed')]

In [102]:
usa_mystery_injury[["First Name", "Last Name"]]


Out[102]:
First Name Last Name
295 Alex Goligoski
503 Paul Martin
631 Corey Potter
727 Drew Shore

In [61]:
us_concussion


Out[61]:
# DOB Birth City S/P Ctry Nat HT Wt S Draft ... dFAImpact dFenwickImpact dFenwick60 Days Ginj Injury Cap Cost CHIP Bonuses GVS
22 42.0 May 01 '84 Minneapolis MN USA US 75 221 R 2003.0 ... 20.59 0.67 0.04 186 1.0 Concussion 4.5 0.055 0.0 4.295745
358 38.0 Jan 24 '86 Minnetonka MN USA US 70 190 L NaN ... 28.36 -51.88 -13.89 186 19.0 Concussion 0.7 0.162 0.0 0.080851

2 rows × 120 columns

Let's look at Canada's reported concussions:


In [71]:
can_concussion = df[(df['Ctry'] == 'CAN') & (df['Injury'] == 'Concussion')]

In [72]:
can_concussion[["First Name", "Last Name"]]


Out[72]:
First Name Last Name
141 Ryane Clowe
240 Andrew Ference
241 Michael Ferland
261 Matt Fraser

Hmmm...not a lot either. Let's look at the "undisclosed" injuries that were reported:


In [103]:
can_mystery_injury = df[(df['Ctry'] == 'CAN') & (df['Injury'] == 'Undisclosed')]

In [104]:
can_mystery_injury[["First Name", "Last Name"]]


Out[104]:
First Name Last Name
48 Patrice Bergeron
64 Alexandre Bolduc
138 Marc-Andre Cliche
211 Jordan Eberle
299 Barclay Goodrow
326 Matt Halischuk
402 Nazem Kadri
412 Chris Kelly
477 Bryan Little
481 Milan Lucic
495 Brad Marchand
502 Matt Martin
515 Tye McGinn
669 Brett Ritchie
776 Ben Street
856 Patrick Wiercioch

Switzerland Concussions:


In [74]:
che_concussion = df[(df['Ctry'] == 'CHE') & (df['Injury'] == 'Concussion')]

In [111]:
che_concussion[["First Name", "Last Name"]]


Out[111]:
First Name Last Name

Switzerland "Undisclosed Injuries"


In [120]:
che_mystery_injury = df[(df['Ctry'] == 'CHE') & (df['Injury'] == 'Undisclosed')]

In [121]:
che_mystery_injury[["First Name", "Last Name"]]


Out[121]:
First Name Last Name
191 Raphael Diaz

Sweden Concussions:


In [118]:
swe_concussion = df[(df['Ctry'] == 'SWE') & (df['Injury'] == 'Concussion')]

In [82]:
swe_concussion[["First Name", "Last Name"]]


Out[82]:
First Name Last Name

Sweden "Undisclosed" Injuries


In [122]:
swe_mystery_injury = df[(df['Ctry'] == 'SWE') & (df['Injury'] == 'Undisclosed')]

In [123]:
swe_mystery_injury[["First Name", "Last Name"]]


Out[123]:
First Name Last Name

Germany Concussions:


In [83]:
deu_concussion = df[(df['Ctry'] == 'DEU') & (df['Injury'] == 'Concussion')]

In [84]:
deu_concussion[["First Name", "Last Name"]]


Out[84]:
First Name Last Name
366 Korbinian Holzer

Germany "Undisclosed" Injuries:


In [124]:
deu_mystery_injury = df[(df['Ctry'] == 'DEU') & (df['Injury'] == 'Undisclosed')]

In [125]:
deu_mystery_injury[["First Name", "Last Name"]]


Out[125]:
First Name Last Name

Czech Republic Concussions:


In [85]:
cze_concussion= df[(df['Ctry'] == 'CZE') & (df['Injury'] == 'Concussion')]

In [86]:
cze_concussion[["First Name", "Last Name"]]


Out[86]:
First Name Last Name

Czech Republic "Undisclosed Injuries"


In [126]:
cze_mystery_injury = df[(df['Ctry'] == 'CZE') & (df['Injury'] == 'Undisclosed')]

In [127]:
cze_mystery_injury[["First Name", "Last Name"]]


Out[127]:
First Name Last Name
249 Tomas Fleischmann

Russia Concussions:


In [88]:
rus_concussion = df[(df['Ctry'] == 'RUS') & (df['Injury'] == 'Concussion')]

In [89]:
rus_concussion[["First Name", "Last Name"]]


Out[89]:
First Name Last Name

Russia "Undisclosed Injuries"


In [128]:
rus_mystery_injury = df[(df['Ctry'] == 'RUS') & (df['Injury'] == 'Undisclosed')]

In [129]:
rus_mystery_injury[["First Name", "Last Name"]]


Out[129]:
First Name Last Name
794 Daniil Tarasov

Lithuania Concussions


In [94]:
ltu_concussion = df[(df['Ctry'] == 'LTU') & (df['Injury'] == 'Concussion')]

In [95]:
ltu_concussion[["First Name", "Last Name"]]


Out[95]:
First Name Last Name

Lithuania "Undisclosed Injuries"


In [130]:
ltu_mystery_injury = df[(df['Ctry'] == 'LTU') & (df['Injury'] == 'Undisclosed')]

In [132]:
ltu_mystery_injury[["First Name", "Last Name"]]


Out[132]:
First Name Last Name

Norway Concussions


In [96]:
nor_concussion = df[(df['Ctry'] == 'NOR') & (df['Injury'] == 'Concussion')]

In [97]:
nor_concussion[["First Name", "Last Name"]]


Out[97]:
First Name Last Name

Norway "Undisclosed" Injuries


In [133]:
nor_mystery_injury = df[(df['Ctry'] == 'NOR') & (df['Injury'] == 'Undisclosed')]

In [134]:
nor_mystery_injury[["First Name", "Last Name"]]


Out[134]:
First Name Last Name

In [135]:
df


Out[135]:
# DOB Birth City S/P Ctry Nat HT Wt S Draft ... dFAImpact dFenwickImpact dFenwick60 Days Ginj Injury Cap Cost CHIP Bonuses GVS
0 8.0 Feb 25 '87 Muskegon MI USA US 74 218 L 2005.0 ... -49.38 -9.36 -0.60 186 11.0 Hand, Shoulder 1.800 0.088 0.000 5.340426
1 41.0 Jul 16 '87 Edina MN USA US 75 202 L NaN ... -6.27 10.41 22.57 29 NaN NaN 0.106 0.000 0.000 -0.443079
2 25.0 Jun 18 '90 St. John's NL CAN CA 74 206 L 2008.0 ... -4.07 0.95 3.33 5 NaN NaN 0.017 0.000 0.000 -0.104713
3 27.0 Apr 26 '77 Seria NaN BRN NaN 72 200 R 1996.0 ... -1.23 -19.42 -2.36 186 5.0 Undisclosed 0.700 0.043 0.000 0.980851
4 32.0 Jan 03 '91 Kleinburg ON CAN CA 70 187 L NaN ... 1.05 0.41 2.26 2 NaN NaN 0.006 0.000 0.000 0.299817
5 42.0 Jun 03 '90 Ottawa ON CAN CA 70 190 R NaN ... 16.55 -20.56 -12.23 54 NaN NaN 0.167 0.000 0.000 -0.515580
6 6.0 Aug 21 '80 Kingston ON CAN CA 77 223 L 1998.0 ... -4.29 6.21 4.94 186 20.0 Lower body, Flu 3.022 0.854 0.000 -5.159574
7 NaN Jan 31 '90 Chicago IL USA US 73 210 L NaN ... -5.61 2.45 3.25 8 NaN NaN 0.076 0.000 0.850 -0.411370
8 39.0 Oct 18 '91 Kansas City MO USA US 76 201 R 2010.0 ... -3.12 3.85 21.90 2 NaN NaN 0.010 0.000 0.110 -0.208694
9 27.0 Sep 24 '88 Burnaby BC CAN CA 74 217 L 2007.0 ... -28.35 -17.26 -0.77 186 NaN NaN 2.800 0.000 0.000 2.412766
10 53.0 May 07 '94 Burlington ON CAN CA 75 212 R 2012.0 ... -1.63 -3.28 -2.36 11 NaN NaN 0.053 0.000 0.282 -0.543560
11 18.0 Feb 05 '89 Munkedal NaN SWE SE 74 211 L 2007.0 ... 26.23 -45.28 -4.40 186 1.0 Illness 0.733 0.009 0.000 -0.689362
12 15.0 May 17 '91 Pickering ON CAN CA 73 207 L 2011.0 ... 13.86 -37.39 -14.32 186 NaN NaN 0.550 0.000 0.000 1.000000
13 58.0 Mar 21 '93 Zurich NaN CHE CH 69 183 L 2013.0 ... 3.80 -10.55 -6.93 35 NaN NaN 0.141 0.000 0.125 -0.279799
14 15.0 Jun 27 '85 Woodbridge ON CAN CA 73 212 L NaN ... -1.15 -4.45 -11.43 8 NaN NaN 0.028 0.000 0.000 -0.009243
15 42.0 May 24 '88 Yaroslavl NaN RUS RU 76 198 L 2006.0 ... -33.36 63.66 6.07 186 30.0 Arm, Concussion 3.283 0.921 0.000 -2.814894
16 36.0 Aug 12 '88 Milford CT USA US 68 172 R NaN ... -14.43 23.20 9.94 186 NaN NaN 0.601 0.000 0.000 5.491489
17 33.0 May 31 '93 Pori NaN FIN FI 75 192 R 2011.0 ... -2.40 -1.27 -5.21 1 NaN NaN 0.007 0.000 0.700 -0.008602
18 38.0 Apr 08 '93 Skellefteå NaN SWE SE 69 172 R 2014.0 ... -4.01 -2.54 -2.48 12 NaN NaN 0.042 0.000 0.035 -0.213864
19 37.0 Apr 01 '91 Winnipeg MB CAN CA 75 215 L 2009.0 ... -1.29 -1.24 -1.70 48 NaN NaN 0.219 0.000 0.000 -0.763967
20 13.0 Jun 05 '89 Riverside CT USA US 68 174 R 2008.0 ... 49.06 -16.26 -0.97 186 4.0 Facial, Upper body 1.150 0.014 0.000 5.623404
21 22.0 Jun 11 '89 Rouleau SK CAN CA 78 222 L 2007.0 ... 23.49 -16.16 -2.31 160 NaN NaN 0.688 0.000 0.000 -0.957195
22 42.0 May 01 '84 Minneapolis MN USA US 75 221 R 2003.0 ... 20.59 0.67 0.04 186 1.0 Concussion 4.500 0.055 0.000 4.295745
23 11.0 Mar 17 '89 Vasteras NaN SWE SE 72 198 L 2007.0 ... -30.05 52.88 4.40 186 30.0 Abdominal, Illness 1.500 0.530 0.000 4.678723
24 19.0 Nov 23 '87 Gävle NaN SWE SE 73 208 L 2006.0 ... -6.38 35.33 1.67 186 NaN NaN 6.700 0.000 0.000 2.314894
25 47.0 Oct 05 '92 Bern NaN CHE CH 71 190 L 2011.0 ... -2.91 -2.09 -7.16 60 1.0 Illness 0.460 0.017 1.062 0.298765
26 37.0 Oct 27 '91 ANCHORAGE AK USA US 75 195 R NaN ... -8.62 9.56 10.93 18 NaN NaN 0.131 0.000 0.025 0.334523
27 12.0 Oct 02 '89 Bowmanville ON CAN CA 73 194 L 2008.0 ... 54.97 -87.98 -5.23 186 12.0 Hand, Lower body, Undisclosed, Upper body 3.300 0.322 0.000 2.548936
28 2.0 Nov 26 '82 Baudette MN USA US 71 204 L 2002.0 ... 16.96 -20.28 -7.84 186 64.0 Concussion, Illness 1.500 1.024 0.000 -2.821277
29 8.0 Mar 23 '90 Montreal QC CAN CA 73 199 L 2008.0 ... 11.86 -19.31 -1.42 186 NaN NaN 0.874 0.000 0.000 -0.589362
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
852 26.0 Aug 31 '86 Plymouth MN USA US 77 225 R 2004.0 ... -4.04 42.46 2.36 186 2.0 Lower body 5.600 0.137 0.000 3.855319
853 25.0 Mar 17 '88 Brandon MB CAN CA 72 201 R 2006.0 ... -17.80 24.68 4.08 166 39.0 Pectoral 0.513 0.273 0.000 3.052894
854 33.0 Feb 06 '88 Reading MA USA US 66 170 L NaN ... 4.44 -8.44 -18.07 11 NaN NaN 0.034 0.000 0.000 -0.103134
855 6.0 Mar 20 '83 Kitchener ON CAN CA 72 200 R 2002.0 ... 67.40 -139.37 -5.40 186 NaN NaN 5.250 0.000 0.000 4.900000
856 46.0 Sep 12 '90 Burnaby BC CAN CA 77 206 L 2008.0 ... -28.92 100.40 7.37 186 8.0 Undisclosed 2.000 0.122 0.000 -2.085106
857 14.0 Oct 04 '81 Cobourg ON CAN CA 73 189 R 2000.0 ... -8.93 11.96 0.65 186 1.0 Eye 3.650 0.045 0.000 1.104255
858 33.0 Oct 20 '89 Greenwich CT USA US 73 216 L 2008.0 ... 4.04 9.07 0.53 186 5.0 Lower body, Upper body 2.000 0.049 0.000 6.914894
859 28.0 Mar 16 '91 Barrie ON CAN CA 74 199 L 2009.0 ... -0.48 1.82 6.93 5 NaN NaN 0.019 0.000 0.000 -0.408968
860 44.0 Feb 03 '87 Windsor ON CAN CA 73 210 L NaN ... -1.24 1.95 4.76 186 78.0 Shoulder, Undisclosed 2.250 2.058 0.000 -4.217021
861 43.0 Apr 24 '92 Oakville ON CAN CA 71 183 L 2011.0 ... 0.64 -1.62 -28.10 46 18.0 Leg 0.153 0.203 0.282 -0.036124
862 43.0 Mar 29 '94 Toronto ON CAN CA 76 210 R 2012.0 ... -30.70 30.22 2.49 178 9.0 Head, Leg, Lower body 1.238 0.032 0.400 -0.514162
863 57.0 Apr 12 '88 Evanston IL USA US 72 200 R 2008.0 ... 67.32 -94.60 -5.77 186 7.0 Hand 2.475 0.211 0.000 3.104255
864 26.0 Mar 06 '85 Toronto ON CAN CA 74 207 L 2004.0 ... -68.10 85.03 12.63 186 2.0 Head 1.139 0.032 0.000 9.546809
865 20.0 Feb 21 '84 Canton MI USA US 71 203 R 2002.0 ... 25.34 22.66 9.55 186 8.0 Foot, Finger, Lower body 5.500 0.402 0.000 -6.331915
866 53.0 Apr 14 '90 Holland MI USA US 74 200 R 2008.0 ... -0.07 2.47 0.66 62 NaN NaN 0.292 0.000 0.247 -0.831206
867 45.0 Sep 15 '89 Dusseldorf NaN DEU NaN 75 215 L NaN ... -1.49 0.62 1.47 26 3.0 Leg 0.129 0.034 0.058 -0.110890
868 56.0 Jun 11 '92 Humboldt SK CAN CA 76 210 L 2012.0 ... -0.34 -3.07 -14.64 3 NaN NaN 0.012 0.000 0.025 -0.206658
869 26.0 Mar 12 '93 Burnaby BC CAN CA 74 210 L 2011.0 ... -5.51 2.99 10.24 22 NaN NaN 0.109 0.000 0.000 -0.093503
870 39.0 Oct 04 '94 Nizhnekamsk NaN RUS RU 77 232 L 2013.0 ... -1.24 -1.06 -6.35 2 NaN NaN 0.010 0.000 0.133 -0.208694
871 10.0 Oct 06 '93 Nizhnekamsk NaN RUS RU 71 197 L 2012.0 ... 81.92 -88.83 -5.06 186 1.0 Groin 3.775 0.046 2.850 -6.261702
872 93.0 Sep 09 '86 Boston MA USA US 73 190 L 2005.0 ... 45.70 -32.70 -2.86 186 NaN NaN 4.658 0.000 0.000 -0.540426
873 51.0 Apr 16 '95 Moscow NaN RUS RU 77 220 L 2013.0 ... -4.39 26.28 1.72 186 NaN NaN 1.744 0.000 0.850 -2.140426
874 19.0 May 13 '85 Winnipeg MB CAN CA 75 205 R 2004.0 ... -35.79 14.40 0.82 186 8.0 Lower body 5.750 0.561 0.000 -10.463830
875 40.0 Oct 09 '80 Njurunda NaN SWE SE 72 195 L 1999.0 ... -1.97 -50.04 -2.70 186 4.0 Head 6.083 0.297 0.000 -1.672340
876 93.0 Apr 18 '93 Stockholm NaN SWE SE 74 211 R 2011.0 ... 31.06 -42.91 -2.56 186 NaN NaN 1.744 0.000 0.850 6.159574
877 28.0 Feb 03 '77 Most NaN CZE CZ 71 190 R 2001.0 ... -34.31 3.98 3.35 186 NaN NaN 3.779 0.000 2.000 -1.970213
878 16.0 Sep 01 '87 Toronto ON CAN CA 72 185 L NaN ... -1.24 -1.26 -3.66 4 NaN NaN 0.013 0.000 0.000 -0.202494
879 8.0 Jun 16 '78 Elektrenai NaN LTU LT 77 225 L 1996.0 ... -3.20 -11.44 -0.73 186 8.0 Leg 3.100 0.302 0.000 -7.525532
880 36.0 Sep 01 '87 Oslo NaN NOR NO 67 179 L NaN ... -29.64 15.78 0.87 186 4.0 Lower body, Shoulder, Soreness 3.500 0.043 0.000 3.423404
881 16.0 Jan 16 '92 Newport Beach CA USA US 71 188 L 2010.0 ... -11.67 23.26 2.15 186 31.0 Collarbone, Illness 0.900 0.296 0.000 6.255319

882 rows × 120 columns

Let's look at how old the players are:


In [251]:
birthdate = df[df['DOB']].replace("DOB", "")
birthdate


---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-251-1147b0de488d> in <module>()
----> 1 birthdate = df[df['DOB']].replace("DOB", "")
      2 birthdate

/Users/skkandrach/.virtualenvs/lede/lib/python3.5/site-packages/pandas/core/frame.py in __getitem__(self, key)
   1989         if isinstance(key, (Series, np.ndarray, Index, list)):
   1990             # either boolean or fancy integer index
-> 1991             return self._getitem_array(key)
   1992         elif isinstance(key, DataFrame):
   1993             return self._getitem_frame(key)

/Users/skkandrach/.virtualenvs/lede/lib/python3.5/site-packages/pandas/core/frame.py in _getitem_array(self, key)
   2033             return self.take(indexer, axis=0, convert=False)
   2034         else:
-> 2035             indexer = self.ix._convert_to_indexer(key, axis=1)
   2036             return self.take(indexer, axis=1, convert=True)
   2037 

/Users/skkandrach/.virtualenvs/lede/lib/python3.5/site-packages/pandas/core/indexing.py in _convert_to_indexer(self, obj, axis, is_setter)
   1212                 mask = check == -1
   1213                 if mask.any():
-> 1214                     raise KeyError('%s not in index' % objarr[mask])
   1215 
   1216                 return _values_from_object(indexer)

KeyError: '["Feb 25 \'87" "Jul 16 \'87" "Jun 18 \'90" "Apr 26 \'77" "Jan 03 \'91"\n "Jun 03 \'90" "Aug 21 \'80" "Jan 31 \'90" "Oct 18 \'91" "Sep 24 \'88"\n "May 07 \'94" "Feb 05 \'89" "May 17 \'91" "Mar 21 \'93" "Jun 27 \'85"\n "May 24 \'88" "Aug 12 \'88" "May 31 \'93" "Apr 08 \'93" "Apr 01 \'91"\n "Jun 05 \'89" "Jun 11 \'89" "May 01 \'84" "Mar 17 \'89" "Nov 23 \'87"\n "Oct 05 \'92" "Oct 27 \'91" "Oct 02 \'89" "Nov 26 \'82" "Mar 23 \'90"\n "Sep 02 \'95" "Jul 26 \'91" "Jun 04 \'88" "Feb 17 \'88" "May 04 \'92"\n "Oct 16 \'85" "Jun 04 \'80" "Dec 05 \'92" "May 13 \'91" "Jun 07 \'88"\n "Mar 06 \'85" "Jun 25 \'88" "Jul 18 \'89" "Jul 26 \'87" "Nov 27 \'91"\n "Jun 20 \'96" "Jan 06 \'84" "Feb 08 \'84" "Jul 24 \'85" "Jun 02 \'88"\n "Mar 31 \'85" "Oct 02 \'86" "Mar 09 \'86" "Apr 04 \'88" "Sep 29 \'91"\n "Jun 16 \'81" "Jul 15 \'90" "Jul 17 \'92" "Apr 19 \'91" "Jan 30 \'89"\n "Dec 15 \'86" "Jan 25 \'85" "Dec 16 \'89" "Jul 15 \'90" "Jun 26 \'85"\n "May 13 \'86" "Jun 05 \'86" "Jan 31 \'87" "Apr 20 \'88" "Nov 24 \'84"\n "Mar 23 \'86" "Jul 12 \'89" "Mar 18 \'89" "Sep 08 \'93" "Aug 17 \'76"\n "Mar 25 \'90" "May 31 \'92" "Sep 23 \'90" "Dec 10 \'81" "Jan 03 \'91"\n "Sep 27 \'83" "Mar 08 \'89" "Jan 19 \'84" "Oct 04 \'89" "Apr 17 \'82"\n "Dec 18 \'84" "Jul 12 \'76" "Mar 19 \'86" "Sep 22 \'87" "Feb 10 \'87"\n "Apr 03 \'89" "Apr 17 \'79" "Oct 06 \'77" "Jun 07 \'90" "Jul 12 \'93"\n "May 25 \'84" "Dec 05 \'86" "Aug 17 \'85" "Feb 03 \'91" "Nov 04 \'84"\n "Jul 02 \'90" "Jun 24 \'85" "May 29 \'92" "Mar 09 \'86" "Feb 09 \'95"\n "Jan 06 \'83" "Mar 09 \'85" "Apr 11 \'81" "Oct 27 \'86" "Mar 27 \'85"\n "Apr 27 \'89" "Mar 21 \'85" "Dec 24 \'89" "Jun 08 \'82" "Feb 04 \'88"\n "May 23 \'79" "Dec 17 \'83" "Jan 28 \'85" "Sep 24 \'88" "Sep 25 \'84"\n "Jan 10 \'90" "Nov 02 \'90" "Feb 04 \'92" "Jan 01 \'85" "Aug 03 \'83"\n "Dec 21 \'93" "Apr 09 \'92" "Mar 18 \'77" "May 09 \'91" "Oct 01 \'90"\n "May 02 \'79" "Feb 19 \'86" "Apr 27 \'87" "Feb 27 \'91" "Oct 17 \'90"\n "Mar 31 \'84" "Dec 18 \'78" "Oct 26 \'92" "Mar 23 \'87" "Jan 13 \'91"\n "Apr 14 \'85" "Sep 30 \'82" "Apr 25 \'87" "Nov 18 \'87" "Feb 27 \'85"\n "Jun 14 \'87" "Jan 27 \'83" "Jan 30 \'90" "Nov 06 \'78" "Feb 21 \'89"\n "Dec 29 \'88" "Feb 18 \'86" "Dec 14 \'89" "Aug 06 \'86" "Feb 23 \'90"\n "Dec 23 \'83" "May 02 \'92" "Sep 07 \'78" "Jul 08 \'94" "Jun 14 \'90"\n "Mar 26 \'93" "Jul 20 \'93" "Mar 28 \'89" "Dec 07 \'92" "Jan 25 \'91"\n "Mar 02 \'92" "Jul 15 \'85" "Jan 06 \'82" "Jul 10 \'85" "Aug 07 \'87"\n "Nov 02 \'76" "Dec 02 \'86" "Sep 13 \'90" "Feb 19 \'91" "Jul 06 \'91"\n "Oct 09 \'83" "Nov 01 \'89" "Feb 24 \'93" "Nov 30 \'94" "Jul 20 \'78"\n "Aug 21 \'91" "May 09 \'91" "May 20 \'95" "Sep 13 \'88" "Mar 07 \'90"\n "Jun 24 \'90" "Jun 09 \'88" "Sep 14 \'86" "Jul 27 \'86" "Feb 22 \'91"\n "Jul 27 \'91" "Jan 09 \'86" "Nov 13 \'90" "Oct 10 \'76" "May 09 \'90"\n "Dec 20 \'86" "Dec 08 \'89" "Apr 03 \'87" "Oct 27 \'95" "Mar 28 \'95"\n "Apr 29 \'86" "Jan 16 \'91" "Aug 26 \'95" "Jul 25 \'94" "Oct 06 \'90"\n "Sep 06 \'91" "Apr 07 \'79" "Jun 22 \'83" "May 24 \'91" "May 01 \'84"\n "Jan 02 \'83" "May 15 \'90" "Apr 21 \'86" "Jul 06 \'82" "Feb 07 \'96"\n "May 24 \'90" "Jul 17 \'91" "Apr 13 \'76" "May 08 \'89" "Nov 05 \'88"\n "Jan 30 \'91" "Aug 31 \'81" "Jan 03 \'91" "Apr 25 \'86" "Apr 03 \'82"\n "Oct 06 \'89" "Nov 05 \'84" "Aug 29 \'81" "Mar 02 \'84" "Jul 17 \'85"\n "Feb 24 \'91" "Jun 16 \'92" "Dec 31 \'91" "Oct 11 \'88" "Jan 21 \'89"\n "Dec 02 \'91" "Mar 20 \'92" "May 15 \'87" "Jun 04 \'88" "Sep 07 \'85"\n "Mar 17 \'79" "Apr 20 \'92" "Jun 03 \'92" "Aug 08 \'91" "Jul 22 \'96"\n "May 09 \'80" "Mar 20 \'84" "Jun 05 \'80" "Jun 01 \'86" "May 16 \'84"\n "Jul 26 \'88" "Aug 10 \'91" "Oct 31 \'87" "Feb 09 \'91" "Nov 06 \'87"\n "Aug 13 \'94" "Dec 05 \'91" "Aug 08 \'87" "Dec 23 \'79" "Jan 28 \'85"\n "Sep 29 \'86" "May 20 \'90" "Jan 03 \'88" "Nov 20 \'92" "Feb 17 \'88"\n "Feb 14 \'82" "Feb 29 \'80" "Aug 10 \'89" "Feb 12 \'94" "Apr 22 \'88"\n "Jan 17 \'92" "May 06 \'92" "Aug 12 \'85" "Jul 04 \'90" "Nov 13 \'84"\n "Apr 04 \'93" "Aug 13 \'93" "Feb 03 \'82" "Jul 25 \'89" "May 08 \'91"\n "Jul 24 \'87" "May 10 \'85" "Feb 26 \'88" "Jan 10 \'83" "Jan 18 \'79"\n "Oct 09 \'83" "Oct 03 \'83" "Apr 29 \'84" "Jan 05 \'94" "Jan 12 \'88"\n "Nov 29 \'83" "Jan 29 \'83" "Dec 28 \'82" "Apr 28 \'89" "Aug 24 \'83"\n "Jul 30 \'85" "Nov 30 \'89" "Dec 23 \'79" "Apr 13 \'74" "Feb 26 \'93"\n "Oct 19 \'83" "Aug 14 \'84" "Feb 18 \'92" "Apr 20 \'93" "Oct 05 \'87"\n "Jan 31 \'84" "Aug 27 \'92" "Apr 16 \'93" "Feb 26 \'92" "Apr 27 \'93"\n "Oct 12 \'85" "Oct 30 \'82" "May 13 \'83" "Mar 09 \'86" "Jan 04 \'93"\n "May 16 \'94" "Feb 08 \'93" "Jan 22 \'85" "Apr 14 \'88" "Jun 05 \'90"\n "Jan 07 \'92" "Dec 10 \'82" "Nov 09 \'86" "Aug 23 \'88" "Mar 24 \'81"\n "Mar 30 \'86" "Jun 01 \'88" "Nov 14 \'91" "Dec 13 \'82" "Dec 04 \'91"\n "Jun 17 \'93" "Jan 01 \'92" "Apr 15 \'85" "Aug 16 \'90" "Jan 23 \'79"\n "Mar 15 \'86" "Feb 20 \'87" "Mar 10 \'93" "Nov 03 \'82" "Jun 08 \'83"\n "Sep 20 \'94" "Apr 18 \'82" "Mar 23 \'91" "Apr 19 \'81" "Jul 07 \'88"\n "Nov 21 \'89" "May 08 \'92" "Jan 21 \'81" "Dec 18 \'90" "Jun 18 \'78"\n "Oct 08 \'90" "Jan 21 \'87" "Aug 13 \'83" "Jun 17 \'81" "Feb 06 \'90"\n "Nov 12 \'93" "Feb 08 \'89" "Jun 02 \'83" "Jan 24 \'86" "Oct 20 \'91"\n "Jun 06 \'87" "Jun 27 \'88" "Feb 18 \'90" "Nov 24 \'89" "May 15 \'87"\n "Jan 14 \'91" "Feb 16 \'88" "Sep 17 \'78" "Jan 01 \'87" "Apr 05 \'95"\n "Jan 12 \'79" "Aug 24 \'92" "Jun 04 \'93" "Jan 04 \'84" "Aug 24 \'88"\n "May 21 \'85" "Jul 01 \'77" "Nov 29 \'87" "Mar 05 \'81" "Nov 14 \'81"\n "Feb 15 \'72" "Sep 25 \'91" "Mar 23 \'93" "Jun 15 \'93" "Mar 06 \'93"\n "Oct 05 \'87" "Jul 31 \'92" "Oct 06 \'90" "Mar 21 \'88" "Jan 13 \'87"\n "Jul 29 \'90" "Apr 01 \'83" "Dec 05 \'78" "Aug 20 \'91" "Sep 27 \'86"\n "Aug 10 \'84" "Oct 03 \'94" "Jul 14 \'90" "Jul 17 \'90" "Mar 02 \'91"\n "Jun 01 \'90" "Dec 28 \'92" "Oct 06 \'90" "Jun 08 \'86" "Sep 24 \'88"\n "Aug 02 \'91" "Nov 19 \'88" "May 31 \'90" "Jul 18 \'90" "Jan 08 \'93"\n "Jan 24 \'91" "Jul 16 \'83" "Nov 11 \'80" "Feb 28 \'91" "Jul 15 \'86"\n "Aug 31 \'84" "Oct 02 \'87" "Sep 09 \'93" "Sep 14 \'89" "Feb 10 \'87"\n "Jul 05 \'89" "Jul 20 \'93" "Dec 13 \'84" "Jan 28 \'91" "Aug 14 \'92"\n "Aug 12 \'86" "Sep 10 \'90" "Feb 18 \'94" "Mar 12 \'83" "Jan 23 \'87"\n "Feb 05 \'82" "Aug 24 \'87" "Jul 28 \'86" "Nov 28 \'85" "Mar 08 \'90"\n "Apr 30 \'91" "Apr 28 \'86" "Jan 12 \'81" "Apr 12 \'91" "May 27 \'90"\n "Jun 17 \'93" "Jan 06 \'94" "Jul 14 \'86" "Oct 29 \'90" "Sep 26 \'79"\n "May 19 \'92" "Dec 12 \'85" "Jun 23 \'83" "Apr 24 \'91" "Nov 23 \'92"\n "Mar 29 \'85" "Nov 12 \'92" "Jul 25 \'92" "Jul 16 \'90" "May 25 \'91"\n "May 30 \'94" "Mar 24 \'89" "Feb 02 \'95" "Apr 21 \'80" "Mar 20 \'91"\n "Jul 03 \'90" "Aug 17 \'80" "Dec 23 \'87" "May 26 \'93" "Aug 03 \'80"\n "Jan 20 \'86" "Jan 23 \'93" "Apr 24 \'87" "Feb 04 \'85" "Jan 08 \'87"\n "Nov 25 \'80" "Oct 29 \'91" "Mar 23 \'90" "Sep 23 \'93" "Dec 02 \'94"\n "Jan 20 \'94" "Dec 05 \'83" "Nov 12 \'87" "Feb 20 \'84" "Mar 29 \'93"\n "Mar 29 \'93" "Jun 07 \'88" "Sep 23 \'83" "Aug 22 \'94" "Apr 06 \'85"\n "Sep 07 \'86" "Jun 11 \'81" "Sep 01 \'95" "Mar 25 \'90" "May 18 \'80"\n "Jul 31 \'86" "May 20 \'89" "Dec 01 \'79" "Jun 04 \'90" "Oct 07 \'91"\n "May 11 \'88" "Jan 02 \'92" "Dec 27 \'90" "Feb 18 \'92" "Dec 20 \'78"\n "Sep 15 \'79" "Apr 23 \'88" "May 08 \'89" "Mar 05 \'81" "Jul 26 \'87"\n "Jul 25 \'92" "Feb 23 \'94" "Feb 19 \'88" "Feb 25 \'88" "Oct 12 \'93"\n "Mar 02 \'83" "Apr 18 \'83" "Jun 13 \'89" "Sep 30 \'84" "Aug 05 \'88"\n "Jul 29 \'90" "Sep 02 \'81" "Apr 20 \'92" "Jun 17 \'92" "Feb 22 \'91"\n "Jun 26 \'84" "Mar 22 \'90" "Jan 21 \'91" "Oct 12 \'86" "Feb 01 \'90"\n "Feb 03 \'92" "Oct 13 \'85" "Jun 21 \'85" "Dec 07 \'84" "Dec 23 \'82"\n "Sep 18 \'88" "Feb 17 \'84" "Mar 14 \'93" "Nov 15 \'87" "Jan 22 \'85"\n "Jan 30 \'85" "Apr 23 \'77" "Apr 06 \'82" "Oct 12 \'94" "Aug 03 \'80"\n "Nov 19 \'90" "Apr 16 \'91" "Jan 09 \'84" "Jan 16 \'79" "Dec 09 \'92"\n "Dec 28 \'81" "Dec 09 \'87" "Nov 01 \'83" "Mar 06 \'86" "Mar 21 \'95"\n "Mar 26 \'93" "Mar 31 \'93" "Sep 27 \'93" "Apr 09 \'93" "Feb 21 \'89"\n "Feb 01 \'90" "Nov 22 \'92" "Jun 16 \'84" "May 09 \'89" "Sep 03 \'87"\n "Jun 18 \'79" "Oct 15 \'91" "Feb 08 \'92" "Mar 28 \'93" "Feb 22 \'91"\n "Mar 04 \'95" "Sep 08 \'92" "Apr 24 \'84" "Nov 05 \'92" "Jun 16 \'86"\n "Dec 06 \'86" "Feb 12 \'93" "Jun 23 \'89" "Feb 25 \'92" "Apr 12 \'93"\n "Feb 04 \'95" "Sep 01 \'89" "Feb 14 \'83" "Jul 29 \'94" "Aug 09 \'83"\n "Jun 21 \'90" "Feb 07 \'91" "Oct 01 \'81" "Jun 25 \'92" "Apr 16 \'88"\n "Dec 21 \'92" "Feb 04 \'86" "Jan 03 \'91" "Sep 26 \'80" "Mar 03 \'82"\n "Dec 23 \'86" "Aug 19 \'82" "Jul 29 \'93" "Sep 17 \'85" "Apr 12 \'91"\n "Nov 20 \'88" "Nov 11 \'92" "Apr 15 \'84" "Aug 25 \'91" "Mar 28 \'91"\n "Apr 06 \'93" "Feb 01 \'91" "Feb 07 \'91" "Aug 13 \'93" "Mar 29 \'84"\n "Mar 24 \'83" "Jul 28 \'84" "May 25 \'96" "Jun 20 \'90" "Jul 11 \'84"\n "Aug 10 \'92" "Apr 18 \'89" "May 18 \'93" "Jan 05 \'88" "May 28 \'88"\n "May 16 \'85" "Mar 03 \'92" "Dec 09 \'87" "Apr 10 \'85" "Mar 09 \'78"\n "Jan 18 \'90" "Apr 26 \'84" "Apr 10 \'91" "Jul 05 \'84" "Nov 01 \'91"\n "Oct 31 \'82" "Dec 14 \'94" "Apr 28 \'86" "Nov 30 \'82" "May 29 \'84"\n "Feb 22 \'89" "Jan 05 \'84" "Sep 29 \'86" "Jan 16 \'94" "Nov 16 \'92"\n "May 07 \'86" "Mar 13 \'90" "Mar 16 \'84" "Jan 24 \'93" "Jan 02 \'92"\n "Sep 08 \'85" "Jan 11 \'92" "Aug 12 \'85" "Dec 01 \'88" "May 05 \'93"\n "Feb 07 \'91" "May 03 \'92" "Mar 01 \'93" "Feb 05 \'93" "Sep 17 \'85"\n "Jun 14 \'86" "Jan 20 \'87" "Jul 26 \'88" "Aug 29 \'84" "Apr 19 \'80"\n "Apr 16 \'86" "Jan 24 \'94" "Feb 04 \'92" "Nov 06 \'95" "Mar 25 \'92"\n "Feb 10 \'80" "May 02 \'80" "Feb 11 \'85" "Feb 04 \'85" "Jan 10 \'93"\n "Mar 09 \'94" "Jun 15 \'90" "Jul 13 \'91" "Oct 27 \'94" "Jul 01 \'93"\n "Apr 24 \'90" "Mar 03 \'77" "Oct 17 \'81" "Nov 21 \'89" "May 04 \'83"\n "Sep 03 \'78" "May 07 \'90" "Oct 08 \'90" "May 02 \'87" "May 11 \'92"\n "Feb 16 \'83" "Mar 17 \'87" "Oct 07 \'94" "Mar 31 \'80" "Oct 27 \'92"\n "Mar 09 \'93" "Feb 11 \'76" "Feb 07 \'94" "Jul 26 \'91" "Dec 14 \'85"\n "Oct 22 \'90" "Jan 30 \'90" "Feb 23 \'90" "Apr 20 \'89" "Nov 16 \'90"\n "Mar 15 \'93" "Aug 22 \'91" "Nov 02 \'89" "Oct 07 \'88" "May 07 \'87"\n "Jul 16 \'91" "Sep 29 \'90" "Feb 25 \'86" "Jul 06 \'90" "Aug 25 \'82"\n "Jun 25 \'92" "Sep 26 \'82" "Dec 30 \'78" "Apr 20 \'85" "Sep 26 \'80"\n "Sep 26 \'80" "Jan 31 \'92" "Jul 18 \'81" "Jun 10 \'92" "Jun 08 \'86"\n "Mar 03 \'84" "Aug 28 \'84" "Sep 28 \'87" "Jan 01 \'87" "Aug 07 \'94"\n "Jul 25 \'92" "Dec 27 \'81" "Jan 29 \'89" "Jul 20 \'91" "Dec 07 \'91"\n "Apr 25 \'88" "Jan 07 \'91" "Jan 29 \'91" "Sep 26 \'92" "Dec 24 \'91"\n "Sep 07 \'93" "Oct 13 \'90" "May 24 \'88" "Aug 26 \'88" "Jan 20 \'88"\n "May 19 \'87" "May 16 \'92" "Dec 09 \'82" "Feb 01 \'86" "Jul 11 \'88"\n "Feb 08 \'89" "Jun 20 \'93" "Sep 05 \'89" "Apr 01 \'91" "Feb 08 \'85"\n "Apr 05 \'88" "Jun 14 \'92" "Oct 12 \'85" "Sep 19 \'88" "Jun 13 \'83"\n "Jan 30 \'92" "Nov 29 \'89" "Jan 23 \'86" "Jun 18 \'75" "Oct 29 \'84"\n "Sep 10 \'88" "Jan 13 \'87" "Oct 30 \'85" "Dec 19 \'83" "Jan 17 \'86"\n "Feb 07 \'90" "Jul 20 \'89" "Dec 27 \'85" "Mar 01 \'84" "Feb 04 \'83"\n "Jun 18 \'90" "Oct 30 \'87" "Jun 24 \'82" "Nov 21 \'87" "May 13 \'92"\n "Jun 07 \'90" "Feb 19 \'85" "Oct 30 \'84" "Jan 04 \'88" "Jun 15 \'92"\n "Aug 01 \'86" "Feb 13 \'87" "Dec 11 \'77" "Jul 11 \'93" "Nov 06 \'79"\n "Apr 27 \'84" "May 13 \'89" "Feb 05 \'88" "Nov 29 \'90" "Jan 21 \'85"\n "Feb 14 \'89" "Jun 02 \'87" "Sep 26 \'91" "May 14 \'91" "Feb 11 \'84"\n "Dec 20 \'89" "Feb 10 \'89" "Nov 21 \'79" "Dec 13 \'91" "Jun 20 \'91"\n "Dec 01 \'90" "Sep 20 \'90" "Apr 23 \'90" "Sep 11 \'94" "Apr 07 \'89"\n "May 26 \'92" "Oct 05 \'84" "Jun 03 \'83" "Jul 02 \'79" "Jul 23 \'77"\n "Jul 01 \'94" "Mar 18 \'75" "Feb 20 \'92" "Mar 16 \'88" "Apr 29 \'88"\n "Apr 24 \'92" "Feb 02 \'83" "Jul 11 \'93" "Jul 25 \'89" "Aug 26 \'90"\n "Feb 26 \'94" "Aug 14 \'89" "Apr 23 \'89" "Jul 19 \'83" "Dec 31 \'92"\n "May 03 \'82" "Oct 07 \'83" "Apr 20 \'83" "May 04 \'89" "Jul 24 \'91"\n "Mar 15 \'87" "Jan 19 \'84" "Dec 04 \'90" "Jun 03 \'91" "Nov 16 \'81"\n "Jul 20 \'82" "May 13 \'86" "Jul 17 \'91" "Nov 19 \'90" "Aug 11 \'76"\n "Aug 20 \'85" "Mar 30 \'87" "Feb 25 \'82" "May 30 \'85" "Aug 15 \'89"\n "Jan 15 \'90" "Jun 13 \'81" "May 27 \'91" "Dec 02 \'80" "May 30 \'90"\n "May 02 \'78" "Dec 16 \'87" "Aug 14 \'85" "Sep 23 \'88" "Aug 05 \'88"\n "Apr 03 \'83" "Sep 22 \'94" "Aug 31 \'86" "Mar 17 \'88" "Feb 06 \'88"\n "Mar 20 \'83" "Sep 12 \'90" "Oct 04 \'81" "Oct 20 \'89" "Mar 16 \'91"\n "Feb 03 \'87" "Apr 24 \'92" "Mar 29 \'94" "Apr 12 \'88" "Mar 06 \'85"\n "Feb 21 \'84" "Apr 14 \'90" "Sep 15 \'89" "Jun 11 \'92" "Mar 12 \'93"\n "Oct 04 \'94" "Oct 06 \'93" "Sep 09 \'86" "Apr 16 \'95" "May 13 \'85"\n "Oct 09 \'80" "Apr 18 \'93" "Feb 03 \'77" "Sep 01 \'87" "Jun 16 \'78"\n "Sep 01 \'87" "Jan 16 \'92"] not in index'

In [270]:
df['birthyear'] = df['DOB'].astype(str).str.split("'").str.get(1).astype(int)

In [271]:
df


Out[271]:
# DOB Birth City S/P Ctry Nat HT Wt S Draft ... dFenwickImpact dFenwick60 Days Ginj Injury Cap Cost CHIP Bonuses GVS birthyear
0 8.0 Feb 25 '87 Muskegon MI USA US 74 218 L 2005.0 ... -9.36 -0.60 186 11.0 Hand, Shoulder 1.800 0.088 0.000 5.340426 87
1 41.0 Jul 16 '87 Edina MN USA US 75 202 L NaN ... 10.41 22.57 29 NaN NaN 0.106 0.000 0.000 -0.443079 87
2 25.0 Jun 18 '90 St. John's NL CAN CA 74 206 L 2008.0 ... 0.95 3.33 5 NaN NaN 0.017 0.000 0.000 -0.104713 90
3 27.0 Apr 26 '77 Seria NaN BRN NaN 72 200 R 1996.0 ... -19.42 -2.36 186 5.0 Undisclosed 0.700 0.043 0.000 0.980851 77
4 32.0 Jan 03 '91 Kleinburg ON CAN CA 70 187 L NaN ... 0.41 2.26 2 NaN NaN 0.006 0.000 0.000 0.299817 91
5 42.0 Jun 03 '90 Ottawa ON CAN CA 70 190 R NaN ... -20.56 -12.23 54 NaN NaN 0.167 0.000 0.000 -0.515580 90
6 6.0 Aug 21 '80 Kingston ON CAN CA 77 223 L 1998.0 ... 6.21 4.94 186 20.0 Lower body, Flu 3.022 0.854 0.000 -5.159574 80
7 NaN Jan 31 '90 Chicago IL USA US 73 210 L NaN ... 2.45 3.25 8 NaN NaN 0.076 0.000 0.850 -0.411370 90
8 39.0 Oct 18 '91 Kansas City MO USA US 76 201 R 2010.0 ... 3.85 21.90 2 NaN NaN 0.010 0.000 0.110 -0.208694 91
9 27.0 Sep 24 '88 Burnaby BC CAN CA 74 217 L 2007.0 ... -17.26 -0.77 186 NaN NaN 2.800 0.000 0.000 2.412766 88
10 53.0 May 07 '94 Burlington ON CAN CA 75 212 R 2012.0 ... -3.28 -2.36 11 NaN NaN 0.053 0.000 0.282 -0.543560 94
11 18.0 Feb 05 '89 Munkedal NaN SWE SE 74 211 L 2007.0 ... -45.28 -4.40 186 1.0 Illness 0.733 0.009 0.000 -0.689362 89
12 15.0 May 17 '91 Pickering ON CAN CA 73 207 L 2011.0 ... -37.39 -14.32 186 NaN NaN 0.550 0.000 0.000 1.000000 91
13 58.0 Mar 21 '93 Zurich NaN CHE CH 69 183 L 2013.0 ... -10.55 -6.93 35 NaN NaN 0.141 0.000 0.125 -0.279799 93
14 15.0 Jun 27 '85 Woodbridge ON CAN CA 73 212 L NaN ... -4.45 -11.43 8 NaN NaN 0.028 0.000 0.000 -0.009243 85
15 42.0 May 24 '88 Yaroslavl NaN RUS RU 76 198 L 2006.0 ... 63.66 6.07 186 30.0 Arm, Concussion 3.283 0.921 0.000 -2.814894 88
16 36.0 Aug 12 '88 Milford CT USA US 68 172 R NaN ... 23.20 9.94 186 NaN NaN 0.601 0.000 0.000 5.491489 88
17 33.0 May 31 '93 Pori NaN FIN FI 75 192 R 2011.0 ... -1.27 -5.21 1 NaN NaN 0.007 0.000 0.700 -0.008602 93
18 38.0 Apr 08 '93 Skellefteå NaN SWE SE 69 172 R 2014.0 ... -2.54 -2.48 12 NaN NaN 0.042 0.000 0.035 -0.213864 93
19 37.0 Apr 01 '91 Winnipeg MB CAN CA 75 215 L 2009.0 ... -1.24 -1.70 48 NaN NaN 0.219 0.000 0.000 -0.763967 91
20 13.0 Jun 05 '89 Riverside CT USA US 68 174 R 2008.0 ... -16.26 -0.97 186 4.0 Facial, Upper body 1.150 0.014 0.000 5.623404 89
21 22.0 Jun 11 '89 Rouleau SK CAN CA 78 222 L 2007.0 ... -16.16 -2.31 160 NaN NaN 0.688 0.000 0.000 -0.957195 89
22 42.0 May 01 '84 Minneapolis MN USA US 75 221 R 2003.0 ... 0.67 0.04 186 1.0 Concussion 4.500 0.055 0.000 4.295745 84
23 11.0 Mar 17 '89 Vasteras NaN SWE SE 72 198 L 2007.0 ... 52.88 4.40 186 30.0 Abdominal, Illness 1.500 0.530 0.000 4.678723 89
24 19.0 Nov 23 '87 Gävle NaN SWE SE 73 208 L 2006.0 ... 35.33 1.67 186 NaN NaN 6.700 0.000 0.000 2.314894 87
25 47.0 Oct 05 '92 Bern NaN CHE CH 71 190 L 2011.0 ... -2.09 -7.16 60 1.0 Illness 0.460 0.017 1.062 0.298765 92
26 37.0 Oct 27 '91 ANCHORAGE AK USA US 75 195 R NaN ... 9.56 10.93 18 NaN NaN 0.131 0.000 0.025 0.334523 91
27 12.0 Oct 02 '89 Bowmanville ON CAN CA 73 194 L 2008.0 ... -87.98 -5.23 186 12.0 Hand, Lower body, Undisclosed, Upper body 3.300 0.322 0.000 2.548936 89
28 2.0 Nov 26 '82 Baudette MN USA US 71 204 L 2002.0 ... -20.28 -7.84 186 64.0 Concussion, Illness 1.500 1.024 0.000 -2.821277 82
29 8.0 Mar 23 '90 Montreal QC CAN CA 73 199 L 2008.0 ... -19.31 -1.42 186 NaN NaN 0.874 0.000 0.000 -0.589362 90
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
852 26.0 Aug 31 '86 Plymouth MN USA US 77 225 R 2004.0 ... 42.46 2.36 186 2.0 Lower body 5.600 0.137 0.000 3.855319 86
853 25.0 Mar 17 '88 Brandon MB CAN CA 72 201 R 2006.0 ... 24.68 4.08 166 39.0 Pectoral 0.513 0.273 0.000 3.052894 88
854 33.0 Feb 06 '88 Reading MA USA US 66 170 L NaN ... -8.44 -18.07 11 NaN NaN 0.034 0.000 0.000 -0.103134 88
855 6.0 Mar 20 '83 Kitchener ON CAN CA 72 200 R 2002.0 ... -139.37 -5.40 186 NaN NaN 5.250 0.000 0.000 4.900000 83
856 46.0 Sep 12 '90 Burnaby BC CAN CA 77 206 L 2008.0 ... 100.40 7.37 186 8.0 Undisclosed 2.000 0.122 0.000 -2.085106 90
857 14.0 Oct 04 '81 Cobourg ON CAN CA 73 189 R 2000.0 ... 11.96 0.65 186 1.0 Eye 3.650 0.045 0.000 1.104255 81
858 33.0 Oct 20 '89 Greenwich CT USA US 73 216 L 2008.0 ... 9.07 0.53 186 5.0 Lower body, Upper body 2.000 0.049 0.000 6.914894 89
859 28.0 Mar 16 '91 Barrie ON CAN CA 74 199 L 2009.0 ... 1.82 6.93 5 NaN NaN 0.019 0.000 0.000 -0.408968 91
860 44.0 Feb 03 '87 Windsor ON CAN CA 73 210 L NaN ... 1.95 4.76 186 78.0 Shoulder, Undisclosed 2.250 2.058 0.000 -4.217021 87
861 43.0 Apr 24 '92 Oakville ON CAN CA 71 183 L 2011.0 ... -1.62 -28.10 46 18.0 Leg 0.153 0.203 0.282 -0.036124 92
862 43.0 Mar 29 '94 Toronto ON CAN CA 76 210 R 2012.0 ... 30.22 2.49 178 9.0 Head, Leg, Lower body 1.238 0.032 0.400 -0.514162 94
863 57.0 Apr 12 '88 Evanston IL USA US 72 200 R 2008.0 ... -94.60 -5.77 186 7.0 Hand 2.475 0.211 0.000 3.104255 88
864 26.0 Mar 06 '85 Toronto ON CAN CA 74 207 L 2004.0 ... 85.03 12.63 186 2.0 Head 1.139 0.032 0.000 9.546809 85
865 20.0 Feb 21 '84 Canton MI USA US 71 203 R 2002.0 ... 22.66 9.55 186 8.0 Foot, Finger, Lower body 5.500 0.402 0.000 -6.331915 84
866 53.0 Apr 14 '90 Holland MI USA US 74 200 R 2008.0 ... 2.47 0.66 62 NaN NaN 0.292 0.000 0.247 -0.831206 90
867 45.0 Sep 15 '89 Dusseldorf NaN DEU NaN 75 215 L NaN ... 0.62 1.47 26 3.0 Leg 0.129 0.034 0.058 -0.110890 89
868 56.0 Jun 11 '92 Humboldt SK CAN CA 76 210 L 2012.0 ... -3.07 -14.64 3 NaN NaN 0.012 0.000 0.025 -0.206658 92
869 26.0 Mar 12 '93 Burnaby BC CAN CA 74 210 L 2011.0 ... 2.99 10.24 22 NaN NaN 0.109 0.000 0.000 -0.093503 93
870 39.0 Oct 04 '94 Nizhnekamsk NaN RUS RU 77 232 L 2013.0 ... -1.06 -6.35 2 NaN NaN 0.010 0.000 0.133 -0.208694 94
871 10.0 Oct 06 '93 Nizhnekamsk NaN RUS RU 71 197 L 2012.0 ... -88.83 -5.06 186 1.0 Groin 3.775 0.046 2.850 -6.261702 93
872 93.0 Sep 09 '86 Boston MA USA US 73 190 L 2005.0 ... -32.70 -2.86 186 NaN NaN 4.658 0.000 0.000 -0.540426 86
873 51.0 Apr 16 '95 Moscow NaN RUS RU 77 220 L 2013.0 ... 26.28 1.72 186 NaN NaN 1.744 0.000 0.850 -2.140426 95
874 19.0 May 13 '85 Winnipeg MB CAN CA 75 205 R 2004.0 ... 14.40 0.82 186 8.0 Lower body 5.750 0.561 0.000 -10.463830 85
875 40.0 Oct 09 '80 Njurunda NaN SWE SE 72 195 L 1999.0 ... -50.04 -2.70 186 4.0 Head 6.083 0.297 0.000 -1.672340 80
876 93.0 Apr 18 '93 Stockholm NaN SWE SE 74 211 R 2011.0 ... -42.91 -2.56 186 NaN NaN 1.744 0.000 0.850 6.159574 93
877 28.0 Feb 03 '77 Most NaN CZE CZ 71 190 R 2001.0 ... 3.98 3.35 186 NaN NaN 3.779 0.000 2.000 -1.970213 77
878 16.0 Sep 01 '87 Toronto ON CAN CA 72 185 L NaN ... -1.26 -3.66 4 NaN NaN 0.013 0.000 0.000 -0.202494 87
879 8.0 Jun 16 '78 Elektrenai NaN LTU LT 77 225 L 1996.0 ... -11.44 -0.73 186 8.0 Leg 3.100 0.302 0.000 -7.525532 78
880 36.0 Sep 01 '87 Oslo NaN NOR NO 67 179 L NaN ... 15.78 0.87 186 4.0 Lower body, Shoulder, Soreness 3.500 0.043 0.000 3.423404 87
881 16.0 Jan 16 '92 Newport Beach CA USA US 71 188 L 2010.0 ... 23.26 2.15 186 31.0 Collarbone, Illness 0.900 0.296 0.000 6.255319 92

882 rows × 121 columns

Young Players (24 years old or younger) for the United States:


In [280]:
young_usa_players = df[(df['Ctry'] == 'USA') & (df['birthyear'] >= 94 )]
young_usa_players[["First Name", "Last Name"]]


Out[280]:
First Name Last Name
158 Andrew Copp
268 Alex Galchenyuk
340 Ryan Hartman
396 Seth Jones
506 Stefan Matteau
682 Kerby Rychel
687 Henrik Samuelsson
815 Jacob Trouba

Young Players (24 years old or younger) for Canada:


In [279]:
young_can_players = df[(df['Ctry'] == 'CAN') & (df['birthyear'] >= 94 )]
young_can_players[["First Name", "Last Name"]]


Out[279]:
First Name Last Name
10 Josh Anderson
45 Sam Bennett
199 Jonathan Drouin
202 Anthony Duclair
203 Matt Dumba
214 Aaron Ekblad
369 Bo Horvat
427 Slater Koekkoek
441 Brett Kulak
455 Scott Laughton
457 Curtis Lazar
487 Nathan MacKinnon
538 Sean Monahan
575 Darnell Nurse
578 Liam O'Brien
626 Emile Poirier
633 Derrick Pouliot
656 Griffin Reinhart
658 Sam Reinhart
665 Morgan Rielly
719 Damon Severson
805 Chris Tierney
862 Tom Wilson

Old Players (36 years old or older) for the United States:


In [297]:
old_usa_players = df[(df['Ctry'] == 'USA') & (df['birthyear'] <= 80 )]

In [298]:
old_usa_players[["First Name", "Last Name"]]


Out[298]:
First Name Last Name
148 Erik Cole
170 Matt Cullen
284 Brian Gionta
297 Scott Gomez
461 David Legwand
464 Jordan Leopold
470 John-Michael Liles
492 Ryan Malone
588 Brooks Orpik
707 Rob Scuderi

Old Players (36 years old or younger) for Canada:


In [299]:
old_can_players = df[(df['Ctry'] == 'CAN') & (df['birthyear'] <= 80 )]

In [300]:
old_can_players[["First Name", "Last Name"]]


Out[300]:
First Name Last Name
6 Bryan Allen
36 Francois Beauchemin
74 Eric Boulton
86 Dan Boyle
91 Eric Brewer
92 Daniel Briere
115 Brian Campbell
130 Jason Chimera
136 Daniel Cleary
157 Matt Cooke
193 Shane Doan
206 Pascal Dupuis
240 Andrew Ference
245 Vernon Fiddler
247 Mike Fisher
266 Simon Gagne
334 Scott Hannan
367 Shawn Horcoff
376 Jarome Iginla
412 Chris Kelly
444 Chris Kunitz
458 Vincent Lecavalier
489 Manny Malhotra
500 Patrick Marleau
536 Willie Mitchell
539 Dominic Moore
543 Brenden Morrow
560 Chris Neil
619 Chris Phillips
660 Mike Ribeiro
661 Brad Richards
671 Stephane Robidas
683 Michael Ryder
686 Bryce Salvador
753 Martin St. Louis
779 Brad Stuart
792 Alex Tanguay
803 Joe Thornton
804 Shawn Thornton
843 Joel Ward
845 Mike Weaver

Let's examine the correlation between height and weight


In [153]:
df['HT'].describe()


Out[153]:
count    882.000000
mean      73.091837
std        2.111952
min       65.000000
25%       72.000000
50%       73.000000
75%       74.000000
max       81.000000
Name: HT, dtype: float64

In [154]:
df['Wt'].describe()


Out[154]:
count    882.000000
mean     201.626984
std       14.831795
min      150.000000
25%      190.000000
50%      201.000000
75%      211.000000
max      260.000000
Name: Wt, dtype: float64

And a visual of the correlation...nice:


In [301]:
plt.style.use('ggplot')

In [302]:
df.plot(kind='scatter', x='Wt', y='HT')


Out[302]:
<matplotlib.axes._subplots.AxesSubplot at 0x1176872e8>

Let's examine how many lefty's versus righty's (in shooting) each country has:


In [173]:
df['S'].value_counts()


Out[173]:
L    554
R    328
Name: S, dtype: int64

In [247]:
df.groupby(['Ctry', 'S']).agg(['count'])


Out[247]:
# DOB Birth City S/P Nat HT Wt Draft Round Overall ... dFenwickImpact dFenwick60 Days Ginj Injury Cap Cost CHIP Bonuses GVS birthyear
count count count count count count count count count count ... count count count count count count count count count count
Ctry S
AUT L 4 4 4 0 1 4 4 3 3 3 ... 4 4 4 3 3 4 4 4 4 4
R 1 1 1 0 0 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1
BLR R 1 1 1 0 1 1 1 0 0 0 ... 1 1 1 0 0 1 1 1 1 1
BRA L 1 1 1 0 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1
BRN R 1 1 1 0 0 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1
CAN L 280 282 282 282 281 282 282 232 232 232 ... 282 282 282 156 156 282 282 282 282 282
R 169 171 171 171 171 171 171 150 150 150 ... 171 171 171 96 96 171 171 171 171 171
CHE L 7 7 7 0 7 7 7 7 7 7 ... 7 7 7 5 5 7 7 7 7 7
R 3 3 3 0 3 3 3 1 1 1 ... 3 3 3 2 2 3 3 3 3 3
CZE L 22 22 22 0 22 22 22 21 21 21 ... 22 22 22 14 14 22 22 22 22 22
R 11 11 11 0 11 11 11 9 9 9 ... 11 11 11 8 8 11 11 11 11 11
DEU L 8 8 8 0 7 8 8 7 7 7 ... 8 8 8 5 5 8 8 8 8 8
R 1 1 1 0 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1
DNK L 6 6 6 0 6 6 6 6 6 6 ... 6 6 6 3 3 6 6 6 6 6
R 1 1 1 0 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1
EST L 1 1 1 0 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1
FIN L 20 20 20 0 20 20 20 20 20 20 ... 20 20 20 14 14 20 20 20 20 20
R 5 5 5 0 5 5 5 5 5 5 ... 5 5 5 3 3 5 5 5 5 5
FRA L 3 3 3 0 3 3 3 1 1 1 ... 3 3 3 0 0 3 3 3 3 3
HRV R 1 1 1 0 0 1 1 0 0 0 ... 1 1 1 1 1 1 1 1 1 1
ITA L 1 1 1 0 0 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1
LTU L 1 1 1 0 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1
LVA L 2 2 2 0 2 2 2 1 1 1 ... 2 2 2 1 1 2 2 2 2 2
NOR L 1 1 1 0 1 1 1 0 0 0 ... 1 1 1 1 1 1 1 1 1 1
RUS L 24 24 24 0 24 24 24 23 23 23 ... 24 24 24 13 13 24 24 24 24 24
R 5 5 5 0 5 5 5 5 5 5 ... 5 5 5 2 2 5 5 5 5 5
SVK L 11 11 11 0 11 11 11 11 11 11 ... 11 11 11 8 8 11 11 11 11 11
SVN L 1 1 1 0 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1
SWE L 44 45 45 0 45 45 45 44 44 44 ... 45 45 45 27 27 45 45 45 45 45
R 19 19 19 0 19 19 19 17 17 17 ... 19 19 19 6 6 19 19 19 19 19
USA L 110 114 114 114 114 114 114 93 93 93 ... 114 114 114 54 54 114 114 114 114 114
R 107 108 108 108 108 108 108 85 85 85 ... 108 108 108 52 52 108 108 108 108 108

32 rows × 119 columns

Interesting...Canada has significantly more left-handed shooters (280) than right-handed shooters. Meanwhile, the USA is pretty even with 110 lefty's and 107 righty's.


In [248]:
usa_left_shot = df[(df['Ctry'] == 'USA') & (df['S'] == 'L')]

In [158]:
usa_left_shot[["First Name", "Last Name"]]


Out[158]:
First Name Last Name
0 Justin Abdelkader
1 Will Acton
7 Conor Allen
28 Keith Ballard
32 Matt Bartkowski
56 Anthony Bitetto
67 Brandon Bollig
68 Nick Bonino
69 David Booth
73 Reid Boucher
79 Ryan Bourque
81 Drayson Bowman
85 Brian Boyle
90 TJ Brennan
108 Chris Butler
118 Paul Carey
119 Matthew Carle
124 Ryan Carter
148 Erik Cole
149 Ian Cole
155 Chris Conner
158 Andrew Copp
163 Sean Couturier
170 Matt Cullen
173 Jerry D'Amigo
184 Danny DeKeyser
194 Matt Donovan
200 Brandon Dubinsky
205 Brian Dumoulin
230 Tim Erixon
... ... ...
588 Brooks Orpik
595 Max Pacioretty
606 Zach Parise
623 Joe Piskula
634 Shane Prince
682 Kerby Rychel
684 Brandon Saad
694 Tim Schaller
698 Cameron Schilling
700 Nate Schmidt
707 Rob Scuderi
716 Tim Sestito
717 Tom Sestito
737 Jim Slater
773 Brian Strait
780 Mark Stuart
782 Chris Summers
784 Ryan Suter
791 Eric Tangradi
801 Nate Thompson
807 Jarred Tinordi
820 R.J. Umberger
823 James van Riemsdyk
825 Chris VandeVelde
844 David Warsofsky
846 Mike Weber
854 Joe Whitney
858 Colin Wilson
872 Keith Yandle
881 Jason Zucker

114 rows × 2 columns


In [160]:
can_left_shot = df[(df['Ctry'] == 'CAN') & (df['S'] == 'L')]

In [161]:
can_left_shot[["First Name", "Last Name"]]


Out[161]:
First Name Last Name
2 Luke Adam
4 Andrew Agozzino
6 Bryan Allen
9 Karl Alzner
12 Andy Andreoff
14 Mike Angelidis
19 Carter Ashton
21 Keith Aulie
27 Josh Bailey
29 Mark Barberio
33 Victor Bartley
36 Francois Beauchemin
37 Nathan Beaulieu
39 Matt Beleskey
42 Jamie Benn
43 Jordie Benn
45 Sam Bennett
46 Andre Benoit
52 Bryan Bickell
64 Alexandre Bolduc
70 Patrick Bordeleau
71 Mark Borowiecki
74 Eric Boulton
75 Lance Bouma
76 Michael Bournival
77 Gabriel Bourque
78 Rene Bourque
80 Jay Bouwmeester
83 Zach Boychuk
88 Derick Brassard
... ... ...
763 Alexander Steen
768 Karl Stollery
771 Clayton Stoner
776 Ben Street
779 Brad Stuart
786 Brett Sutter
789 Max Talbot
792 Alex Tanguay
796 John Tavares
799 Chris Terry
803 Joe Thornton
805 Chris Tierney
809 Jonathan Toews
817 Dana Tyrell
821 Scottie Upshall
822 David Van Der Gulik
827 Philip Varone
829 Stephane Veilleux
830 Antoine Vermette
836 Marc-Edouard Vlasic
838 Aaron Volpatti
850 Stephen Weiss
856 Patrick Wiercioch
859 Garrett Wilson
860 Ryan Wilson
861 Scott Wilson
864 Daniel Winnik
868 Brendan Woods
869 Tyler Wotherspoon
878 Harry Zolnierczyk

282 rows × 2 columns


In [162]:
usa_right_shot = df[(df['Ctry'] == 'USA') & (df['S'] == 'R')]

In [163]:
usa_right_shot[["First Name", "Last Name"]]


Out[163]:
First Name Last Name
8 Mark Alt
16 Mark Arcobello
20 Cam Atkinson
22 David Backes
26 Casey Bailey
44 Beau Bennett
51 Stu Bickel
57 Nick Bjugstad
59 Jonathon Blum
63 Zach Bogosian
65 Jared Boll
89 Justin Braun
98 Chris Brown
99 Dustin Brown
100 J.T. Brown
101 Mike Brown
102 Patrick Brown
105 Adam Burish
109 Dustin Byfuglien
111 Ryan Callahan
120 John Carlson
134 Mat Clark
137 Adam Clendening
153 Erik Condra
165 Charlie Coyle
168 B.J. Crombeen
207 Patrick Dwyer
236 Justin Faulk
237 Mark Fayne
242 Brian Ferlin
... ... ...
653 Dylan Reese
672 Bobby Robins
676 Chad Ruhwedel
679 Bryan Rust
681 Bobby Ryan
687 Henrik Samuelsson
701 Jordan Schroeder
722 Kevin Shattenkirk
727 Drew Shore
728 Nick Shore
734 Mike Sislo
735 Jack Skille
739 Ben Smith
742 Craig Smith
757 Drew Stafford
764 Lee Stempniak
765 Derek Stepan
785 Brandon Sutter
797 Matt Tennyson
812 Vincent Trocheck
813 Corey Tropp
814 Zach Trotman
815 Jacob Trouba
824 Trevor van Riemsdyk
835 Joe Vitale
842 Chris Wagner
852 Blake Wheeler
863 Tommy Wingels
865 James Wisniewski
866 Luke Witkowski

108 rows × 2 columns


In [165]:
can_right_shot = df[(df['Ctry'] == 'CAN') & (df['S'] == 'R')]

In [168]:
can_right_shot[["First Name", "Last Name"]]


Out[168]:
First Name Last Name
5 Jason Akeson
10 Josh Anderson
31 Tyson Barrie
34 Kyle Baun
35 Jay Beagle
38 Taylor Beck
41 Brett Bellemore
48 Patrice Bergeron
50 Steve Bernier
53 Alex Biega
54 Danny Biega
55 Kevin Bieksa
58 Jesse Blacker
60 Mike Blunden
61 Troy Bodie
66 Dave Bolland
72 Robert Bortuzzo
82 Johnny Boychuk
84 Brad Boyes
86 Dan Boyle
87 Tyler Bozak
92 Daniel Briere
95 Kyle Brodziak
97 Troy Brouwer
106 Brent Burns
122 Sam Carrick
123 Jeff Carter
125 Cody Ceci
129 Alex Chiasson
135 David Clarkson
... ... ...
749 Jason Spezza
751 Jared Spurgeon
760 Steven Stamkos
766 Chris Stewart
767 Jarret Stoll
769 Mark Stone
770 Michael Stone
772 Tyson Strachan
778 Ryan Strome
781 P.K. Subban
787 Brody Sutter
788 Jordan Szwarz
790 Christopher Tanev
800 Christian Thomas
802 Chris Thorburn
804 Shawn Thornton
810 Tyler Toffoli
811 Jordin Tootoo
816 Kyle Turris
831 Kris Versteeg
832 Linden Vey
843 Joel Ward
845 Mike Weaver
847 Shea Weber
849 Dale Weise
853 Ryan White
855 Dennis Wideman
857 Justin Williams
862 Tom Wilson
874 Travis Zajac

171 rows × 2 columns

Correlation between Country and Draft Year


In [303]:
plt.style.use('seaborn-deep')
df.head(5).plot(kind='bar', x='Ctry', y='Draft')


Out[303]:
<matplotlib.axes._subplots.AxesSubplot at 0x1171ec9b0>

In [185]:
df


Out[185]:
# DOB Birth City S/P Ctry Nat HT Wt S Draft ... dFenwickImpact dFenwick60 Days Ginj Injury Cap Cost CHIP Bonuses GVS birthyear
0 8.0 Feb 25 '87 Muskegon MI USA US 74 218 L 2005.0 ... -9.36 -0.60 186 11.0 Hand, Shoulder 1.800 0.088 0.000 5.340426 Feb 25 '87
1 41.0 Jul 16 '87 Edina MN USA US 75 202 L NaN ... 10.41 22.57 29 NaN NaN 0.106 0.000 0.000 -0.443079 Jul 16 '87
2 25.0 Jun 18 '90 St. John's NL CAN CA 74 206 L 2008.0 ... 0.95 3.33 5 NaN NaN 0.017 0.000 0.000 -0.104713 Jun 18 '90
3 27.0 Apr 26 '77 Seria NaN BRN NaN 72 200 R 1996.0 ... -19.42 -2.36 186 5.0 Undisclosed 0.700 0.043 0.000 0.980851 Apr 26 '77
4 32.0 Jan 03 '91 Kleinburg ON CAN CA 70 187 L NaN ... 0.41 2.26 2 NaN NaN 0.006 0.000 0.000 0.299817 Jan 03 '91
5 42.0 Jun 03 '90 Ottawa ON CAN CA 70 190 R NaN ... -20.56 -12.23 54 NaN NaN 0.167 0.000 0.000 -0.515580 Jun 03 '90
6 6.0 Aug 21 '80 Kingston ON CAN CA 77 223 L 1998.0 ... 6.21 4.94 186 20.0 Lower body, Flu 3.022 0.854 0.000 -5.159574 Aug 21 '80
7 NaN Jan 31 '90 Chicago IL USA US 73 210 L NaN ... 2.45 3.25 8 NaN NaN 0.076 0.000 0.850 -0.411370 Jan 31 '90
8 39.0 Oct 18 '91 Kansas City MO USA US 76 201 R 2010.0 ... 3.85 21.90 2 NaN NaN 0.010 0.000 0.110 -0.208694 Oct 18 '91
9 27.0 Sep 24 '88 Burnaby BC CAN CA 74 217 L 2007.0 ... -17.26 -0.77 186 NaN NaN 2.800 0.000 0.000 2.412766 Sep 24 '88
10 53.0 May 07 '94 Burlington ON CAN CA 75 212 R 2012.0 ... -3.28 -2.36 11 NaN NaN 0.053 0.000 0.282 -0.543560 May 07 '94
11 18.0 Feb 05 '89 Munkedal NaN SWE SE 74 211 L 2007.0 ... -45.28 -4.40 186 1.0 Illness 0.733 0.009 0.000 -0.689362 Feb 05 '89
12 15.0 May 17 '91 Pickering ON CAN CA 73 207 L 2011.0 ... -37.39 -14.32 186 NaN NaN 0.550 0.000 0.000 1.000000 May 17 '91
13 58.0 Mar 21 '93 Zurich NaN CHE CH 69 183 L 2013.0 ... -10.55 -6.93 35 NaN NaN 0.141 0.000 0.125 -0.279799 Mar 21 '93
14 15.0 Jun 27 '85 Woodbridge ON CAN CA 73 212 L NaN ... -4.45 -11.43 8 NaN NaN 0.028 0.000 0.000 -0.009243 Jun 27 '85
15 42.0 May 24 '88 Yaroslavl NaN RUS RU 76 198 L 2006.0 ... 63.66 6.07 186 30.0 Arm, Concussion 3.283 0.921 0.000 -2.814894 May 24 '88
16 36.0 Aug 12 '88 Milford CT USA US 68 172 R NaN ... 23.20 9.94 186 NaN NaN 0.601 0.000 0.000 5.491489 Aug 12 '88
17 33.0 May 31 '93 Pori NaN FIN FI 75 192 R 2011.0 ... -1.27 -5.21 1 NaN NaN 0.007 0.000 0.700 -0.008602 May 31 '93
18 38.0 Apr 08 '93 Skellefteå NaN SWE SE 69 172 R 2014.0 ... -2.54 -2.48 12 NaN NaN 0.042 0.000 0.035 -0.213864 Apr 08 '93
19 37.0 Apr 01 '91 Winnipeg MB CAN CA 75 215 L 2009.0 ... -1.24 -1.70 48 NaN NaN 0.219 0.000 0.000 -0.763967 Apr 01 '91
20 13.0 Jun 05 '89 Riverside CT USA US 68 174 R 2008.0 ... -16.26 -0.97 186 4.0 Facial, Upper body 1.150 0.014 0.000 5.623404 Jun 05 '89
21 22.0 Jun 11 '89 Rouleau SK CAN CA 78 222 L 2007.0 ... -16.16 -2.31 160 NaN NaN 0.688 0.000 0.000 -0.957195 Jun 11 '89
22 42.0 May 01 '84 Minneapolis MN USA US 75 221 R 2003.0 ... 0.67 0.04 186 1.0 Concussion 4.500 0.055 0.000 4.295745 May 01 '84
23 11.0 Mar 17 '89 Vasteras NaN SWE SE 72 198 L 2007.0 ... 52.88 4.40 186 30.0 Abdominal, Illness 1.500 0.530 0.000 4.678723 Mar 17 '89
24 19.0 Nov 23 '87 Gävle NaN SWE SE 73 208 L 2006.0 ... 35.33 1.67 186 NaN NaN 6.700 0.000 0.000 2.314894 Nov 23 '87
25 47.0 Oct 05 '92 Bern NaN CHE CH 71 190 L 2011.0 ... -2.09 -7.16 60 1.0 Illness 0.460 0.017 1.062 0.298765 Oct 05 '92
26 37.0 Oct 27 '91 ANCHORAGE AK USA US 75 195 R NaN ... 9.56 10.93 18 NaN NaN 0.131 0.000 0.025 0.334523 Oct 27 '91
27 12.0 Oct 02 '89 Bowmanville ON CAN CA 73 194 L 2008.0 ... -87.98 -5.23 186 12.0 Hand, Lower body, Undisclosed, Upper body 3.300 0.322 0.000 2.548936 Oct 02 '89
28 2.0 Nov 26 '82 Baudette MN USA US 71 204 L 2002.0 ... -20.28 -7.84 186 64.0 Concussion, Illness 1.500 1.024 0.000 -2.821277 Nov 26 '82
29 8.0 Mar 23 '90 Montreal QC CAN CA 73 199 L 2008.0 ... -19.31 -1.42 186 NaN NaN 0.874 0.000 0.000 -0.589362 Mar 23 '90
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
852 26.0 Aug 31 '86 Plymouth MN USA US 77 225 R 2004.0 ... 42.46 2.36 186 2.0 Lower body 5.600 0.137 0.000 3.855319 Aug 31 '86
853 25.0 Mar 17 '88 Brandon MB CAN CA 72 201 R 2006.0 ... 24.68 4.08 166 39.0 Pectoral 0.513 0.273 0.000 3.052894 Mar 17 '88
854 33.0 Feb 06 '88 Reading MA USA US 66 170 L NaN ... -8.44 -18.07 11 NaN NaN 0.034 0.000 0.000 -0.103134 Feb 06 '88
855 6.0 Mar 20 '83 Kitchener ON CAN CA 72 200 R 2002.0 ... -139.37 -5.40 186 NaN NaN 5.250 0.000 0.000 4.900000 Mar 20 '83
856 46.0 Sep 12 '90 Burnaby BC CAN CA 77 206 L 2008.0 ... 100.40 7.37 186 8.0 Undisclosed 2.000 0.122 0.000 -2.085106 Sep 12 '90
857 14.0 Oct 04 '81 Cobourg ON CAN CA 73 189 R 2000.0 ... 11.96 0.65 186 1.0 Eye 3.650 0.045 0.000 1.104255 Oct 04 '81
858 33.0 Oct 20 '89 Greenwich CT USA US 73 216 L 2008.0 ... 9.07 0.53 186 5.0 Lower body, Upper body 2.000 0.049 0.000 6.914894 Oct 20 '89
859 28.0 Mar 16 '91 Barrie ON CAN CA 74 199 L 2009.0 ... 1.82 6.93 5 NaN NaN 0.019 0.000 0.000 -0.408968 Mar 16 '91
860 44.0 Feb 03 '87 Windsor ON CAN CA 73 210 L NaN ... 1.95 4.76 186 78.0 Shoulder, Undisclosed 2.250 2.058 0.000 -4.217021 Feb 03 '87
861 43.0 Apr 24 '92 Oakville ON CAN CA 71 183 L 2011.0 ... -1.62 -28.10 46 18.0 Leg 0.153 0.203 0.282 -0.036124 Apr 24 '92
862 43.0 Mar 29 '94 Toronto ON CAN CA 76 210 R 2012.0 ... 30.22 2.49 178 9.0 Head, Leg, Lower body 1.238 0.032 0.400 -0.514162 Mar 29 '94
863 57.0 Apr 12 '88 Evanston IL USA US 72 200 R 2008.0 ... -94.60 -5.77 186 7.0 Hand 2.475 0.211 0.000 3.104255 Apr 12 '88
864 26.0 Mar 06 '85 Toronto ON CAN CA 74 207 L 2004.0 ... 85.03 12.63 186 2.0 Head 1.139 0.032 0.000 9.546809 Mar 06 '85
865 20.0 Feb 21 '84 Canton MI USA US 71 203 R 2002.0 ... 22.66 9.55 186 8.0 Foot, Finger, Lower body 5.500 0.402 0.000 -6.331915 Feb 21 '84
866 53.0 Apr 14 '90 Holland MI USA US 74 200 R 2008.0 ... 2.47 0.66 62 NaN NaN 0.292 0.000 0.247 -0.831206 Apr 14 '90
867 45.0 Sep 15 '89 Dusseldorf NaN DEU NaN 75 215 L NaN ... 0.62 1.47 26 3.0 Leg 0.129 0.034 0.058 -0.110890 Sep 15 '89
868 56.0 Jun 11 '92 Humboldt SK CAN CA 76 210 L 2012.0 ... -3.07 -14.64 3 NaN NaN 0.012 0.000 0.025 -0.206658 Jun 11 '92
869 26.0 Mar 12 '93 Burnaby BC CAN CA 74 210 L 2011.0 ... 2.99 10.24 22 NaN NaN 0.109 0.000 0.000 -0.093503 Mar 12 '93
870 39.0 Oct 04 '94 Nizhnekamsk NaN RUS RU 77 232 L 2013.0 ... -1.06 -6.35 2 NaN NaN 0.010 0.000 0.133 -0.208694 Oct 04 '94
871 10.0 Oct 06 '93 Nizhnekamsk NaN RUS RU 71 197 L 2012.0 ... -88.83 -5.06 186 1.0 Groin 3.775 0.046 2.850 -6.261702 Oct 06 '93
872 93.0 Sep 09 '86 Boston MA USA US 73 190 L 2005.0 ... -32.70 -2.86 186 NaN NaN 4.658 0.000 0.000 -0.540426 Sep 09 '86
873 51.0 Apr 16 '95 Moscow NaN RUS RU 77 220 L 2013.0 ... 26.28 1.72 186 NaN NaN 1.744 0.000 0.850 -2.140426 Apr 16 '95
874 19.0 May 13 '85 Winnipeg MB CAN CA 75 205 R 2004.0 ... 14.40 0.82 186 8.0 Lower body 5.750 0.561 0.000 -10.463830 May 13 '85
875 40.0 Oct 09 '80 Njurunda NaN SWE SE 72 195 L 1999.0 ... -50.04 -2.70 186 4.0 Head 6.083 0.297 0.000 -1.672340 Oct 09 '80
876 93.0 Apr 18 '93 Stockholm NaN SWE SE 74 211 R 2011.0 ... -42.91 -2.56 186 NaN NaN 1.744 0.000 0.850 6.159574 Apr 18 '93
877 28.0 Feb 03 '77 Most NaN CZE CZ 71 190 R 2001.0 ... 3.98 3.35 186 NaN NaN 3.779 0.000 2.000 -1.970213 Feb 03 '77
878 16.0 Sep 01 '87 Toronto ON CAN CA 72 185 L NaN ... -1.26 -3.66 4 NaN NaN 0.013 0.000 0.000 -0.202494 Sep 01 '87
879 8.0 Jun 16 '78 Elektrenai NaN LTU LT 77 225 L 1996.0 ... -11.44 -0.73 186 8.0 Leg 3.100 0.302 0.000 -7.525532 Jun 16 '78
880 36.0 Sep 01 '87 Oslo NaN NOR NO 67 179 L NaN ... 15.78 0.87 186 4.0 Lower body, Shoulder, Soreness 3.500 0.043 0.000 3.423404 Sep 01 '87
881 16.0 Jan 16 '92 Newport Beach CA USA US 71 188 L 2010.0 ... 23.26 2.15 186 31.0 Collarbone, Illness 0.900 0.296 0.000 6.255319 Jan 16 '92

882 rows × 121 columns


In [ ]: