This server is intended for use for Academic Classwork related Git repositories only. Projects/repositories will generally be removed after 6 months following close of the semester. Inactive repositories from previous semester are now being archived when no activity for 365 days. They are renamed and marked as 'archived'. After 90 days in that state they will be removed from the system completely.

Commit f721a612 authored by henrycwong's avatar henrycwong

update csv for teams

parent 6c5d2971
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
......@@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
......@@ -20,7 +20,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 33,
"metadata": {},
"outputs": [
{
......@@ -218,7 +218,7 @@
"[5 rows x 98 columns]"
]
},
"execution_count": 3,
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
......@@ -229,7 +229,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 34,
"metadata": {},
"outputs": [],
"source": [
......@@ -257,7 +257,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
......@@ -266,7 +266,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
......@@ -369,7 +369,32 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 30,
"metadata": {},
"outputs": [
{
"ename": "AttributeError",
"evalue": "Can only use .str accessor with string values!",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-30-226c4d3e6baa>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"champion\"\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdf\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"champion\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlower\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36m__getattr__\u001b[1;34m(self, name)\u001b[0m\n\u001b[0;32m 5268\u001b[0m \u001b[1;32mor\u001b[0m \u001b[0mname\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_accessors\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5269\u001b[0m ):\n\u001b[1;32m-> 5270\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0mobject\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__getattribute__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 5271\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5272\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_info_axis\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_can_hold_identifiers_and_holds_name\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\accessor.py\u001b[0m in \u001b[0;36m__get__\u001b[1;34m(self, obj, cls)\u001b[0m\n\u001b[0;32m 185\u001b[0m \u001b[1;31m# we're accessing the attribute of the class, i.e., Dataset.geo\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 186\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_accessor\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 187\u001b[1;33m \u001b[0maccessor_obj\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_accessor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 188\u001b[0m \u001b[1;31m# Replace the property with the accessor object. Inspired by:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 189\u001b[0m \u001b[1;31m# http://www.pydanny.com/cached-property.html\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\strings.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, data)\u001b[0m\n\u001b[0;32m 2039\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2040\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0m__init__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdata\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2041\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_inferred_dtype\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_validate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2042\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_categorical\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mis_categorical_dtype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2043\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_string\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mname\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;34m\"string\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\strings.py\u001b[0m in \u001b[0;36m_validate\u001b[1;34m(data)\u001b[0m\n\u001b[0;32m 2096\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2097\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0minferred_dtype\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mallowed_types\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2098\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Can only use .str accessor with string values!\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2099\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0minferred_dtype\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2100\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mAttributeError\u001b[0m: Can only use .str accessor with string values!"
]
}
],
"source": [
"df.loc[df.index,\"champion\"] = df[\"champion\"].str.lower()"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
......@@ -378,6 +403,25 @@
"text": [
"{' ': 0, 'Aatrox': 1, 'Ahri': 2, 'Akali': 3, 'Alistar': 4, 'Amumu': 5, 'Anivia': 6, 'Annie': 7, 'Aphelios': 8, 'Ashe': 9, 'AurelionSol': 10, 'Azir': 11, 'Bard': 12, 'Blitzcrank': 13, 'Brand': 14, 'Braum': 15, 'Caitlyn': 16, 'Camille': 17, 'Cassiopeia': 18, \"Cho'gath\": 19, 'Corki': 20, 'Darius': 21, 'Diana': 22, 'Dr. Mundo': 23, 'Draven': 24, 'Ekko': 25, 'Elise': 26, 'Evelynn': 27, 'Ezreal': 28, 'Fiddlesticks': 29, 'Fiora': 30, 'Fizz': 31, 'Galio': 32, 'Gangplank': 33, 'Garen': 34, 'Gnar': 35, 'Gragas': 36, 'Graves': 37, 'Hecarim': 38, 'Heimerdinger': 39, 'Illaoi': 40, 'Irelia': 41, 'Ivern': 42, 'Janna': 43, 'Jarvan IV': 44, 'Jax': 45, 'Jayce': 46, 'Jhin': 47, 'Jinx': 48, \"Kai'Sa\": 49, 'Kalista': 50, 'Karma': 51, 'Karthus': 52, 'Kassadin': 53, 'Katarina': 54, 'Kayle': 55, 'Kayn': 56, 'Kennen': 57, \"Kha'Zix\": 58, 'Kindred': 59, 'Kled': 60, \"Kog'Maw\": 61, 'LeBlanc': 62, 'Lee Sin': 63, 'Leona': 64, 'Lissandra': 65, 'Lucian': 66, 'Lulu': 67, 'Lux': 68, 'Malphite': 69, 'Malzahar': 70, 'Maokai': 71, 'Master Yi': 72, 'Miss Fortune': 73, 'Mordekaiser': 74, 'Morgana': 75, 'Nami': 76, 'Nasus': 77, 'Nautilus': 78, 'Neeko': 79, 'Nidalee': 80, 'Nocturne': 81, 'Nunu and Willump': 82, 'Olaf': 83, 'Orianna': 84, 'Ornn': 85, 'Pantheon': 86, 'Poppy': 87, 'Pyke': 88, 'Qiyana': 89, 'Quinn': 90, 'Rakan': 91, 'Rammus': 92, \"Rek'Sai\": 93, 'Renekton': 94, 'Rengar': 95, 'Riven': 96, 'Rumble': 97, 'Ryze': 98, 'Sejuani': 99, 'Senna': 100, 'Sett': 101, 'Shaco': 102, 'Shen': 103, 'Shyvana': 104, 'Singed': 105, 'Sion': 106, 'Sivir': 107, 'Skarner': 108, 'Sona': 109, 'Soraka': 110, 'Swain': 111, 'Sylas': 112, 'Syndra': 113, 'Tahm Kench': 114, 'Taliyah': 115, 'Talon': 116, 'Taric': 117, 'Teemo': 118, 'Thresh': 119, 'Tristana': 120, 'Trundle': 121, 'Tryndamere': 122, 'TwistedFate': 123, 'Twitch': 124, 'Udyr': 125, 'Urgot': 126, 'Varus': 127, 'Vayne': 128, 'Veigar': 129, \"Vel'koz\": 130, 'Vi': 131, 'Viktor': 132, 'Vladimir': 133, 'Volibear': 134, 'Warwick': 135, 'Wukong': 136, 'Xayah': 137, 'Xerath': 138, 'Xin Zhao': 139, 'Yasuo': 140, 'Yorick': 141, 'Yuumi': 142, 'Zac': 143, 'Zed': 144, 'Ziggs': 145, 'Zilean': 146, 'Zoe': 147, 'Zyra': 148}\n"
]
},
{
"ename": "TypeError",
"evalue": "Cannot compare types 'ndarray(dtype=int64)' and 'str'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-26-9d5b52cfd31c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mchampDict\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;31m#df[\"champion\"].unique()\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m \u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"champion\"\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"champion\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreplace\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mchampDict\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\series.py\u001b[0m in \u001b[0;36mreplace\u001b[1;34m(self, to_replace, value, inplace, limit, regex, method)\u001b[0m\n\u001b[0;32m 4176\u001b[0m \u001b[0mlimit\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mlimit\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4177\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mregex\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 4178\u001b[1;33m \u001b[0mmethod\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmethod\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4179\u001b[0m )\n\u001b[0;32m 4180\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36mreplace\u001b[1;34m(self, to_replace, value, inplace, limit, regex, method)\u001b[0m\n\u001b[0;32m 6644\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 6645\u001b[0m return self.replace(\n\u001b[1;32m-> 6646\u001b[1;33m \u001b[0mto_replace\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0minplace\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0minplace\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlimit\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mlimit\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mregex\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 6647\u001b[0m )\n\u001b[0;32m 6648\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\series.py\u001b[0m in \u001b[0;36mreplace\u001b[1;34m(self, to_replace, value, inplace, limit, regex, method)\u001b[0m\n\u001b[0;32m 4176\u001b[0m \u001b[0mlimit\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mlimit\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4177\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mregex\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 4178\u001b[1;33m \u001b[0mmethod\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmethod\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4179\u001b[0m )\n\u001b[0;32m 4180\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36mreplace\u001b[1;34m(self, to_replace, value, inplace, limit, regex, method)\u001b[0m\n\u001b[0;32m 6697\u001b[0m \u001b[0mdest_list\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mvalue\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 6698\u001b[0m \u001b[0minplace\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0minplace\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 6699\u001b[1;33m \u001b[0mregex\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mregex\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 6700\u001b[0m )\n\u001b[0;32m 6701\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\internals\\managers.py\u001b[0m in \u001b[0;36mreplace_list\u001b[1;34m(self, src_list, dest_list, inplace, regex)\u001b[0m\n\u001b[0;32m 611\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0m_compare_or_regex_search\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 612\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 613\u001b[1;33m \u001b[0mmasks\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mcomp\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ms\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mi\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ms\u001b[0m \u001b[1;32min\u001b[0m \u001b[0menumerate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msrc_list\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 614\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 615\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\internals\\managers.py\u001b[0m in \u001b[0;36m<listcomp>\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 611\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0m_compare_or_regex_search\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 612\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 613\u001b[1;33m \u001b[0mmasks\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mcomp\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ms\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mi\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ms\u001b[0m \u001b[1;32min\u001b[0m \u001b[0menumerate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msrc_list\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 614\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 615\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\internals\\managers.py\u001b[0m in \u001b[0;36mcomp\u001b[1;34m(s, regex)\u001b[0m\n\u001b[0;32m 609\u001b[0m \u001b[0mmaybe_convert_objects\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0masm8\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 610\u001b[0m )\n\u001b[1;32m--> 611\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0m_compare_or_regex_search\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 612\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 613\u001b[0m \u001b[0mmasks\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mcomp\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ms\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mregex\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mi\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ms\u001b[0m \u001b[1;32min\u001b[0m \u001b[0menumerate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msrc_list\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\newAnaconda3\\lib\\site-packages\\pandas\\core\\internals\\managers.py\u001b[0m in \u001b[0;36m_compare_or_regex_search\u001b[1;34m(a, b, regex)\u001b[0m\n\u001b[0;32m 1934\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1935\u001b[0m raise TypeError(\n\u001b[1;32m-> 1936\u001b[1;33m \u001b[1;34mf\"Cannot compare types {repr(type_names[0])} and {repr(type_names[1])}\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 1937\u001b[0m )\n\u001b[0;32m 1938\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mresult\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mTypeError\u001b[0m: Cannot compare types 'ndarray(dtype=int64)' and 'str'"
]
}
],
"source": [
......@@ -427,28 +471,234 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>gameid</th>\n",
" <th>url</th>\n",
" <th>league</th>\n",
" <th>split</th>\n",
" <th>date</th>\n",
" <th>week</th>\n",
" <th>game</th>\n",
" <th>patchno</th>\n",
" <th>playerid</th>\n",
" <th>side</th>\n",
" <th>...</th>\n",
" <th>gdat15</th>\n",
" <th>xpat10</th>\n",
" <th>oppxpat10</th>\n",
" <th>xpdat10</th>\n",
" <th>csat10</th>\n",
" <th>oppcsat10</th>\n",
" <th>csdat10</th>\n",
" <th>csat15</th>\n",
" <th>oppcsat15</th>\n",
" <th>csdat15</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1002440062</td>\n",
" <td>https://matchhistory.na.leagueoflegends.com/en...</td>\n",
" <td>NALCS</td>\n",
" <td>2018-1</td>\n",
" <td>43120.659838</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>8.01</td>\n",
" <td>100</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>2387</td>\n",
" <td>18541</td>\n",
" <td>18703</td>\n",
" <td>-162</td>\n",
" <td>341</td>\n",
" <td>374</td>\n",
" <td>-33</td>\n",
" <td>551</td>\n",
" <td>599</td>\n",
" <td>-48</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1002440062</td>\n",
" <td>https://matchhistory.na.leagueoflegends.com/en...</td>\n",
" <td>NALCS</td>\n",
" <td>2018-1</td>\n",
" <td>43120.659838</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>8.01</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" <td>...</td>\n",
" <td>-2387</td>\n",
" <td>18703</td>\n",
" <td>18541</td>\n",
" <td>162</td>\n",
" <td>374</td>\n",
" <td>341</td>\n",
" <td>33</td>\n",
" <td>599</td>\n",
" <td>551</td>\n",
" <td>48</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1002440076</td>\n",
" <td>https://matchhistory.na.leagueoflegends.com/en...</td>\n",
" <td>NALCS</td>\n",
" <td>2018-1</td>\n",
" <td>43120.734965</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>8.01</td>\n",
" <td>100</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>-1609</td>\n",
" <td>19223</td>\n",
" <td>19671</td>\n",
" <td>-448</td>\n",
" <td>344</td>\n",
" <td>351</td>\n",
" <td>-7</td>\n",
" <td>560</td>\n",
" <td>564</td>\n",
" <td>-4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1002440076</td>\n",
" <td>https://matchhistory.na.leagueoflegends.com/en...</td>\n",
" <td>NALCS</td>\n",
" <td>2018-1</td>\n",
" <td>43120.734965</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>8.01</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" <td>...</td>\n",
" <td>1609</td>\n",
" <td>19671</td>\n",
" <td>19223</td>\n",
" <td>448</td>\n",
" <td>351</td>\n",
" <td>344</td>\n",
" <td>7</td>\n",
" <td>564</td>\n",
" <td>560</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1002440084</td>\n",
" <td>https://matchhistory.na.leagueoflegends.com/en...</td>\n",
" <td>NALCS</td>\n",
" <td>2018-1</td>\n",
" <td>43120.801632</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>8.01</td>\n",
" <td>100</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>836</td>\n",
" <td>19785</td>\n",
" <td>18502</td>\n",
" <td>1283</td>\n",
" <td>352</td>\n",
" <td>354</td>\n",
" <td>-2</td>\n",
" <td>557</td>\n",
" <td>569</td>\n",
" <td>-12</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 98 columns</p>\n",
"</div>"
],
"text/plain": [
" gameid url league \\\n",
"0 1002440062 https://matchhistory.na.leagueoflegends.com/en... NALCS \n",
"1 1002440062 https://matchhistory.na.leagueoflegends.com/en... NALCS \n",
"2 1002440076 https://matchhistory.na.leagueoflegends.com/en... NALCS \n",
"3 1002440076 https://matchhistory.na.leagueoflegends.com/en... NALCS \n",
"4 1002440084 https://matchhistory.na.leagueoflegends.com/en... NALCS \n",
"\n",
" split date week game patchno playerid side ... gdat15 \\\n",
"0 2018-1 43120.659838 1 1 8.01 100 0 ... 2387 \n",
"1 2018-1 43120.659838 1 1 8.01 200 1 ... -2387 \n",
"2 2018-1 43120.734965 1 1 8.01 100 0 ... -1609 \n",
"3 2018-1 43120.734965 1 1 8.01 200 1 ... 1609 \n",
"4 2018-1 43120.801632 1 1 8.01 100 0 ... 836 \n",
"\n",
" xpat10 oppxpat10 xpdat10 csat10 oppcsat10 csdat10 csat15 oppcsat15 \\\n",
"0 18541 18703 -162 341 374 -33 551 599 \n",
"1 18703 18541 162 374 341 33 599 551 \n",
"2 19223 19671 -448 344 351 -7 560 564 \n",
"3 19671 19223 448 351 344 7 564 560 \n",
"4 19785 18502 1283 352 354 -2 557 569 \n",
"\n",
" csdat15 \n",
"0 -48 \n",
"1 48 \n",
"2 -4 \n",
"3 4 \n",
"4 -12 \n",
"\n",
"[5 rows x 98 columns]"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": []
"source": [
"df.drop([\"split\",\"date\",\"week\",\"game\",\"patchno\",\"playerid\"],axis=1,inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 23,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'naDF' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-19-36f4d4679e14>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mnaDF\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mto_csv\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"naLCSTeamsNumericalized.csv\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'naDF' is not defined"
]
}
],
"outputs": [],
"source": [
"df.to_csv(\"naLCSTeamsNumericalized.csv\")"
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment