2017-2018/Notes/302/Analyse DS5.ipynb

1758 lines
135 KiB
Plaintext
Raw Normal View History

2018-03-28 12:30:27 +00:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Analyse du ds 5 pour les 302"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import sqlite3\n",
"import pandas as pd\n",
"import numpy as np\n",
"from math import ceil\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"from pprint import pprint"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from repytex.tools.evaluation import Evaluation"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"db = \"../recopytex.db\"\n",
"conn = sqlite3.connect(db)\n",
"c = conn.cursor()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"La tribu des 302 (id = 1)\n"
]
}
],
"source": [
"tribe_name = \"302\"\n",
"tribe_id = c.execute(\"SELECT id from tribe WHERE tribe.name == ?\", (tribe_name,)).fetchone()[0]\n",
"print(f\"La tribu des {tribe_name} (id = {tribe_id})\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Liste des évaluations:\n",
" - DS1 mise en jambe (id = 1)\n",
" - DS2 (id = 5)\n",
" - Pyramide de pièces (id = 8)\n",
" - DS3 (id = 10)\n",
" - DM noel (id = 14)\n",
" - DS4 (id = 16)\n",
" - DNB blanc1 (id = 21)\n",
" - DS5 (id = 29)\n",
" - Téléphérique (id = 30)\n"
]
}
],
"source": [
"evals = c.execute(\"SELECT id, name from eval WHERE eval.tribe_id == ?\", (tribe_id,))\n",
"print(\"Liste des évaluations:\")\n",
"for e in evals:\n",
" print(f\" - {e[1]} (id = {e[0]})\")"
]
},
{
"cell_type": "code",
"execution_count": 81,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<eval DS5 for 302>"
]
},
"execution_count": 81,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev_id = 29\n",
"ev = Evaluation.from_sqlite(ev_id, conn)\n",
"ev"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Il semble qu'il y est des doublons"
]
},
{
"cell_type": "code",
"execution_count": 82,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"q_sc_df = ev.sc_df.set_index(\"id\")"
]
},
{
"cell_type": "code",
"execution_count": 83,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['question_id', 'student_id', 'value'], dtype='object')"
]
},
"execution_count": 83,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_sc_df.columns"
]
},
{
"cell_type": "code",
"execution_count": 84,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"question_id 2285\n",
"student_id 2285\n",
"value 2285\n",
"dtype: int64"
]
},
"execution_count": 84,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_sc_df.count()"
]
},
{
"cell_type": "code",
"execution_count": 85,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>question_id</th>\n",
" <th>student_id</th>\n",
" </tr>\n",
" <tr>\n",
" <th>id</th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>7917</th>\n",
" <td>302</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7918</th>\n",
" <td>303</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7919</th>\n",
" <td>304</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7920</th>\n",
" <td>302</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7921</th>\n",
" <td>303</td>\n",
" <td>2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" question_id student_id\n",
"id \n",
"7917 302 1\n",
"7918 303 1\n",
"7919 304 1\n",
"7920 302 2\n",
"7921 303 2"
]
},
"execution_count": 85,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"qst_filtered = q_sc_df[q_sc_df.duplicated(['question_id', 'student_id'], keep='first')]\n",
"qst_filtered[['question_id', 'student_id']].head()"
]
},
{
"cell_type": "code",
"execution_count": 86,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>question_id</th>\n",
" <th>student_id</th>\n",
" <th>value</th>\n",
" </tr>\n",
" <tr>\n",
" <th>id</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>10616</th>\n",
" <td>327</td>\n",
" <td>26</td>\n",
" <td>2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" question_id student_id value\n",
"id \n",
"10616 327 26 2"
]
},
"execution_count": 86,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"qst_filtered.tail(1)"
]
},
{
"cell_type": "code",
"execution_count": 87,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"question_id 1600\n",
"student_id 1600\n",
"value 1600\n",
"dtype: int64"
]
},
"execution_count": 87,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_sc_df[q_sc_df.duplicated(['question_id', 'student_id', 'value'], keep='last')].count()"
]
},
{
"cell_type": "code",
"execution_count": 88,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"26"
]
},
"execution_count": 88,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(q_sc_df[\"question_id\"].unique())"
]
},
{
"cell_type": "code",
"execution_count": 89,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"25"
]
},
"execution_count": 89,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(q_sc_df[\"student_id\"].unique())"
]
},
{
"cell_type": "code",
"execution_count": 90,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"650"
]
},
"execution_count": 90,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"26 * 25"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Donc j'ai des notes qui sont differentes pour un même élève sur une même questions...\n",
"\n",
"Je veux maintenant trouver ces notes."
]
},
{
"cell_type": "code",
"execution_count": 91,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"student_id question_id\n",
"10 310 {0, 1}\n",
"12 309 {1, 2}\n",
"13 311 {2, 3}\n",
"14 303 {2, 3}\n",
"16 313 {2, 3}\n",
"Name: value, dtype: object"
]
},
"execution_count": 91,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gped_sc = q_sc_df.groupby([\"student_id\", \"question_id\"])['value'].apply(set)\n",
"gped_sc[gped_sc.apply(lambda x: len(x) != 1)].head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"On garde la dernière note enregistrée"
2018-03-28 12:30:27 +00:00
]
},
{
"cell_type": "code",
"execution_count": 92,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def keep_last(df):\n",
" return df.sort_index().tail(1)"
]
},
{
"cell_type": "code",
"execution_count": 93,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>student_id</th>\n",
" <th>question_id</th>\n",
" <th>value</th>\n",
" </tr>\n",
" <tr>\n",
" <th>id</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>8079</th>\n",
" <td>1</td>\n",
" <td>302</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8080</th>\n",
" <td>1</td>\n",
" <td>303</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8081</th>\n",
" <td>1</td>\n",
" <td>304</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8484</th>\n",
" <td>1</td>\n",
" <td>305</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8485</th>\n",
" <td>1</td>\n",
" <td>306</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" student_id question_id value\n",
"id \n",
"8079 1 302 2\n",
"8080 1 303 2\n",
"8081 1 304 1\n",
"8484 1 305 3\n",
"8485 1 306 1"
]
},
"execution_count": 93,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"gped_sc = q_sc_df.groupby([\"student_id\", \"question_id\"])['value'].apply(keep_last)\n",
"q_sc_df = gped_sc.reset_index().set_index(\"id\")\n",
"q_sc_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 147,
"metadata": {},
"outputs": [],
"source": [
"q_sc_df['fullname_st'] = q_sc_df[['name_st', 'surname_st']].apply(lambda x: \" \".join(x), axis=1)"
]
},
2018-03-28 12:30:27 +00:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Recalcul des notes et compétences"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Jointure avec la dataframe sur les élèves"
]
},
{
"cell_type": "code",
"execution_count": 94,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['id', 'name_st', 'surname_st', 'mail_st', 'commment_st', 'tribe_id'], dtype='object')"
]
},
"execution_count": 94,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"st_df = ev.s_df\n",
"st_df.columns = st_df.columns.map(lambda x: f\"{x}_st\" if 'id' not in x else x)\n",
"st_df.columns"
]
},
{
"cell_type": "code",
"execution_count": 95,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>student_id</th>\n",
" <th>question_id</th>\n",
" <th>value</th>\n",
" <th>id</th>\n",
" <th>name_st</th>\n",
" <th>surname_st</th>\n",
" <th>mail_st</th>\n",
" <th>commment_st</th>\n",
" <th>tribe_id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>302</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>ABDALLAH ALLAOUI</td>\n",
" <td>Taiassima</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>303</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>ABDALLAH ALLAOUI</td>\n",
" <td>Taiassima</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1</td>\n",
" <td>304</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>ABDALLAH ALLAOUI</td>\n",
" <td>Taiassima</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1</td>\n",
" <td>305</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>ABDALLAH ALLAOUI</td>\n",
" <td>Taiassima</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1</td>\n",
" <td>306</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>ABDALLAH ALLAOUI</td>\n",
" <td>Taiassima</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" student_id question_id value id name_st surname_st mail_st \\\n",
"0 1 302 2 1 ABDALLAH ALLAOUI Taiassima \n",
"1 1 303 2 1 ABDALLAH ALLAOUI Taiassima \n",
"2 1 304 1 1 ABDALLAH ALLAOUI Taiassima \n",
"3 1 305 3 1 ABDALLAH ALLAOUI Taiassima \n",
"4 1 306 1 1 ABDALLAH ALLAOUI Taiassima \n",
"\n",
" commment_st tribe_id \n",
"0 None 1 \n",
"1 None 1 \n",
"2 None 1 \n",
"3 None 1 \n",
"4 None 1 "
]
},
"execution_count": 95,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_sc_df = q_sc_df.merge(st_df, left_on=\"student_id\", right_on=\"id\", suffixes=(\"\", \"_st\"))\n",
"q_sc_df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Jointure avec la dataframe sur les questions"
]
},
{
"cell_type": "code",
"execution_count": 96,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['id', 'name_q', 'score_rate_q', 'is_leveled_q', 'exercise_id',\n",
" 'competence_q', 'domain_q', 'comment_q'],\n",
" dtype='object')"
]
},
"execution_count": 96,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_df = ev.q_df\n",
"q_df.columns = q_df.columns.map(lambda x: f\"{x}_q\" if 'id' not in x else x)\n",
"q_df.columns"
]
},
{
"cell_type": "code",
"execution_count": 97,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>student_id</th>\n",
" <th>question_id</th>\n",
" <th>value</th>\n",
" <th>id</th>\n",
" <th>name_st</th>\n",
" <th>surname_st</th>\n",
" <th>mail_st</th>\n",
" <th>commment_st</th>\n",
" <th>tribe_id</th>\n",
" <th>id_q</th>\n",
" <th>name_q</th>\n",
" <th>score_rate_q</th>\n",
" <th>is_leveled_q</th>\n",
" <th>exercise_id</th>\n",
" <th>competence_q</th>\n",
" <th>domain_q</th>\n",
" <th>comment_q</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>645</th>\n",
" <td>23</td>\n",
" <td>331</td>\n",
" <td>3</td>\n",
" <td>23</td>\n",
" <td>MOUSSRI</td>\n",
" <td>Bakari</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>331</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>102</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td>Présentation de la copie</td>\n",
" </tr>\n",
" <tr>\n",
" <th>646</th>\n",
" <td>24</td>\n",
" <td>331</td>\n",
" <td>3</td>\n",
" <td>24</td>\n",
" <td>SAÏD</td>\n",
" <td>Fatoumia</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>331</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>102</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td>Présentation de la copie</td>\n",
" </tr>\n",
" <tr>\n",
" <th>647</th>\n",
" <td>25</td>\n",
" <td>331</td>\n",
" <td>3</td>\n",
" <td>25</td>\n",
" <td>SAKOTRA</td>\n",
" <td>Claudiana</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>331</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>102</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td>Présentation de la copie</td>\n",
" </tr>\n",
" <tr>\n",
" <th>648</th>\n",
" <td>26</td>\n",
" <td>331</td>\n",
" <td>3</td>\n",
" <td>26</td>\n",
" <td>TOUFAIL</td>\n",
" <td>Salahou</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>331</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>102</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td>Présentation de la copie</td>\n",
" </tr>\n",
" <tr>\n",
" <th>649</th>\n",
" <td>76</td>\n",
" <td>331</td>\n",
" <td>3</td>\n",
" <td>76</td>\n",
" <td>Ibrahim</td>\n",
" <td>Chaharzade</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>331</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>102</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td>Présentation de la copie</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" student_id question_id value id name_st surname_st mail_st \\\n",
"645 23 331 3 23 MOUSSRI Bakari \n",
"646 24 331 3 24 SAÏD Fatoumia \n",
"647 25 331 3 25 SAKOTRA Claudiana \n",
"648 26 331 3 26 TOUFAIL Salahou \n",
"649 76 331 3 76 Ibrahim Chaharzade \n",
"\n",
" commment_st tribe_id id_q name_q score_rate_q is_leveled_q \\\n",
"645 None 1 331 10 1 \n",
"646 None 1 331 10 1 \n",
"647 None 1 331 10 1 \n",
"648 None 1 331 10 1 \n",
"649 None 1 331 10 1 \n",
"\n",
" exercise_id competence_q domain_q comment_q \n",
"645 102 Com Présentation Présentation de la copie \n",
"646 102 Com Présentation Présentation de la copie \n",
"647 102 Com Présentation Présentation de la copie \n",
"648 102 Com Présentation Présentation de la copie \n",
"649 102 Com Présentation Présentation de la copie "
]
},
"execution_count": 97,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_sc_df = q_sc_df.merge(q_df, left_on=\"question_id\", right_on=\"id\", suffixes=(\"\", \"_q\"))\n",
"q_sc_df.tail()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Calcul des notes"
]
},
{
"cell_type": "code",
"execution_count": 98,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"q_sc_df[\"value_no_dot\"] = q_sc_df[\"value\"].replace('.', 0)"
]
},
{
"cell_type": "code",
"execution_count": 99,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"q_sc_df[\"mark\"] = q_sc_df[\"score_rate_q\"] * q_sc_df[\"value_no_dot\"] / 3"
]
},
{
"cell_type": "code",
"execution_count": 100,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['student_id', 'question_id', 'value', 'id', 'name_st', 'surname_st',\n",
" 'mail_st', 'commment_st', 'tribe_id', 'id_q', 'name_q', 'score_rate_q',\n",
" 'is_leveled_q', 'exercise_id', 'competence_q', 'domain_q', 'comment_q',\n",
" 'value_no_dot', 'mark'],\n",
" dtype='object')"
]
},
"execution_count": 100,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_sc_df.columns"
]
},
{
"cell_type": "code",
"execution_count": 101,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th></th>\n",
" <th>score_rate_q</th>\n",
" <th>mark</th>\n",
" </tr>\n",
" <tr>\n",
" <th>student_id</th>\n",
" <th>exercise_id</th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th rowspan=\"7\" valign=\"top\">1</th>\n",
" <th>95</th>\n",
" <td>12</td>\n",
" <td>6.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
" <td>10</td>\n",
" <td>5.333333</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
" <td>17</td>\n",
" <td>4.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
" <td>18</td>\n",
" <td>4.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>18</td>\n",
" <td>7.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>100</th>\n",
" <td>15</td>\n",
" <td>1.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>102</th>\n",
" <td>10</td>\n",
" <td>10.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th rowspan=\"3\" valign=\"top\">2</th>\n",
" <th>95</th>\n",
" <td>12</td>\n",
" <td>6.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
" <td>10</td>\n",
" <td>4.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
" <td>17</td>\n",
" <td>9.666667</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" score_rate_q mark\n",
"student_id exercise_id \n",
"1 95 12 6.666667\n",
" 96 10 5.333333\n",
" 97 17 4.000000\n",
" 98 18 4.000000\n",
" 99 18 7.000000\n",
" 100 15 1.000000\n",
" 102 10 10.000000\n",
"2 95 12 6.666667\n",
" 96 10 4.666667\n",
" 97 17 9.666667"
]
},
"execution_count": 101,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_sc_df.groupby(['student_id', 'exercise_id'])[[\"score_rate_q\", 'mark']].sum().head(10)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Voila... j'ai les notes..."
]
},
{
"cell_type": "code",
"execution_count": 179,
2018-03-28 12:30:27 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>score_rate_q</th>\n",
" <th>mark</th>\n",
" </tr>\n",
" <tr>\n",
" <th>fullname_st</th>\n",
2018-03-28 12:30:27 +00:00
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>ABDALLAH ALLAOUI Taiassima</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>38.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ADANI Ismou</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>60.333333</td>\n",
" </tr>\n",
" <tr>\n",
" <th>AHAMADI Asbahati</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>43.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>AHAMADI OUSSENI Ansufiddine</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>25.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>AHAMED Fayadhi</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>31.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>AHMED SAID Hadaïta</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>62.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ALI MADI Anissa</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>77.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ALI Raydel</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>62.333333</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ATTOUMANE ALI Fatima</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>42.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BACHIROU Elzame</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>21.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINALI Zalida</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>63.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BOINA Abdillah Mze Limassi</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>69.333333</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BOUDRA Zaankidine</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>35.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BOURA Kayssoiria</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>44.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>HALADI Asna</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>68.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>HALIDI Soibrata</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>37.333333</td>\n",
" </tr>\n",
" <tr>\n",
" <th>HAMEDALY Doulkifly</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>34.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>IBRAHIM Nassur</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>56.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Ibrahim Chaharzade</th>\n",
" <td>100</td>\n",
" <td>50.333333</td>\n",
" </tr>\n",
" <tr>\n",
" <th>MOHAMED Nadia</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>51.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>MOUHOUDHOIRE Izak</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>36.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>MOUSSRI Bakari</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>24.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SAKOTRA Claudiana</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>52.666667</td>\n",
2018-03-28 12:30:27 +00:00
" </tr>\n",
" <tr>\n",
" <th>SAÏD Fatoumia</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>58.333333</td>\n",
2018-03-28 12:30:27 +00:00
" </tr>\n",
" <tr>\n",
" <th>TOUFAIL Salahou</th>\n",
2018-03-28 12:30:27 +00:00
" <td>100</td>\n",
" <td>56.000000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" score_rate_q mark\n",
"fullname_st \n",
"ABDALLAH ALLAOUI Taiassima 100 38.000000\n",
"ADANI Ismou 100 60.333333\n",
"AHAMADI Asbahati 100 43.666667\n",
"AHAMADI OUSSENI Ansufiddine 100 25.000000\n",
"AHAMED Fayadhi 100 31.666667\n",
"AHMED SAID Hadaïta 100 62.000000\n",
"ALI MADI Anissa 100 77.666667\n",
"ALI Raydel 100 62.333333\n",
"ATTOUMANE ALI Fatima 100 42.000000\n",
"BACHIROU Elzame 100 21.666667\n",
"BINALI Zalida 100 63.000000\n",
"BOINA Abdillah Mze Limassi 100 69.333333\n",
"BOUDRA Zaankidine 100 35.666667\n",
"BOURA Kayssoiria 100 44.000000\n",
"HALADI Asna 100 68.666667\n",
"HALIDI Soibrata 100 37.333333\n",
"HAMEDALY Doulkifly 100 34.666667\n",
"IBRAHIM Nassur 100 56.666667\n",
"Ibrahim Chaharzade 100 50.333333\n",
"MOHAMED Nadia 100 51.666667\n",
"MOUHOUDHOIRE Izak 100 36.666667\n",
"MOUSSRI Bakari 100 24.000000\n",
"SAKOTRA Claudiana 100 52.666667\n",
"SAÏD Fatoumia 100 58.333333\n",
"TOUFAIL Salahou 100 56.000000"
]
},
"execution_count": 179,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mark_df = q_sc_df.groupby(['fullname_st'])[[\"score_rate_q\", 'mark']].sum()\n",
"mark_df"
]
},
{
"cell_type": "code",
"execution_count": 192,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f153c0b35f8>], dtype=object)"
]
},
"execution_count": 192,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEICAYAAACzliQjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFbpJREFUeJzt3X+MZWd93/H3B9uAYcia4KnjrB0tld2pqFcBbIErqmrG\nBMkYaleKo5q6gCPQRhEuJHIa1lRyCmpaowYIFATaYtc2RcDEQNnYJhExnhgiYdg1jtc/2GRJN2U3\nxgYb1owxJlu+/eMed6az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9CWpIYa+JDXE0Jekhhj6ktQQQ1+SGmLoS1JDDH1Jasgo98g9M8kdSR5I\ncn+SdyzSJkk+lGRfknuTvHx1ypUkrcQo98g9DFxVVXcneQGwO8mXquqBeW1eC5zdPV4JfLT7V5J0\nHBn6Tr+qHqqqu7vnPwIeBDYvaHYJcFMNfA04JcnpvVcrSVqRVNXojZMtwJ3AOVX1+Lz5twDXdjdR\nJ8ntwDurateC9bcB2wDGx8fPnZ6eXmn9G8Ls7CxjY2NHzN9z8NDQdbdu3rQaJa3YcmtfOBaj9LNU\nX8vR5/ZG7Wspp50MDz85evvjdV/ow1LHSIumpqZ2V9V5y11/lNM7ACQZAz4L/Nb8wD8WVbUD2AEw\nMTFRk5OTy+lmw5mZmWGxsbhi+61D191/+ZHrHQ+WW/vCsRiln6X6Wo4+tzdqX0u5auth3rdn5EP0\nuN0X+rDUMaJjN9LVO0lOYhD4n6yqzy3S5CBw5rzpM7p5kqTjyChX7wS4Dniwqt6/RLOdwJu6q3jO\nBw5V1UM91ilJ6sEovzu+CngjsCfJPd28dwG/BFBVHwNuAy4C9gE/Bn69/1IlSSs1NPS7P85mSJsC\n3tZXUZKk1eEnciWpIYa
"text/plain": [
"<matplotlib.figure.Figure at 0x7f153be4e0f0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots()\n",
"ax.set_xlim([0, 100])\n",
"mark_df.hist(\"mark\",bins=20, ax=ax)"
]
},
{
"cell_type": "code",
"execution_count": 197,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f1539c2f7b8>"
]
},
"execution_count": 197,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAD8CAYAAABKKbKtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VdW58PHfk5M5ZCAhCSEMAQlDQGSIiL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NERFS1WlU/wpto2iQiI4A04MPu\nD90Em5U7S8nff4z7pmUTF2WrVHRFSp8oLh+Vxivri2k6xaJqxvjyZ4LJBAp9Phc5ZW3WUdUmoBJI\n6eT55+K9Y/Gdw+IGEdkkIktEZFBbB4nInSKSLyL5ZWVlnfxRJpC1tCi/eHsnQ1JiueXcNv9ZmE66\nYeJAyo7X82HBEbdDMQEgkDv55wIv+Hx+DchS1XHAu3x+Z/QvVPUpVc1V1dzUVHt6OxTkbTzIjkPH\n+f6Mka4tRxwspo5KIyk2gpfWWjOZ6Zg//28rBnz/XBzolLVZR0TCgUTgaEcnFpFzgHBVXXuyTFWP\nqmq98/FpYFLXQzfBoqm5hUff+4ycjASuOdtWZzxTkeFhzD5nAO9sO0xlbaPb4Zhezp8JZg2QLSJD\nRSQS7x1HXqs6ecB8Z/tGYIV2btrWefzr3Qsi4vvbYzawvUtRm6Dy+qYS9h+t4TvTs+2J/W5yw8SB\nNDS18MYmeybGtM9vvZ2q2iQi9wDLAA/wrKpuFZGHgHxVzQOeAZ4TkQKgHG8SAkBE9gEJQKSIXAfM\nUNVtzu6bgata/chvi8hsoMk51x3+ujYTGFpalCfeL2BkejzTR6e7HU7QGDcwkbNS43h1QzG3njfY\n7XBML+bX4TSq+ibwZqu
"text/plain": [
"<matplotlib.figure.Figure at 0x7f1539c91e10>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"mark_df[\"mark\"].plot.kde()"
]
},
{
"cell_type": "code",
"execution_count": 193,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"count 25.000000\n",
"mean 48.133333\n",
"std 15.323064\n",
"min 21.666667\n",
"25% 36.666667\n",
"50% 50.333333\n",
"75% 60.333333\n",
"max 77.666667\n",
"Name: mark, dtype: float64"
]
},
"execution_count": 193,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mark_df['mark'].describe()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Comparaison entre compétences brutes et coefficientés"
]
},
{
"cell_type": "code",
"execution_count": 110,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>student_id</th>\n",
" <th>question_id</th>\n",
" <th>value</th>\n",
" <th>id</th>\n",
" <th>name_st</th>\n",
" <th>surname_st</th>\n",
" <th>mail_st</th>\n",
" <th>commment_st</th>\n",
" <th>tribe_id</th>\n",
" <th>id_q</th>\n",
" <th>name_q</th>\n",
" <th>score_rate_q</th>\n",
" <th>is_leveled_q</th>\n",
" <th>exercise_id</th>\n",
" <th>competence_q</th>\n",
" <th>domain_q</th>\n",
" <th>comment_q</th>\n",
" <th>value_no_dot</th>\n",
" <th>mark</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
2018-03-28 12:30:27 +00:00
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>302</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>ABDALLAH ALLAOUI</td>\n",
" <td>Taiassima</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>302</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>95</td>\n",
" <td>Rep</td>\n",
" <td>Proba</td>\n",
" <td>Calculer une probabilité</td>\n",
" <td>2</td>\n",
" <td>2.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>302</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>ADANI</td>\n",
" <td>Ismou</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>302</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>95</td>\n",
" <td>Rep</td>\n",
" <td>Proba</td>\n",
" <td>Calculer une probabilité</td>\n",
" <td>2</td>\n",
" <td>2.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>4</td>\n",
" <td>302</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>AHAMADI</td>\n",
" <td>Asbahati</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>302</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>95</td>\n",
" <td>Rep</td>\n",
" <td>Proba</td>\n",
" <td>Calculer une probabilité</td>\n",
" <td>2</td>\n",
" <td>2.666667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>5</td>\n",
" <td>302</td>\n",
" <td>3</td>\n",
" <td>5</td>\n",
" <td>AHAMADI OUSSENI</td>\n",
" <td>Ansufiddine</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>302</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>95</td>\n",
" <td>Rep</td>\n",
" <td>Proba</td>\n",
" <td>Calculer une probabilité</td>\n",
" <td>3</td>\n",
" <td>4.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>6</td>\n",
" <td>302</td>\n",
" <td>3</td>\n",
" <td>6</td>\n",
" <td>AHAMED</td>\n",
" <td>Fayadhi</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>302</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>95</td>\n",
" <td>Rep</td>\n",
" <td>Proba</td>\n",
" <td>Calculer une probabilité</td>\n",
" <td>3</td>\n",
" <td>4.000000</td>\n",
2018-03-28 12:30:27 +00:00
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" student_id question_id value id name_st surname_st mail_st \\\n",
"0 1 302 2 1 ABDALLAH ALLAOUI Taiassima \n",
"1 2 302 2 2 ADANI Ismou \n",
"2 4 302 2 4 AHAMADI Asbahati \n",
"3 5 302 3 5 AHAMADI OUSSENI Ansufiddine \n",
"4 6 302 3 6 AHAMED Fayadhi \n",
"\n",
" commment_st tribe_id id_q name_q score_rate_q is_leveled_q exercise_id \\\n",
"0 None 1 302 4 1 95 \n",
"1 None 1 302 4 1 95 \n",
"2 None 1 302 4 1 95 \n",
"3 None 1 302 4 1 95 \n",
"4 None 1 302 4 1 95 \n",
"\n",
" competence_q domain_q comment_q value_no_dot mark \n",
"0 Rep Proba Calculer une probabilité 2 2.666667 \n",
"1 Rep Proba Calculer une probabilité 2 2.666667 \n",
"2 Rep Proba Calculer une probabilité 2 2.666667 \n",
"3 Rep Proba Calculer une probabilité 3 4.000000 \n",
"4 Rep Proba Calculer une probabilité 3 4.000000 "
]
},
"execution_count": 110,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_sc_df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Bilan des compétences sans coefficients"
]
},
{
"cell_type": "code",
"execution_count": 141,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def value_mean(df):\n",
" df_ = df.replace(\".\", 0)\n",
" return round(df_[\"value\"].mean(), 0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Bilan avec les coefficients"
]
},
{
"cell_type": "code",
"execution_count": 152,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def mark_mean(df):\n",
" df_ = df.replace(\".\", 0)\n",
" mark_sum = df_[\"mark\"].sum() * 3\n",
" rate_sum = df_[\"score_rate_q\"].sum()\n",
" try:\n",
" return round(mark_sum / rate_sum, 0)\n",
" except ZeroDivisionError:\n",
" return np.nan"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Bilan des compétences"
]
},
{
"cell_type": "code",
"execution_count": 156,
"metadata": {},
"outputs": [],
"source": [
"comp_value_df = q_sc_df.groupby(['fullname_st', \"competence_q\"]).apply(value_mean).unstack()"
]
},
{
"cell_type": "code",
"execution_count": 157,
"metadata": {},
"outputs": [],
"source": [
"comp_mark_df = q_sc_df.groupby(['fullname_st', \"competence_q\"]).apply(mark_mean).unstack()"
]
},
{
"cell_type": "code",
"execution_count": 195,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f153b92a6d8>"
2018-03-28 12:30:27 +00:00
]
},
"execution_count": 195,
2018-03-28 12:30:27 +00:00
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArsAAAIoCAYAAABpkSNvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XucFNWd///Xe2ZgACEogkNEApFFjYqCaBJcCGD0G9ZL\nBMXLLFmjGxb9bRI2cWPImkSJRIKauAm4JgJG0RDReEMkq+IFR+INUGAUBUHASyIqGhYBuUx/fn/U\naSybnltPzXTT83k+Hjy66tSpT52qnj58+vTpapkZzjnnnHPOFaOSfDfAOeecc8655uLJrnPOOeec\nK1qe7DrnnHPOuaLlya5zzjnnnCtanuw655xzzrmi5cmuc84555wrWp7sOuecc865ouXJrnPOOeec\nK1qe7DrnnHPOuaLlya5zzjnnnCtaZflugHMtpOh/F9sWjkkkjobNBpYmEgsGAsm2LalY6XhJnmvy\nbStqyncDclDU/Ughv7YAtn7lsESi7Ve1uqDP1fuRRmlQP+Iju84555xzrmh5suucc84554qWJ7vO\nOeecc65o+Zxd51qBy2etY2H1Zg7sVMa8K49ucryqquVcffVtpFIpzjlnOOPGfb0g2tZaztO5fCjU\n15cO6k755deiLl3BjF3z7mT33bfl3K5CPc/maFtr0eIju5JGSjJJR8TKekvaLmmZpOWSnpZ0eNg2\nTNJmSS9KWiWpStLpWeIukzQno+xWSaMzynpLeqmWtpVJek/SlIzyhZKOb0iMsP17kj6W1DlWN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CepSw5t+qykKknLJL0kaUgo/0jSdZJelvSopC9KWijpdUlfD3Xa\nSbpFUnUYlR4eyi+UdEP
"text/plain": [
"<matplotlib.figure.Figure at 0x7f153bb70630>"
]
},
"metadata": {},
"output_type": "display_data"
2018-03-28 12:30:27 +00:00
}
],
"source": [
"f, (ax1, ax2) = plt.subplots(1, 2, figsize=(9, 9), sharey=True)\n",
"ax2.set_xlabel('')\n",
"sns.heatmap(comp_value_df,linewidths=0.2, annot=True, square=True, cbar=False, cmap=\"YlOrRd\", ax=ax1)\n",
"sns.heatmap(comp_mark_df,linewidths=0.2, annot=True, square=True, cbar=False, cmap=\"YlOrRd\", ax=ax2)"
2018-03-28 12:30:27 +00:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"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.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}