{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "stunning-architecture",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Warning: Your Kaggle API key is readable by other users on this system! To fix this, you can run 'chmod 600 /home/pogoda/.kaggle/kaggle.json'\n",
"Downloading chess.zip to /home/pogoda/dev/IUM\n",
"100%|██████████████████████████████████████| 2.77M/2.77M [00:00<00:00, 9.89MB/s]\n",
"100%|██████████████████████████████████████| 2.77M/2.77M [00:00<00:00, 9.05MB/s]\n"
]
}
],
"source": [
"!kaggle datasets download -d datasnaek/chess"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "sharp-burton",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Archive: chess.zip\n",
" inflating: games.csv \n"
]
}
],
"source": [
"!unzip -o chess.zip "
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "multiple-elder",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"id,rated,created_at,last_move_at,turns,victory_status,winner,increment_code,white_id,white_rating,black_id,black_rating,moves,opening_eco,opening_name,opening_ply\r",
"\r\n",
"TZJHLljE,FALSE,1.50421E+12,1.50421E+12,13,outoftime,white,15+2,bourgris,1500,a-00,1191,d4 d5 c4 c6 cxd5 e6 dxe6 fxe6 Nf3 Bb4+ Nc3 Ba5 Bf4,D10,Slav Defense: Exchange Variation,5\r",
"\r\n",
"l1NXvwaE,TRUE,1.50413E+12,1.50413E+12,16,resign,black,5+10,a-00,1322,skinnerua,1261,d4 Nc6 e4 e5 f4 f6 dxe5 fxe5 fxe5 Nxe5 Qd4 Nc6 Qe5+ Nxe5 c4 Bb4+,B00,Nimzowitsch Defense: Kennedy Variation,4\r",
"\r\n",
"mIICvQHh,TRUE,1.50413E+12,1.50413E+12,61,mate,white,5+10,ischia,1496,a-00,1500,e4 e5 d3 d6 Be3 c6 Be2 b5 Nd2 a5 a4 c5 axb5 Nc6 bxc6 Ra6 Nc4 a4 c3 a3 Nxa3 Rxa3 Rxa3 c4 dxc4 d5 cxd5 Qxd5 exd5 Be6 Ra8+ Ke7 Bc5+ Kf6 Bxf8 Kg6 Bxg7 Kxg7 dxe6 Kh6 exf7 Nf6 Rxh8 Nh5 Bxh5 Kg5 Rxh7 Kf5 Qf3+ Ke6 Bg4+ Kd6 Rh6+ Kc5 Qe3+ Kb5 c4+ Kb4 Qc3+ Ka4 Bd1#,C20,King's Pawn Game: Leonardis Variation,3\r",
"\r\n",
"kWKvrqYL,TRUE,1.50411E+12,1.50411E+12,61,mate,white,20+0,daniamurashov,1439,adivanov2009,1454,d4 d5 Nf3 Bf5 Nc3 Nf6 Bf4 Ng4 e3 Nc6 Be2 Qd7 O-O O-O-O Nb5 Nb4 Rc1 Nxa2 Ra1 Nb4 Nxa7+ Kb8 Nb5 Bxc2 Bxc7+ Kc8 Qd2 Qc6 Na7+ Kd7 Nxc6 bxc6 Bxd8 Kxd8 Qxb4 e5 Qb8+ Ke7 dxe5 Be4 Ra7+ Ke6 Qe8+ Kf5 Qxf7+ Nf6 Nh4+ Kg5 g3 Ng4 Qf4+ Kh5 Qxg4+ Kh6 Qf4+ g5 Qf6+ Bg6 Nxg6 Bg7 Qxg7#,D02,Queen's Pawn Game: Zukertort Variation,3\r",
"\r\n"
]
}
],
"source": [
"!head -n 5 games.csv "
]
},
{
"cell_type": "raw",
"id": "pressed-vancouver",
"metadata": {},
"source": [
"id - identyfikator gry\n",
"rated - czy gra rankingowa\n",
"created_at - timestamp utworzenia gry\n",
"last_move_at - timestamp ostatniego ruchu\n",
"turns - liczba posunięć\n",
"victory_status - sposób zakończenia rozgrywki\n",
"winner - wygrany gracz\n",
"increment_code - czas na partię i dodawany czas\n",
"white_id - id grającego białymi\n",
"white_ranking - ranking grającego białymi\n",
"black_id - id grającego czarnymi\n",
"black_ranking - ranking grającego czarnymi\n",
"moves - lista wykonanych posunięć\n",
"opening_eco - kod otwarcia\n",
"opening_name - nazwa otwarcia\n",
"opening_ply - liczba książkowych posunięć"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "talented-beatles",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" \n",
" id \n",
" rated \n",
" created_at \n",
" last_move_at \n",
" turns \n",
" victory_status \n",
" winner \n",
" increment_code \n",
" white_id \n",
" white_rating \n",
" black_id \n",
" black_rating \n",
" moves \n",
" opening_eco \n",
" opening_name \n",
" opening_ply \n",
" \n",
" \n",
" \n",
" \n",
" 0 \n",
" TZJHLljE \n",
" False \n",
" 1.504210e+12 \n",
" 1.504210e+12 \n",
" 13 \n",
" outoftime \n",
" white \n",
" 15+2 \n",
" bourgris \n",
" 1500 \n",
" a-00 \n",
" 1191 \n",
" d4 d5 c4 c6 cxd5 e6 dxe6 fxe6 Nf3 Bb4+ Nc3 Ba5... \n",
" D10 \n",
" Slav Defense: Exchange Variation \n",
" 5 \n",
" \n",
" \n",
" 1 \n",
" l1NXvwaE \n",
" True \n",
" 1.504130e+12 \n",
" 1.504130e+12 \n",
" 16 \n",
" resign \n",
" black \n",
" 5+10 \n",
" a-00 \n",
" 1322 \n",
" skinnerua \n",
" 1261 \n",
" d4 Nc6 e4 e5 f4 f6 dxe5 fxe5 fxe5 Nxe5 Qd4 Nc6... \n",
" B00 \n",
" Nimzowitsch Defense: Kennedy Variation \n",
" 4 \n",
" \n",
" \n",
" 2 \n",
" mIICvQHh \n",
" True \n",
" 1.504130e+12 \n",
" 1.504130e+12 \n",
" 61 \n",
" mate \n",
" white \n",
" 5+10 \n",
" ischia \n",
" 1496 \n",
" a-00 \n",
" 1500 \n",
" e4 e5 d3 d6 Be3 c6 Be2 b5 Nd2 a5 a4 c5 axb5 Nc... \n",
" C20 \n",
" King's Pawn Game: Leonardis Variation \n",
" 3 \n",
" \n",
" \n",
" 3 \n",
" kWKvrqYL \n",
" True \n",
" 1.504110e+12 \n",
" 1.504110e+12 \n",
" 61 \n",
" mate \n",
" white \n",
" 20+0 \n",
" daniamurashov \n",
" 1439 \n",
" adivanov2009 \n",
" 1454 \n",
" d4 d5 Nf3 Bf5 Nc3 Nf6 Bf4 Ng4 e3 Nc6 Be2 Qd7 O... \n",
" D02 \n",
" Queen's Pawn Game: Zukertort Variation \n",
" 3 \n",
" \n",
" \n",
" 4 \n",
" 9tXo1AUZ \n",
" True \n",
" 1.504030e+12 \n",
" 1.504030e+12 \n",
" 95 \n",
" mate \n",
" white \n",
" 30+3 \n",
" nik221107 \n",
" 1523 \n",
" adivanov2009 \n",
" 1469 \n",
" e4 e5 Nf3 d6 d4 Nc6 d5 Nb4 a3 Na6 Nc3 Be7 b4 N... \n",
" C41 \n",
" Philidor Defense \n",
" 5 \n",
" \n",
" \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" ... \n",
" \n",
" \n",
" 20053 \n",
" EfqH7VVH \n",
" True \n",
" 1.499791e+12 \n",
" 1.499791e+12 \n",
" 24 \n",
" resign \n",
" white \n",
" 10+10 \n",
" belcolt \n",
" 1691 \n",
" jamboger \n",
" 1220 \n",
" d4 f5 e3 e6 Nf3 Nf6 Nc3 b6 Be2 Bb7 O-O Be7 Ne5... \n",
" A80 \n",
" Dutch Defense \n",
" 2 \n",
" \n",
" \n",
" 20054 \n",
" WSJDhbPl \n",
" True \n",
" 1.499698e+12 \n",
" 1.499699e+12 \n",
" 82 \n",
" mate \n",
" black \n",
" 10+0 \n",
" jamboger \n",
" 1233 \n",
" farrukhasomiddinov \n",
" 1196 \n",
" d4 d6 Bf4 e5 Bg3 Nf6 e3 exd4 exd4 d5 c3 Bd6 Bd... \n",
" A41 \n",
" Queen's Pawn \n",
" 2 \n",
" \n",
" \n",
" 20055 \n",
" yrAas0Kj \n",
" True \n",
" 1.499698e+12 \n",
" 1.499698e+12 \n",
" 35 \n",
" mate \n",
" white \n",
" 10+0 \n",
" jamboger \n",
" 1219 \n",
" schaaksmurf3 \n",
" 1286 \n",
" d4 d5 Bf4 Nc6 e3 Nf6 c3 e6 Nf3 Be7 Bd3 O-O Nbd... \n",
" D00 \n",
" Queen's Pawn Game: Mason Attack \n",
" 3 \n",
" \n",
" \n",
" 20056 \n",
" b0v4tRyF \n",
" True \n",
" 1.499696e+12 \n",
" 1.499697e+12 \n",
" 109 \n",
" resign \n",
" white \n",
" 10+0 \n",
" marcodisogno \n",
" 1360 \n",
" jamboger \n",
" 1227 \n",
" e4 d6 d4 Nf6 e5 dxe5 dxe5 Qxd1+ Kxd1 Nd5 c4 Nb... \n",
" B07 \n",
" Pirc Defense \n",
" 4 \n",
" \n",
" \n",
" 20057 \n",
" N8G2JHGG \n",
" True \n",
" 1.499643e+12 \n",
" 1.499644e+12 \n",
" 78 \n",
" mate \n",
" black \n",
" 10+0 \n",
" jamboger \n",
" 1235 \n",
" ffbob \n",
" 1339 \n",
" d4 d5 Bf4 Na6 e3 e6 c3 Nf6 Nf3 Bd7 Nbd2 b5 Bd3... \n",
" D00 \n",
" Queen's Pawn Game: Mason Attack \n",
" 3 \n",
" \n",
" \n",
"
\n",
"
20058 rows × 16 columns
\n",
"
"
],
"text/plain": [
" id rated created_at last_move_at turns victory_status \\\n",
"0 TZJHLljE False 1.504210e+12 1.504210e+12 13 outoftime \n",
"1 l1NXvwaE True 1.504130e+12 1.504130e+12 16 resign \n",
"2 mIICvQHh True 1.504130e+12 1.504130e+12 61 mate \n",
"3 kWKvrqYL True 1.504110e+12 1.504110e+12 61 mate \n",
"4 9tXo1AUZ True 1.504030e+12 1.504030e+12 95 mate \n",
"... ... ... ... ... ... ... \n",
"20053 EfqH7VVH True 1.499791e+12 1.499791e+12 24 resign \n",
"20054 WSJDhbPl True 1.499698e+12 1.499699e+12 82 mate \n",
"20055 yrAas0Kj True 1.499698e+12 1.499698e+12 35 mate \n",
"20056 b0v4tRyF True 1.499696e+12 1.499697e+12 109 resign \n",
"20057 N8G2JHGG True 1.499643e+12 1.499644e+12 78 mate \n",
"\n",
" winner increment_code white_id white_rating black_id \\\n",
"0 white 15+2 bourgris 1500 a-00 \n",
"1 black 5+10 a-00 1322 skinnerua \n",
"2 white 5+10 ischia 1496 a-00 \n",
"3 white 20+0 daniamurashov 1439 adivanov2009 \n",
"4 white 30+3 nik221107 1523 adivanov2009 \n",
"... ... ... ... ... ... \n",
"20053 white 10+10 belcolt 1691 jamboger \n",
"20054 black 10+0 jamboger 1233 farrukhasomiddinov \n",
"20055 white 10+0 jamboger 1219 schaaksmurf3 \n",
"20056 white 10+0 marcodisogno 1360 jamboger \n",
"20057 black 10+0 jamboger 1235 ffbob \n",
"\n",
" black_rating moves \\\n",
"0 1191 d4 d5 c4 c6 cxd5 e6 dxe6 fxe6 Nf3 Bb4+ Nc3 Ba5... \n",
"1 1261 d4 Nc6 e4 e5 f4 f6 dxe5 fxe5 fxe5 Nxe5 Qd4 Nc6... \n",
"2 1500 e4 e5 d3 d6 Be3 c6 Be2 b5 Nd2 a5 a4 c5 axb5 Nc... \n",
"3 1454 d4 d5 Nf3 Bf5 Nc3 Nf6 Bf4 Ng4 e3 Nc6 Be2 Qd7 O... \n",
"4 1469 e4 e5 Nf3 d6 d4 Nc6 d5 Nb4 a3 Na6 Nc3 Be7 b4 N... \n",
"... ... ... \n",
"20053 1220 d4 f5 e3 e6 Nf3 Nf6 Nc3 b6 Be2 Bb7 O-O Be7 Ne5... \n",
"20054 1196 d4 d6 Bf4 e5 Bg3 Nf6 e3 exd4 exd4 d5 c3 Bd6 Bd... \n",
"20055 1286 d4 d5 Bf4 Nc6 e3 Nf6 c3 e6 Nf3 Be7 Bd3 O-O Nbd... \n",
"20056 1227 e4 d6 d4 Nf6 e5 dxe5 dxe5 Qxd1+ Kxd1 Nd5 c4 Nb... \n",
"20057 1339 d4 d5 Bf4 Na6 e3 e6 c3 Nf6 Nf3 Bd7 Nbd2 b5 Bd3... \n",
"\n",
" opening_eco opening_name opening_ply \n",
"0 D10 Slav Defense: Exchange Variation 5 \n",
"1 B00 Nimzowitsch Defense: Kennedy Variation 4 \n",
"2 C20 King's Pawn Game: Leonardis Variation 3 \n",
"3 D02 Queen's Pawn Game: Zukertort Variation 3 \n",
"4 C41 Philidor Defense 5 \n",
"... ... ... ... \n",
"20053 A80 Dutch Defense 2 \n",
"20054 A41 Queen's Pawn 2 \n",
"20055 D00 Queen's Pawn Game: Mason Attack 3 \n",
"20056 B07 Pirc Defense 4 \n",
"20057 D00 Queen's Pawn Game: Mason Attack 3 \n",
"\n",
"[20058 rows x 16 columns]"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"chess=pd.read_csv('games.csv')\n",
"chess"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "pointed-grass",
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" \n",
" id \n",
" rated \n",
" created_at \n",
" last_move_at \n",
" turns \n",
" victory_status \n",
" winner \n",
" increment_code \n",
" white_id \n",
" white_rating \n",
" black_id \n",
" black_rating \n",
" moves \n",
" opening_eco \n",
" opening_name \n",
" opening_ply \n",
" \n",
" \n",
" \n",
" \n",
" count \n",
" 20058 \n",
" 20058 \n",
" 2.005800e+04 \n",
" 2.005800e+04 \n",
" 20058.000000 \n",
" 20058 \n",
" 20058 \n",
" 20058 \n",
" 20058 \n",
" 20058.000000 \n",
" 20058 \n",
" 20058.000000 \n",
" 20058 \n",
" 20058 \n",
" 20058 \n",
" 20058.000000 \n",
" \n",
" \n",
" unique \n",
" 19113 \n",
" 2 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 4 \n",
" 3 \n",
" 400 \n",
" 9438 \n",
" NaN \n",
" 9331 \n",
" NaN \n",
" 18920 \n",
" 365 \n",
" 1477 \n",
" NaN \n",
" \n",
" \n",
" top \n",
" XRuQPSzH \n",
" True \n",
" NaN \n",
" NaN \n",
" NaN \n",
" resign \n",
" white \n",
" 10+0 \n",
" taranga \n",
" NaN \n",
" taranga \n",
" NaN \n",
" e4 e5 \n",
" A00 \n",
" Van't Kruijs Opening \n",
" NaN \n",
" \n",
" \n",
" freq \n",
" 5 \n",
" 16155 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 11147 \n",
" 10001 \n",
" 7721 \n",
" 72 \n",
" NaN \n",
" 82 \n",
" NaN \n",
" 27 \n",
" 1007 \n",
" 368 \n",
" NaN \n",
" \n",
" \n",
" mean \n",
" NaN \n",
" NaN \n",
" 1.483617e+12 \n",
" 1.483618e+12 \n",
" 60.465999 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 1596.631868 \n",
" NaN \n",
" 1588.831987 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 4.816981 \n",
" \n",
" \n",
" std \n",
" NaN \n",
" NaN \n",
" 2.850151e+10 \n",
" 2.850140e+10 \n",
" 33.570585 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 291.253376 \n",
" NaN \n",
" 291.036126 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 2.797152 \n",
" \n",
" \n",
" min \n",
" NaN \n",
" NaN \n",
" 1.376772e+12 \n",
" 1.376772e+12 \n",
" 1.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 784.000000 \n",
" NaN \n",
" 789.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 1.000000 \n",
" \n",
" \n",
" 25% \n",
" NaN \n",
" NaN \n",
" 1.477548e+12 \n",
" 1.477548e+12 \n",
" 37.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 1398.000000 \n",
" NaN \n",
" 1391.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 3.000000 \n",
" \n",
" \n",
" 50% \n",
" NaN \n",
" NaN \n",
" 1.496010e+12 \n",
" 1.496010e+12 \n",
" 55.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 1567.000000 \n",
" NaN \n",
" 1562.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 4.000000 \n",
" \n",
" \n",
" 75% \n",
" NaN \n",
" NaN \n",
" 1.503170e+12 \n",
" 1.503170e+12 \n",
" 79.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 1793.000000 \n",
" NaN \n",
" 1784.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 6.000000 \n",
" \n",
" \n",
" max \n",
" NaN \n",
" NaN \n",
" 1.504493e+12 \n",
" 1.504494e+12 \n",
" 349.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 2700.000000 \n",
" NaN \n",
" 2723.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 28.000000 \n",
" \n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id rated created_at last_move_at turns \\\n",
"count 20058 20058 2.005800e+04 2.005800e+04 20058.000000 \n",
"unique 19113 2 NaN NaN NaN \n",
"top XRuQPSzH True NaN NaN NaN \n",
"freq 5 16155 NaN NaN NaN \n",
"mean NaN NaN 1.483617e+12 1.483618e+12 60.465999 \n",
"std NaN NaN 2.850151e+10 2.850140e+10 33.570585 \n",
"min NaN NaN 1.376772e+12 1.376772e+12 1.000000 \n",
"25% NaN NaN 1.477548e+12 1.477548e+12 37.000000 \n",
"50% NaN NaN 1.496010e+12 1.496010e+12 55.000000 \n",
"75% NaN NaN 1.503170e+12 1.503170e+12 79.000000 \n",
"max NaN NaN 1.504493e+12 1.504494e+12 349.000000 \n",
"\n",
" victory_status winner increment_code white_id white_rating black_id \\\n",
"count 20058 20058 20058 20058 20058.000000 20058 \n",
"unique 4 3 400 9438 NaN 9331 \n",
"top resign white 10+0 taranga NaN taranga \n",
"freq 11147 10001 7721 72 NaN 82 \n",
"mean NaN NaN NaN NaN 1596.631868 NaN \n",
"std NaN NaN NaN NaN 291.253376 NaN \n",
"min NaN NaN NaN NaN 784.000000 NaN \n",
"25% NaN NaN NaN NaN 1398.000000 NaN \n",
"50% NaN NaN NaN NaN 1567.000000 NaN \n",
"75% NaN NaN NaN NaN 1793.000000 NaN \n",
"max NaN NaN NaN NaN 2700.000000 NaN \n",
"\n",
" black_rating moves opening_eco opening_name opening_ply \n",
"count 20058.000000 20058 20058 20058 20058.000000 \n",
"unique NaN 18920 365 1477 NaN \n",
"top NaN e4 e5 A00 Van't Kruijs Opening NaN \n",
"freq NaN 27 1007 368 NaN \n",
"mean 1588.831987 NaN NaN NaN 4.816981 \n",
"std 291.036126 NaN NaN NaN 2.797152 \n",
"min 789.000000 NaN NaN NaN 1.000000 \n",
"25% 1391.000000 NaN NaN NaN 3.000000 \n",
"50% 1562.000000 NaN NaN NaN 4.000000 \n",
"75% 1784.000000 NaN NaN NaN 6.000000 \n",
"max 2723.000000 NaN NaN NaN 28.000000 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chess.describe(include='all')"
]
},
{
"cell_type": "raw",
"id": "equal-resort",
"metadata": {},
"source": [
"Usunięcie id, czasu rozpoczęcia i zakończenia partii oraz id białych i czarnych oraz listy ruchów"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "representative-lodge",
"metadata": {},
"outputs": [],
"source": [
"cols=['turns','victory_status','winner','increment_code','white_rating','black_rating','opening_name']\n",
"chess=chess[cols]\n",
"chess.to_csv(\"chess.csv\", index=False)"
]
},
{
"cell_type": "raw",
"id": "fitting-investigator",
"metadata": {},
"source": [
"Średnia, minimum, maksimum, odchylenia standardowe, medianę wartości poszczególnych parametrów"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "fiscal-vacation",
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" \n",
" turns \n",
" victory_status \n",
" winner \n",
" increment_code \n",
" white_rating \n",
" black_rating \n",
" opening_name \n",
" \n",
" \n",
" \n",
" \n",
" count \n",
" 20058.000000 \n",
" 20058 \n",
" 20058 \n",
" 20058 \n",
" 20058.000000 \n",
" 20058.000000 \n",
" 20058 \n",
" \n",
" \n",
" unique \n",
" NaN \n",
" 4 \n",
" 3 \n",
" 400 \n",
" NaN \n",
" NaN \n",
" 1477 \n",
" \n",
" \n",
" top \n",
" NaN \n",
" resign \n",
" white \n",
" 10+0 \n",
" NaN \n",
" NaN \n",
" Van't Kruijs Opening \n",
" \n",
" \n",
" freq \n",
" NaN \n",
" 11147 \n",
" 10001 \n",
" 7721 \n",
" NaN \n",
" NaN \n",
" 368 \n",
" \n",
" \n",
" mean \n",
" 60.465999 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 1596.631868 \n",
" 1588.831987 \n",
" NaN \n",
" \n",
" \n",
" std \n",
" 33.570585 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 291.253376 \n",
" 291.036126 \n",
" NaN \n",
" \n",
" \n",
" min \n",
" 1.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 784.000000 \n",
" 789.000000 \n",
" NaN \n",
" \n",
" \n",
" 25% \n",
" 37.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 1398.000000 \n",
" 1391.000000 \n",
" NaN \n",
" \n",
" \n",
" 50% \n",
" 55.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 1567.000000 \n",
" 1562.000000 \n",
" NaN \n",
" \n",
" \n",
" 75% \n",
" 79.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 1793.000000 \n",
" 1784.000000 \n",
" NaN \n",
" \n",
" \n",
" max \n",
" 349.000000 \n",
" NaN \n",
" NaN \n",
" NaN \n",
" 2700.000000 \n",
" 2723.000000 \n",
" NaN \n",
" \n",
" \n",
"
\n",
"
"
],
"text/plain": [
" turns victory_status winner increment_code white_rating \\\n",
"count 20058.000000 20058 20058 20058 20058.000000 \n",
"unique NaN 4 3 400 NaN \n",
"top NaN resign white 10+0 NaN \n",
"freq NaN 11147 10001 7721 NaN \n",
"mean 60.465999 NaN NaN NaN 1596.631868 \n",
"std 33.570585 NaN NaN NaN 291.253376 \n",
"min 1.000000 NaN NaN NaN 784.000000 \n",
"25% 37.000000 NaN NaN NaN 1398.000000 \n",
"50% 55.000000 NaN NaN NaN 1567.000000 \n",
"75% 79.000000 NaN NaN NaN 1793.000000 \n",
"max 349.000000 NaN NaN NaN 2700.000000 \n",
"\n",
" black_rating opening_name \n",
"count 20058.000000 20058 \n",
"unique NaN 1477 \n",
"top NaN Van't Kruijs Opening \n",
"freq NaN 368 \n",
"mean 1588.831987 NaN \n",
"std 291.036126 NaN \n",
"min 789.000000 NaN \n",
"25% 1391.000000 NaN \n",
"50% 1562.000000 NaN \n",
"75% 1784.000000 NaN \n",
"max 2723.000000 NaN "
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chess.describe(include='all')"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "painted-shift",
"metadata": {},
"outputs": [],
"source": [
"!head -n -1 games.csv | shuf > chess.csv.shuf"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "thick-circular",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"20059 chess.csv\r\n"
]
}
],
"source": [
"!wc -l chess.csv"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "adverse-scope",
"metadata": {},
"outputs": [],
"source": [
"!head -n 2006 chess.csv.shuf > test.csv"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "fiscal-contemporary",
"metadata": {},
"outputs": [],
"source": [
"!head -n 4012 chess.csv.shuf | tail -n 2006 > dev.csv"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "possible-witness",
"metadata": {},
"outputs": [],
"source": [
"!tail -n +4013 chess.csv.shuf > train.csv"
]
},
{
"cell_type": "raw",
"id": "reflected-alias",
"metadata": {},
"source": [
"Wielkość zbiorów"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "entire-mathematics",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 20059 chess.csv\r\n",
" 2006 dev.csv\r\n",
" 20059 games.csv\r\n",
" 2006 test.csv\r\n",
" 16046 train.csv\r\n",
" 60176 total\r\n"
]
}
],
"source": [
"!wc -l *.csv"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "genetic-moscow",
"metadata": {},
"outputs": [],
"source": [
"chess_test=pd.read_csv('test.csv')\n",
"chess_train=pd.read_csv('train.csv')\n",
"chess_dev=pd.read_csv('dev.csv')"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "provincial-february",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
""
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEfCAYAAACjwKoqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUb0lEQVR4nO3df7BdZX3v8fdHIgq0miC5aBPGUE1xwOqVRsDBequ0EEQaaqvFtpJabjOdS6v9MVrsj8m9or1oO6XSH/SmJjRYW0RqCwWu3BTx11R+HH4IBWSSIpREkNMGkMotGPzeP/ZzLpv0hOTsvXPW2Tnv18yZs9aznrXPN3s4fM561rOenapCkjS/PafrAiRJ3TMMJEmGgSTJMJAkYRhIkjAMJEnAgq4LGNQhhxxSy5Yt67oMSRobN910079U1eLpjo1tGCxbtoyJiYmuy5CksZHkvl0dc5hIkmQYSJIMA0kShoEkCcNAkoRhIEnCMJAkYRhIkhjjh872hmVnX9l1Cbt177mndF2CpH2QVwaSJMNAkmQYSJIwDCRJGAaSJAwDSRKGgSQJw0CShGEgScIwkCRhGEiSMAwkSRgGkiQMA0kShoEkCcNAkoRhIEliD8IgyYYkDyX5x762g5NsSrK5fV/U2pPk/CRbktyW5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Erk/yN23/NMDPRBbgMJE0ryQ5Gnh92/1iVd3SZT2aOwwDSZL3DCRJhoEkCcNAkoRhIEnCMJAkAf8PvpPzCflwr9UAAAAASUVORK5CYII=\n",
"text/plain": [
""
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"pd.value_counts(chess['victory_status']).plot.bar()"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "official-cholesterol",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
""
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEKCAYAAADw2zkCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAARrklEQVR4nO3de7BdZX3G8e9TotwvQc6gJmAYTXEC1RHCpbVaFYeLaENbpNgqkWbMOGLVakfBfzJVaXHaiuKFDpXUoI5I0Q4oWEwRB7VyCWCjgJEUQZKCRBMRUNDgr3/s9+AGTjiXnZy1w/l+Zvbs9b7rXXv/zmzIs9e71torVYUkaWb7na4LkCR1zzCQJBkGkiTDQJKEYSBJwjCQJAGzui5gqvbZZ5+aN29e12VI0nbjhhtu+ElVjYy1brsNg3nz5rFq1aquy5Ck7UaSO7e0zmkiSZJhIEkyDCRJGAaSJAwDSRITCIMky5Pcm+R7fX17J1mZ5Lb2PLv1J8k5SdYmWZ3kkL5tFrfxtyVZ3Nd/aJLvtm3OSZKt/UdKkp7cRPYMPgUc+7i+04Erq2o+cGVrAxwHzG+PpcC50AsPYBlwBHA4sGw0QNqYN/Vt9/j3kiRtY+OGQVVdDWx8XPciYEVbXgGc0Nd/QfVcA+yV5FnAMcDKqtpYVZuAlcCxbd0eVXVN9W6scEHfa0mSpslULzrbt6rubsv3APu25TnAXX3j1rW+J+tfN0b/mJIspbfHwf777z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LaeJhkSSt9I7eHwocAewnN50kYbbq7suQNoaDIPhsRO9m9vcUFWbxxus4VBVd3Zdg7Q1OE0kSfIAsiTJMJAkYRhIkjAMJEkYBpIk4P8B+P7MMOBSjH8AAAAASUVORK5CYII=\n",
"text/plain": [
""
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"pd.value_counts(chess['winner']).plot.bar()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cross-clearing",
"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.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}