Skip to content

Instantly share code, notes, and snippets.

@queuebit
Last active October 31, 2019 18:19
Show Gist options
  • Save queuebit/4dc9554111010174776e5fecbfc70af1 to your computer and use it in GitHub Desktop.
Save queuebit/4dc9554111010174776e5fecbfc70af1 to your computer and use it in GitHub Desktop.
TS - Python | pandas
numpy==1.11.2
scipy==0.18.1
pandas==0.19.0
player position team height weight bmi age
#27 - L.Fournette RB jax 6--0 228 30.9 24.8
#32 - C.Carson RB sea 5--11 222 31 25.1
#33 - D.Cook RB min 5--10 210 30.1 24.2
#22 - D.Henry RB ten 6--3 247 30.9 25.8
#22 - C.McCaffrey RB car 5--11 205 28.6 23.4
#26 - S.Michel RB ne 5--11 215 30 24.7
#25 - M.Mack RB ind 6--0 210 28.5 23.6
#21 - E.Elliott RB dal 6--0 228 30.9 24.3
#24 - N.Chubb RB cle 5--11 225 31.4 23.8
#23 - C.Hyde RB hou 6--0 229 31.1 29.1
#28 - J.Jacobs RB oak 5--10 220 31.6 21.7
#33 - A.Jones RB gb 5--9 208 30.7 24.9
#30 - P.Lindsay RB den 5--8 190 28.9 25.3
#26 - L.Bell RB nyj 6--1 225 29.7 27.7
#28 - J.Mixon HB cin 6--1 220 29 23.3
#24 - J.Howard RB phi 6--0 224 30.4 25
#32 - D.Montgomery RB chi 5--10 222 31.9 22.4
#26 - A.Peterson RB was 6--1 220 29 34.6
#30 - J.Conner RB pit 6--1 233 30.7 24.5
#24 - D.Freeman RB atl 5--8 206 31.3 27.6
#20 - F.Gore RB buf 5--9 212 31.3 36.5
#33 - K.Johnson RB det 5--11 211 29.4 22.3
#21 - M.Ingram RB bal 5--9 215 31.7 29.9
#30 - T.Gurley RB la 6--1 224 29.6 25.2
#28 - R.Freeman RB den 6--0 238 32.3 23.7
#41 - A.Kamara RB no 5--10 215 30.8 24.3
#22 - M.Breida RB sf 5--11 190 26.5 24.7
#28 - L.Murray RB no 6--3 230 28.7 29.8
#25 - P.Barber RB tb 5--11 225 31.4 25.7
#27 - R.Jones RB tb 5--11 208 29 22.2
#26 - S.Barkley RB nyg 6--0 233 31.6 22.7
#31 - D.Johnson RB ari 6--1 224 29.6 27.9
#26 - T.Coleman RB sf 6--1 210 27.7 26.5
#25 - A.Mattison RB min 5--11 220 30.7 21.4
#25 - L.McCoy RB kc 5--11 210 29.3 31.3
#26 - M.Sanders RB phi 5--11 211 29.4 22.5
#30 - A.Ekeler RB lac 5--10 200 28.7 24.5
#29 - C.Edmonds RB ari 5--9 210 31 23.5
#31 - R.Mostert RB sf 5--10 197 28.3 27.6
#30 - J.Williams RB gb 6--0 213 28.9 24.6
#35 - G.Edwards RB bal 6--1 238 31.4 24.5
#26 - D.Williams RB kc 5--11 224 31.2 27.6
#25 - D.Johnson RB hou 5--9 210 31 26.1
#20 - T.Pollard RB dal 6--0 209 28.3 22.5
#25 - M.Gordon RB lac 6--1 215 28.4 26.5
#32 - K.Drake RB mia 6--1 211 27.8 25.8
#22 - M.Walton HB mia 5--10 200 28.7 22.6
#34 - M.Brown RB la 5--11 222 31 26.5
#33 - D.Washington RB oak 5--8 210 31.9 26.7
#31 - T.Johnson RB det 5--10 210 30.1 22.1
#25 - G.Bernard HB cin 5--9 205 30.3 27.9
#28 - J.Hilliman RB nyg 6--0 226 30.7 24
#20 - R.Penny RB sea 5--11 220 30.7 23.7
#27 - D.Henderson RB la 5--8 200 30.4 22.2
#24 - B.Snell RB pit 5--10 223 32 21.7
#27 - K.Ballage RB mia 6--2 230 29.5 23.9
#22 - W.Gallman RB nyg 6--0 210 28.5 25.1
#34 - R.Burkhead RB ne 5--10 215 30.8 29.3
#30 - J.Wilson RB sf 6--0 194 26.3 24
#29 - T.Cohen RB chi 5--6 191 30.8 24.3
#28 - J.White RB ne 5--10 205 29.4 27.7
#25 - C.Thompson RB was 5--8 195 29.6 29
#20 - J.Wilkins RB ind 6--1 217 28.6 25.3
#25 - I.Smith RB atl 5--9 195 28.8 24.1
#31 - D.Williams RB kc 5--11 224 31.2 24.5
#26 - D.Singletary RB buf 5--7 203 31.8 22.2
#23 - R.Armstead RB jax 5--11 220 30.7 23
#38 - J.Samuels RB pit 6--0 225 30.5 23.3
#21 - N.Hines RB ind 5--9 198 29.2 23
#22 - J.Jackson RB lac 6--0 200 27.1 23.5
#43 - J.Hill RB bal 5--10 200 28.7 22
#33 - D.Lewis RB ten 5--8 195 29.6 29.1
#26 - C.Anderson RB det 5--8 225 34.2 28.7
#43 - D.Sproles RB phi 5--6 190 30.7 36.4
#41 - J.McKissic RB det 5--10 195 28 26.2
#35 - B.Scott RB phi 5--6 203 32.8 24.5
#34 - W.Smallwood RB was 5--10 208 29.8 25.8
#30 - J.Richard RB oak 5--8 207 31.5 26
#22 - C.Prosise RB sea 6--1 225 29.7 25.4
#38 - B.Bolden RB ne 5--11 220 30.7 29.8
#39 - E.Penny FB nyg 6--1 234 30.9 26.2
#34 - T.Carson RB gb 5--11 228 31.8 27
#88 - T.Montgomery RB nyj 6--0 216 29.3 26.8
#25 - M.Davis RB chi 5--9 221 32.6 26.7
#29 - D.Guice RB was 5--11 225 31.4 22.4
#22 - T.Yeldon RB buf 6--1 223 29.4 26.1
#25 - D.Hilliard RB cle 5--11 202 28.2 24.7
#23 - B.Hill HB atl 6--1 219 28.9 24
#39 - R.Bonnafon RB car 6--0 215 29.2 23.8
#29 - B.Powell RB nyj 5--10 204 29.3 31
#34 - T.Carson RB gb 5--11 228 31.8 27
#31 - A.Abdullah RB min 5--9 203 30 26.4
#34 - D.Thompson RB kc 5--8 200 30.4 22.7
#37 - D.Harris RB ne 5--11 215 30 22.7
#44 - D.Ogunbowale RB tb 5--11 205 28.6 25.5
#34 - D.Watt FB lac 6--2 234 30 27
#30 - D.Johnson RB cle 5--10 208 29.8 23.7
#20 - J.Scarlett RB car 5--11 210 29.3 24.3
#42 - Z.Line FB no 6--1 233 30.7 29.5
#40 - A.Armah FB car 6--2 255 32.7 25.5
#45 - A.Ingold FB oak 6--1 242 31.9 23.3
#22 - D.Williams RB gb 5--11 212 29.6 22.8
#26 - P.Perkins RB det 5--11 213 29.7 25
#27 - D.Washington RB no 6--1 223 29.4 25.5
#42 - J.Kelly RB la 5--10 205 29.4 23.1
#42 - A.Sherman FB kc 5--10 242 34.7 30.9
#23 - M.Boone RB min 5--10 205 29.4 24.3
#28 - D.Dawkins RB ten 5--7 183 28.7 24.8
#42 - P.DiMarco FB buf 6--1 234 30.9 30.5
#35 - T.Pope RB lac 5--8 205 31.2 25.9
#46 - J.Develin FB ne 6--3 255 31.9 31.3
#44 - K.Juszczyk FB sf 6--1 240 31.7 28.5
#22 - Z.Zenner RB no 5--11 224 31.2 28.1
#30 - C.Ham FB min 5--11 235 32.8 26.3
#40 - K.Smith FB atl 6--0 240 32.5 27.6
#38 - K.Barner RB atl 5--9 195 28.8 30.5
#45 - D.Vitale FB gb 6--0 239 32.4 26
#33 - T.Edmunds RB pit 6--2 223 28.6 24.8
#22 - Z.Zenner RB no 5--11 224 31.2 28.1
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Import `pandas` package"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"2. Read in `runningbacks.csv` file using `pandas` into a `DataFrame`"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"3. Print out the mean, median, mode of `weight` for all runningbacks in the dataset"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"4. Print out the mean, median, mode of `height` for all runningbacks in the dataset"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
# 1. Import `pandas` package
# 2. Read in `runningbacks.csv` file using `pandas` into a `DataFrame`
# 3. Print out the mean, median, mode of `weight` for all runningbacks in the dataset
# 4. Print out the mean, median, mode of `height` for all runningbacks in the dataset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment