{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import xlsxwriter\n",
"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\n",
"from repytex.tools.sqlite_getters import all_ev_description"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Récupération de la structure du DNB blanc"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"conn = sqlite3.connect('../recopytex.db')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ev = Evaluation.from_sqlite(21, conn)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" term | \n",
" t_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 21 | \n",
" DNB blanc1 | \n",
" 2 | \n",
" 1 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name term t_id\n",
"0 21 DNB blanc1 2 1"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.ev_df"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" grade | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" 302 | \n",
" 3e | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name grade\n",
"0 1 302 3e"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.t_df"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" surname | \n",
" mail | \n",
" commment | \n",
" tribe_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" ABDALLAH ALLAOUI | \n",
" Taiassima | \n",
" | \n",
" None | \n",
" 1 | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" ADANI | \n",
" Ismou | \n",
" | \n",
" None | \n",
" 1 | \n",
"
\n",
" \n",
" 2 | \n",
" 3 | \n",
" AHAMADA | \n",
" Dhoulkamal | \n",
" | \n",
" None | \n",
" 1 | \n",
"
\n",
" \n",
" 3 | \n",
" 4 | \n",
" AHAMADI | \n",
" Asbahati | \n",
" | \n",
" None | \n",
" 1 | \n",
"
\n",
" \n",
" 4 | \n",
" 5 | \n",
" AHAMADI OUSSENI | \n",
" Ansufiddine | \n",
" | \n",
" None | \n",
" 1 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name surname mail commment tribe_id\n",
"0 1 ABDALLAH ALLAOUI Taiassima None 1\n",
"1 2 ADANI Ismou None 1\n",
"2 3 AHAMADA Dhoulkamal None 1\n",
"3 4 AHAMADI Asbahati None 1\n",
"4 5 AHAMADI OUSSENI Ansufiddine None 1"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.s_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" eval_id | \n",
" date | \n",
" comment | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 64 | \n",
" 1 - QCM | \n",
" 21 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" 65 | \n",
" 2 - Boite de chocolat | \n",
" 21 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" 66 | \n",
" 3 - Scratch | \n",
" 21 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" 67 | \n",
" 4 - Programme de calcul | \n",
" 21 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 4 | \n",
" 68 | \n",
" 5 - Macaron | \n",
" 21 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 5 | \n",
" 69 | \n",
" 6 - Inspecteur | \n",
" 21 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 6 | \n",
" 70 | \n",
" 7 - La tache | \n",
" 21 | \n",
" 2018-02-07 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 7 | \n",
" 91 | \n",
" Présentation | \n",
" 21 | \n",
" 2018-02-18 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name eval_id date comment\n",
"0 64 1 - QCM 21 2018-02-07 00:00:00.000000 \n",
"1 65 2 - Boite de chocolat 21 2018-02-07 00:00:00.000000 \n",
"2 66 3 - Scratch 21 2018-02-07 00:00:00.000000 \n",
"3 67 4 - Programme de calcul 21 2018-02-07 00:00:00.000000 \n",
"4 68 5 - Macaron 21 2018-02-07 00:00:00.000000 \n",
"5 69 6 - Inspecteur 21 2018-02-07 00:00:00.000000 \n",
"6 70 7 - La tache 21 2018-02-07 00:00:00.000000 \n",
"7 91 Présentation 21 2018-02-18 00:00:00.000000 "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.ex_df"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" question_id | \n",
" student_id | \n",
" value | \n",
"
\n",
" \n",
" \n",
" \n",
"
\n",
"
"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [id, question_id, student_id, value]\n",
"Index: []"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ev.sc_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Evaluation DNB blanc1 302 - T2\n",
"Ex 1 - QCM\n",
"\tQu 1: QCM (2, Cal)\n",
"\tQu 2: QCM (2, Cal)\n",
"\tQu 3: QCM (2, Cal)\n",
"\tQu 4: QCM (2, Rep)\n",
"\tQu 5: QCM (2, Cal)\n",
"Ex 2 - Boite de chocolat\n",
"\tQu 1 à 3: Calcul proba (4, Rep)\n",
"\tQu 2: Modification situation (3, Rai)\n",
"\tQu 3: Nouvelle composition (3, Rai)\n",
"Ex 3 - Scratch\n",
"\tQu 1: Que fait le programme (3, Com)\n",
"\tQu 2: Réponse à 13 (4, Rai)\n",
"\tQu 3: Age pour conduire (3, Cher)\n",
"Ex 4 - Programme de calcul\n",
"\tQu 1: Application du calcul (5, Cal)\n",
"\tQu 2: Renverser le calcul (4, Rai)\n",
"\tQu 3: Appliquer à x et developper (6, Cal)\n",
"Ex 5 - Macaron\n",
"\tQu 1: Proportionnalité (3, Mod)\n",
"\tQu 2 et 4: Lecture graphique (4, Rep)\n",
"\tQu 3: Écart de température (4, Rep)\n",
"\tQu 4: Satisfaction (4, Com)\n",
"Ex 6 - Inspecteur\n",
"\tQu 1: Hypothèses (2, Cher)\n",
"\tQu 1: Reconnaissance des théorèmes (3, Mod)\n",
"\tQu 1: Calculs dans les théorèmes (4, Cal)\n",
"\tQu 1: Réponse à la question (3, Com)\n",
"\tQu 2: Confiance au pilote (3, Rai)\n",
"Ex 7 - La tache\n",
"\tQu : Décomposition du problème (3, Cher)\n",
"\tQu : Lecture des informations (4, Cher)\n",
"\tQu : Calculs sensé (4, Cal)\n",
"\tQu : Clarté des explications (4, Com)\n",
"Ex Présentation\n",
"\tQu : (10, Com)\n",
"\n"
]
}
],
"source": [
"print(ev.description())"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## Construction des df à partir du tableur pour les 306"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ev_df = ev.ev_df"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ex_df = ev.ex_df"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"q_df = ev.q_df"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"t_df = ev.t_df"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"s_df = ev.s_df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Extraction des scores"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"excelname = './302_dnbblanc1.xls'"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"xls_df = pd.read_excel(excelname).T"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Présentation | \n",
" Ex 1 - QCM | \n",
" 0 - QCM | \n",
" 1 - QCM | \n",
" 2 - QCM | \n",
" 3 - QCM | \n",
" 4 - QCM | \n",
" Ex 2 - Boite de chocolat | \n",
" 0 - Calcul proba | \n",
" 1 - Modification situation | \n",
" ... | \n",
" 0 - Hypothèses | \n",
" 1 - Reconnaissance des théorèmes | \n",
" 2 - Calculs dans les théorèmes | \n",
" 3 - Réponse à la question | \n",
" 4 - Confiance au pilote | \n",
" Ex 7 - La tache | \n",
" 0 - Décomposition du problème | \n",
" 1 - Lecture des informations | \n",
" 2 - Calculs sensé | \n",
" 3 - Clarté des explications | \n",
"
\n",
" \n",
" \n",
" \n",
" Competence | \n",
" NaN | \n",
" NaN | \n",
" Cal | \n",
" Cal | \n",
" Cal | \n",
" Rep | \n",
" Cal | \n",
" NaN | \n",
" Rep | \n",
" Rai | \n",
" ... | \n",
" Cher | \n",
" Mod | \n",
" Cal | \n",
" Com | \n",
" Rai | \n",
" NaN | \n",
" Cher | \n",
" Cher | \n",
" Cal | \n",
" Com | \n",
"
\n",
" \n",
" Barème | \n",
" 10 | \n",
" 10 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 10 | \n",
" 4 | \n",
" 3 | \n",
" ... | \n",
" 2 | \n",
" 3 | \n",
" 4 | \n",
" 3 | \n",
" 3 | \n",
" 15 | \n",
" 3 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
"
\n",
" \n",
" ismou | \n",
" 8 | \n",
" 4 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 4 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
"
\n",
" \n",
" asbahati | \n",
" 10 | \n",
" 6 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 10 | \n",
" 4 | \n",
" 3 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 13 | \n",
" 3 | \n",
" 4 | \n",
" 2 | \n",
" 4 | \n",
"
\n",
" \n",
" Hadaïta | \n",
" 9 | \n",
" 6 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 7 | \n",
" 4 | \n",
" 3 | \n",
" ... | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 1 | \n",
" 3 | \n",
" 11 | \n",
" 3 | \n",
" 4 | \n",
" 2 | \n",
" 2 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 35 columns
\n",
"
"
],
"text/plain": [
" Présentation Ex 1 - QCM 0 - QCM 1 - QCM 2 - QCM 3 - QCM 4 - QCM \\\n",
"Competence NaN NaN Cal Cal Cal Rep Cal \n",
"Barème 10 10 2 2 2 2 2 \n",
"ismou 8 4 2 0 0 0 2 \n",
"asbahati 10 6 2 0 2 2 0 \n",
"Hadaïta 9 6 0 2 2 2 0 \n",
"\n",
" Ex 2 - Boite de chocolat 0 - Calcul proba \\\n",
"Competence NaN Rep \n",
"Barème 10 4 \n",
"ismou 0 0 \n",
"asbahati 10 4 \n",
"Hadaïta 7 4 \n",
"\n",
" 1 - Modification situation ... \\\n",
"Competence Rai ... \n",
"Barème 3 ... \n",
"ismou 0 ... \n",
"asbahati 3 ... \n",
"Hadaïta 3 ... \n",
"\n",
" 0 - Hypothèses 1 - Reconnaissance des théorèmes \\\n",
"Competence Cher Mod \n",
"Barème 2 3 \n",
"ismou 0 1 \n",
"asbahati 0 0 \n",
"Hadaïta 0 2 \n",
"\n",
" 2 - Calculs dans les théorèmes 3 - Réponse à la question \\\n",
"Competence Cal Com \n",
"Barème 4 3 \n",
"ismou 0 0 \n",
"asbahati 0 0 \n",
"Hadaïta 0 1 \n",
"\n",
" 4 - Confiance au pilote Ex 7 - La tache \\\n",
"Competence Rai NaN \n",
"Barème 3 15 \n",
"ismou 0 4 \n",
"asbahati 3 13 \n",
"Hadaïta 3 11 \n",
"\n",
" 0 - Décomposition du problème 1 - Lecture des informations \\\n",
"Competence Cher Cher \n",
"Barème 3 4 \n",
"ismou 1 1 \n",
"asbahati 3 4 \n",
"Hadaïta 3 4 \n",
"\n",
" 2 - Calculs sensé 3 - Clarté des explications \n",
"Competence Cal Com \n",
"Barème 4 4 \n",
"ismou 1 1 \n",
"asbahati 2 4 \n",
"Hadaïta 2 2 \n",
"\n",
"[5 rows x 35 columns]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xls_df = xls_df.drop(\"DNB blanc1\", axis = 1)\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Présentation | \n",
" 0 - QCM | \n",
" 1 - QCM | \n",
" 2 - QCM | \n",
" 3 - QCM | \n",
" 4 - QCM | \n",
" 0 - Calcul proba | \n",
" 1 - Modification situation | \n",
" 2 - Nouvelle composition | \n",
" 0 - Que fait le programme | \n",
" ... | \n",
" 3 - Satisfaction | \n",
" 0 - Hypothèses | \n",
" 1 - Reconnaissance des théorèmes | \n",
" 2 - Calculs dans les théorèmes | \n",
" 3 - Réponse à la question | \n",
" 4 - Confiance au pilote | \n",
" 0 - Décomposition du problème | \n",
" 1 - Lecture des informations | \n",
" 2 - Calculs sensé | \n",
" 3 - Clarté des explications | \n",
"
\n",
" \n",
" \n",
" \n",
" Competence | \n",
" NaN | \n",
" Cal | \n",
" Cal | \n",
" Cal | \n",
" Rep | \n",
" Cal | \n",
" Rep | \n",
" Rai | \n",
" Rai | \n",
" Com | \n",
" ... | \n",
" Com | \n",
" Cher | \n",
" Mod | \n",
" Cal | \n",
" Com | \n",
" Rai | \n",
" Cher | \n",
" Cher | \n",
" Cal | \n",
" Com | \n",
"
\n",
" \n",
" Barème | \n",
" 10 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 4 | \n",
" 3 | \n",
" 3 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 2 | \n",
" 3 | \n",
" 4 | \n",
" 3 | \n",
" 3 | \n",
" 3 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
"
\n",
" \n",
" ismou | \n",
" 8 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
"
\n",
" \n",
" asbahati | \n",
" 10 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 3 | \n",
" 3 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 4 | \n",
" 2 | \n",
" 4 | \n",
"
\n",
" \n",
" Hadaïta | \n",
" 9 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 3 | \n",
" 0 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 1 | \n",
" 3 | \n",
" 3 | \n",
" 4 | \n",
" 2 | \n",
" 2 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 28 columns
\n",
"
"
],
"text/plain": [
" Présentation 0 - QCM 1 - QCM 2 - QCM 3 - QCM 4 - QCM \\\n",
"Competence NaN Cal Cal Cal Rep Cal \n",
"Barème 10 2 2 2 2 2 \n",
"ismou 8 2 0 0 0 2 \n",
"asbahati 10 2 0 2 2 0 \n",
"Hadaïta 9 0 2 2 2 0 \n",
"\n",
" 0 - Calcul proba 1 - Modification situation \\\n",
"Competence Rep Rai \n",
"Barème 4 3 \n",
"ismou 0 0 \n",
"asbahati 4 3 \n",
"Hadaïta 4 3 \n",
"\n",
" 2 - Nouvelle composition 0 - Que fait le programme \\\n",
"Competence Rai Com \n",
"Barème 3 3 \n",
"ismou 0 2 \n",
"asbahati 3 3 \n",
"Hadaïta 0 3 \n",
"\n",
" ... 3 - Satisfaction 0 - Hypothèses \\\n",
"Competence ... Com Cher \n",
"Barème ... 4 2 \n",
"ismou ... 4 0 \n",
"asbahati ... 4 0 \n",
"Hadaïta ... 4 0 \n",
"\n",
" 1 - Reconnaissance des théorèmes 2 - Calculs dans les théorèmes \\\n",
"Competence Mod Cal \n",
"Barème 3 4 \n",
"ismou 1 0 \n",
"asbahati 0 0 \n",
"Hadaïta 2 0 \n",
"\n",
" 3 - Réponse à la question 4 - Confiance au pilote \\\n",
"Competence Com Rai \n",
"Barème 3 3 \n",
"ismou 0 0 \n",
"asbahati 0 3 \n",
"Hadaïta 1 3 \n",
"\n",
" 0 - Décomposition du problème 1 - Lecture des informations \\\n",
"Competence Cher Cher \n",
"Barème 3 4 \n",
"ismou 1 1 \n",
"asbahati 3 4 \n",
"Hadaïta 3 4 \n",
"\n",
" 2 - Calculs sensé 3 - Clarté des explications \n",
"Competence Cal Com \n",
"Barème 4 4 \n",
"ismou 1 1 \n",
"asbahati 2 4 \n",
"Hadaïta 2 2 \n",
"\n",
"[5 rows x 28 columns]"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ex_cols = [c for c in xls_df.columns if 'Ex' in c]\n",
"xls_df = xls_df.drop(ex_cols, axis=1)\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" score_rate | \n",
" is_leveled | \n",
" exercise_id | \n",
" competence | \n",
" domain | \n",
" comment | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 201 | \n",
" 1 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Cal | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 1 | \n",
" 224 | \n",
" 2 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Cal | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 2 | \n",
" 225 | \n",
" 3 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Cal | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 3 | \n",
" 226 | \n",
" 4 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Rep | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 4 | \n",
" 227 | \n",
" 5 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Cal | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 0 | \n",
" 202 | \n",
" 1 à 3 | \n",
" 4 | \n",
" 1 | \n",
" 65 | \n",
" Rep | \n",
" Proba | \n",
" Calcul proba | \n",
"
\n",
" \n",
" 1 | \n",
" 203 | \n",
" 2 | \n",
" 3 | \n",
" 1 | \n",
" 65 | \n",
" Rai | \n",
" Proba | \n",
" Modification situation | \n",
"
\n",
" \n",
" 2 | \n",
" 204 | \n",
" 3 | \n",
" 3 | \n",
" 1 | \n",
" 65 | \n",
" Rai | \n",
" Proba | \n",
" Nouvelle composition | \n",
"
\n",
" \n",
" 0 | \n",
" 205 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 66 | \n",
" Com | \n",
" Scratch | \n",
" Que fait le programme | \n",
"
\n",
" \n",
" 1 | \n",
" 206 | \n",
" 2 | \n",
" 4 | \n",
" 1 | \n",
" 66 | \n",
" Rai | \n",
" Scratch | \n",
" Réponse à 13 | \n",
"
\n",
" \n",
" 2 | \n",
" 207 | \n",
" 3 | \n",
" 3 | \n",
" 1 | \n",
" 66 | \n",
" Cher | \n",
" Scratch | \n",
" Age pour conduire | \n",
"
\n",
" \n",
" 0 | \n",
" 208 | \n",
" 1 | \n",
" 5 | \n",
" 1 | \n",
" 67 | \n",
" Cal | \n",
" Programme | \n",
" Application du calcul | \n",
"
\n",
" \n",
" 1 | \n",
" 209 | \n",
" 2 | \n",
" 4 | \n",
" 1 | \n",
" 67 | \n",
" Rai | \n",
" Programme | \n",
" Renverser le calcul | \n",
"
\n",
" \n",
" 2 | \n",
" 210 | \n",
" 3 | \n",
" 6 | \n",
" 1 | \n",
" 67 | \n",
" Cal | \n",
" Programme | \n",
" Appliquer à x et developper | \n",
"
\n",
" \n",
" 0 | \n",
" 211 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 68 | \n",
" Mod | \n",
" Proportionnel | \n",
" Proportionnalité | \n",
"
\n",
" \n",
" 1 | \n",
" 212 | \n",
" 2 et 4 | \n",
" 4 | \n",
" 1 | \n",
" 68 | \n",
" Rep | \n",
" Graphique | \n",
" Lecture graphique | \n",
"
\n",
" \n",
" 2 | \n",
" 213 | \n",
" 3 | \n",
" 4 | \n",
" 1 | \n",
" 68 | \n",
" Rep | \n",
" Graphique | \n",
" Écart de température | \n",
"
\n",
" \n",
" 3 | \n",
" 214 | \n",
" 4 | \n",
" 4 | \n",
" 1 | \n",
" 68 | \n",
" Com | \n",
" Graphique | \n",
" Satisfaction | \n",
"
\n",
" \n",
" 0 | \n",
" 215 | \n",
" 1 | \n",
" 2 | \n",
" 1 | \n",
" 69 | \n",
" Cher | \n",
" Géométrie | \n",
" Hypothèses | \n",
"
\n",
" \n",
" 1 | \n",
" 216 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 69 | \n",
" Mod | \n",
" Géométrie | \n",
" Reconnaissance des théorèmes | \n",
"
\n",
" \n",
" 2 | \n",
" 217 | \n",
" 1 | \n",
" 4 | \n",
" 1 | \n",
" 69 | \n",
" Cal | \n",
" Géométrie | \n",
" Calculs dans les théorèmes | \n",
"
\n",
" \n",
" 3 | \n",
" 218 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 69 | \n",
" Com | \n",
" Géométrie | \n",
" Réponse à la question | \n",
"
\n",
" \n",
" 4 | \n",
" 219 | \n",
" 2 | \n",
" 3 | \n",
" 1 | \n",
" 69 | \n",
" Rai | \n",
" Géométrie | \n",
" Confiance au pilote | \n",
"
\n",
" \n",
" 0 | \n",
" 220 | \n",
" | \n",
" 3 | \n",
" 1 | \n",
" 70 | \n",
" Cher | \n",
" TC | \n",
" Décomposition du problème | \n",
"
\n",
" \n",
" 1 | \n",
" 221 | \n",
" | \n",
" 4 | \n",
" 1 | \n",
" 70 | \n",
" Cher | \n",
" TC | \n",
" Lecture des informations | \n",
"
\n",
" \n",
" 2 | \n",
" 222 | \n",
" | \n",
" 4 | \n",
" 1 | \n",
" 70 | \n",
" Cal | \n",
" TC | \n",
" Calculs sensé | \n",
"
\n",
" \n",
" 3 | \n",
" 223 | \n",
" | \n",
" 4 | \n",
" 1 | \n",
" 70 | \n",
" Com | \n",
" TC | \n",
" Clarté des explications | \n",
"
\n",
" \n",
" 0 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name score_rate is_leveled exercise_id competence domain \\\n",
"0 201 1 2 1 64 Cal \n",
"1 224 2 2 1 64 Cal \n",
"2 225 3 2 1 64 Cal \n",
"3 226 4 2 1 64 Rep \n",
"4 227 5 2 1 64 Cal \n",
"0 202 1 à 3 4 1 65 Rep Proba \n",
"1 203 2 3 1 65 Rai Proba \n",
"2 204 3 3 1 65 Rai Proba \n",
"0 205 1 3 1 66 Com Scratch \n",
"1 206 2 4 1 66 Rai Scratch \n",
"2 207 3 3 1 66 Cher Scratch \n",
"0 208 1 5 1 67 Cal Programme \n",
"1 209 2 4 1 67 Rai Programme \n",
"2 210 3 6 1 67 Cal Programme \n",
"0 211 1 3 1 68 Mod Proportionnel \n",
"1 212 2 et 4 4 1 68 Rep Graphique \n",
"2 213 3 4 1 68 Rep Graphique \n",
"3 214 4 4 1 68 Com Graphique \n",
"0 215 1 2 1 69 Cher Géométrie \n",
"1 216 1 3 1 69 Mod Géométrie \n",
"2 217 1 4 1 69 Cal Géométrie \n",
"3 218 1 3 1 69 Com Géométrie \n",
"4 219 2 3 1 69 Rai Géométrie \n",
"0 220 3 1 70 Cher TC \n",
"1 221 4 1 70 Cher TC \n",
"2 222 4 1 70 Cal TC \n",
"3 223 4 1 70 Com TC \n",
"0 289 10 1 91 Com Présentation \n",
"\n",
" comment \n",
"0 QCM \n",
"1 QCM \n",
"2 QCM \n",
"3 QCM \n",
"4 QCM \n",
"0 Calcul proba \n",
"1 Modification situation \n",
"2 Nouvelle composition \n",
"0 Que fait le programme \n",
"1 Réponse à 13 \n",
"2 Age pour conduire \n",
"0 Application du calcul \n",
"1 Renverser le calcul \n",
"2 Appliquer à x et developper \n",
"0 Proportionnalité \n",
"1 Lecture graphique \n",
"2 Écart de température \n",
"3 Satisfaction \n",
"0 Hypothèses \n",
"1 Reconnaissance des théorèmes \n",
"2 Calculs dans les théorèmes \n",
"3 Réponse à la question \n",
"4 Confiance au pilote \n",
"0 Décomposition du problème \n",
"1 Lecture des informations \n",
"2 Calculs sensé \n",
"3 Clarté des explications \n",
"0 "
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_df"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" score_rate | \n",
" is_leveled | \n",
" exercise_id | \n",
" competence | \n",
" domain | \n",
" comment | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 201 | \n",
" 1 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Cal | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 1 | \n",
" 224 | \n",
" 2 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Cal | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 2 | \n",
" 225 | \n",
" 3 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Cal | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 3 | \n",
" 226 | \n",
" 4 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Rep | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 4 | \n",
" 227 | \n",
" 5 | \n",
" 2 | \n",
" 1 | \n",
" 64 | \n",
" Cal | \n",
" | \n",
" QCM | \n",
"
\n",
" \n",
" 0 | \n",
" 202 | \n",
" 1 à 3 | \n",
" 4 | \n",
" 1 | \n",
" 65 | \n",
" Rep | \n",
" Proba | \n",
" Calcul proba | \n",
"
\n",
" \n",
" 1 | \n",
" 203 | \n",
" 2 | \n",
" 3 | \n",
" 1 | \n",
" 65 | \n",
" Rai | \n",
" Proba | \n",
" Modification situation | \n",
"
\n",
" \n",
" 2 | \n",
" 204 | \n",
" 3 | \n",
" 3 | \n",
" 1 | \n",
" 65 | \n",
" Rai | \n",
" Proba | \n",
" Nouvelle composition | \n",
"
\n",
" \n",
" 0 | \n",
" 205 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 66 | \n",
" Com | \n",
" Scratch | \n",
" Que fait le programme | \n",
"
\n",
" \n",
" 1 | \n",
" 206 | \n",
" 2 | \n",
" 4 | \n",
" 1 | \n",
" 66 | \n",
" Rai | \n",
" Scratch | \n",
" Réponse à 13 | \n",
"
\n",
" \n",
" 2 | \n",
" 207 | \n",
" 3 | \n",
" 3 | \n",
" 1 | \n",
" 66 | \n",
" Cher | \n",
" Scratch | \n",
" Age pour conduire | \n",
"
\n",
" \n",
" 0 | \n",
" 208 | \n",
" 1 | \n",
" 5 | \n",
" 1 | \n",
" 67 | \n",
" Cal | \n",
" Programme | \n",
" Application du calcul | \n",
"
\n",
" \n",
" 1 | \n",
" 209 | \n",
" 2 | \n",
" 4 | \n",
" 1 | \n",
" 67 | \n",
" Rai | \n",
" Programme | \n",
" Renverser le calcul | \n",
"
\n",
" \n",
" 2 | \n",
" 210 | \n",
" 3 | \n",
" 6 | \n",
" 1 | \n",
" 67 | \n",
" Cal | \n",
" Programme | \n",
" Appliquer à x et developper | \n",
"
\n",
" \n",
" 0 | \n",
" 211 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 68 | \n",
" Mod | \n",
" Proportionnel | \n",
" Proportionnalité | \n",
"
\n",
" \n",
" 1 | \n",
" 212 | \n",
" 2 et 4 | \n",
" 4 | \n",
" 1 | \n",
" 68 | \n",
" Rep | \n",
" Graphique | \n",
" Lecture graphique | \n",
"
\n",
" \n",
" 2 | \n",
" 213 | \n",
" 3 | \n",
" 4 | \n",
" 1 | \n",
" 68 | \n",
" Rep | \n",
" Graphique | \n",
" Écart de température | \n",
"
\n",
" \n",
" 3 | \n",
" 214 | \n",
" 4 | \n",
" 4 | \n",
" 1 | \n",
" 68 | \n",
" Com | \n",
" Graphique | \n",
" Satisfaction | \n",
"
\n",
" \n",
" 0 | \n",
" 215 | \n",
" 1 | \n",
" 2 | \n",
" 1 | \n",
" 69 | \n",
" Cher | \n",
" Géométrie | \n",
" Hypothèses | \n",
"
\n",
" \n",
" 1 | \n",
" 216 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 69 | \n",
" Mod | \n",
" Géométrie | \n",
" Reconnaissance des théorèmes | \n",
"
\n",
" \n",
" 2 | \n",
" 217 | \n",
" 1 | \n",
" 4 | \n",
" 1 | \n",
" 69 | \n",
" Cal | \n",
" Géométrie | \n",
" Calculs dans les théorèmes | \n",
"
\n",
" \n",
" 3 | \n",
" 218 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 69 | \n",
" Com | \n",
" Géométrie | \n",
" Réponse à la question | \n",
"
\n",
" \n",
" 4 | \n",
" 219 | \n",
" 2 | \n",
" 3 | \n",
" 1 | \n",
" 69 | \n",
" Rai | \n",
" Géométrie | \n",
" Confiance au pilote | \n",
"
\n",
" \n",
" 0 | \n",
" 220 | \n",
" | \n",
" 3 | \n",
" 1 | \n",
" 70 | \n",
" Cher | \n",
" TC | \n",
" Décomposition du problème | \n",
"
\n",
" \n",
" 1 | \n",
" 221 | \n",
" | \n",
" 4 | \n",
" 1 | \n",
" 70 | \n",
" Cher | \n",
" TC | \n",
" Lecture des informations | \n",
"
\n",
" \n",
" 2 | \n",
" 222 | \n",
" | \n",
" 4 | \n",
" 1 | \n",
" 70 | \n",
" Cal | \n",
" TC | \n",
" Calculs sensé | \n",
"
\n",
" \n",
" 3 | \n",
" 223 | \n",
" | \n",
" 4 | \n",
" 1 | \n",
" 70 | \n",
" Com | \n",
" TC | \n",
" Clarté des explications | \n",
"
\n",
" \n",
" 0 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name score_rate is_leveled exercise_id competence domain \\\n",
"0 201 1 2 1 64 Cal \n",
"1 224 2 2 1 64 Cal \n",
"2 225 3 2 1 64 Cal \n",
"3 226 4 2 1 64 Rep \n",
"4 227 5 2 1 64 Cal \n",
"0 202 1 à 3 4 1 65 Rep Proba \n",
"1 203 2 3 1 65 Rai Proba \n",
"2 204 3 3 1 65 Rai Proba \n",
"0 205 1 3 1 66 Com Scratch \n",
"1 206 2 4 1 66 Rai Scratch \n",
"2 207 3 3 1 66 Cher Scratch \n",
"0 208 1 5 1 67 Cal Programme \n",
"1 209 2 4 1 67 Rai Programme \n",
"2 210 3 6 1 67 Cal Programme \n",
"0 211 1 3 1 68 Mod Proportionnel \n",
"1 212 2 et 4 4 1 68 Rep Graphique \n",
"2 213 3 4 1 68 Rep Graphique \n",
"3 214 4 4 1 68 Com Graphique \n",
"0 215 1 2 1 69 Cher Géométrie \n",
"1 216 1 3 1 69 Mod Géométrie \n",
"2 217 1 4 1 69 Cal Géométrie \n",
"3 218 1 3 1 69 Com Géométrie \n",
"4 219 2 3 1 69 Rai Géométrie \n",
"0 220 3 1 70 Cher TC \n",
"1 221 4 1 70 Cher TC \n",
"2 222 4 1 70 Cal TC \n",
"3 223 4 1 70 Com TC \n",
"0 289 10 1 91 Com Présentation \n",
"\n",
" comment \n",
"0 QCM \n",
"1 QCM \n",
"2 QCM \n",
"3 QCM \n",
"4 QCM \n",
"0 Calcul proba \n",
"1 Modification situation \n",
"2 Nouvelle composition \n",
"0 Que fait le programme \n",
"1 Réponse à 13 \n",
"2 Age pour conduire \n",
"0 Application du calcul \n",
"1 Renverser le calcul \n",
"2 Appliquer à x et developper \n",
"0 Proportionnalité \n",
"1 Lecture graphique \n",
"2 Écart de température \n",
"3 Satisfaction \n",
"0 Hypothèses \n",
"1 Reconnaissance des théorèmes \n",
"2 Calculs dans les théorèmes \n",
"3 Réponse à la question \n",
"4 Confiance au pilote \n",
"0 Décomposition du problème \n",
"1 Lecture des informations \n",
"2 Calculs sensé \n",
"3 Clarté des explications \n",
"0 "
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_df"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'0 - Application du calcul': 208,\n",
" '0 - Calcul proba': 202,\n",
" '0 - Décomposition du problème': 220,\n",
" '0 - Hypothèses': 215,\n",
" '0 - Proportionnalité': 211,\n",
" '0 - QCM': 201,\n",
" '0 - Que fait le programme': 205,\n",
" '1 - Lecture des informations': 221,\n",
" '1 - Lecture graphique': 212,\n",
" '1 - Modification situation': 203,\n",
" '1 - QCM': 224,\n",
" '1 - Reconnaissance des théorèmes': 216,\n",
" '1 - Renverser le calcul': 209,\n",
" '1 - Réponse à 13': 206,\n",
" '2 - Age pour conduire': 207,\n",
" '2 - Appliquer à x et developper': 210,\n",
" '2 - Calculs dans les théorèmes': 217,\n",
" '2 - Calculs sensé': 222,\n",
" '2 - Nouvelle composition': 204,\n",
" '2 - QCM': 225,\n",
" '2 - Écart de température': 213,\n",
" '3 - Clarté des explications': 223,\n",
" '3 - QCM': 226,\n",
" '3 - Réponse à la question': 218,\n",
" '3 - Satisfaction': 214,\n",
" '4 - Confiance au pilote': 219,\n",
" '4 - QCM': 227,\n",
" 'Présentation': 289}"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cols = {}\n",
"qcm = 0\n",
"for c in xls_df.columns:\n",
" a = q_df[q_df['comment']==c.split(' - ')[-1]]\n",
" try:\n",
" if \"QCM\" in c:\n",
" cols[c] = a.id.values[qcm]\n",
" qcm += 1\n",
" else:\n",
" cols[c] = a.id.values[0]\n",
" except IndexError:\n",
" # id de la question de présentation\n",
" cols[c] = 289\n",
"cols"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" 289 | \n",
" 201 | \n",
" 224 | \n",
" 225 | \n",
" 226 | \n",
" 227 | \n",
" 202 | \n",
" 203 | \n",
" 204 | \n",
" 205 | \n",
" ... | \n",
" 214 | \n",
" 215 | \n",
" 216 | \n",
" 217 | \n",
" 218 | \n",
" 219 | \n",
" 220 | \n",
" 221 | \n",
" 222 | \n",
" 223 | \n",
"
\n",
" \n",
" \n",
" \n",
" ismou | \n",
" 8 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
"
\n",
" \n",
" asbahati | \n",
" 10 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 3 | \n",
" 3 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 4 | \n",
" 2 | \n",
" 4 | \n",
"
\n",
" \n",
" Hadaïta | \n",
" 9 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 3 | \n",
" 0 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 1 | \n",
" 3 | \n",
" 3 | \n",
" 4 | \n",
" 2 | \n",
" 2 | \n",
"
\n",
" \n",
" anissa | \n",
" 8 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 4 | \n",
" 3 | \n",
" 2 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 3 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
"
\n",
" \n",
" raydel | \n",
" 10 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 4 | \n",
" 3 | \n",
" 0 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 28 columns
\n",
"
"
],
"text/plain": [
" 289 201 224 225 226 227 202 203 204 205 ... 214 215 216 217 218 219 \\\n",
"ismou 8 2 0 0 0 2 0 0 0 2 ... 4 0 1 0 0 0 \n",
"asbahati 10 2 0 2 2 0 4 3 3 3 ... 4 0 0 0 0 3 \n",
"Hadaïta 9 0 2 2 2 0 4 3 0 3 ... 4 0 2 0 1 3 \n",
"anissa 8 0 2 2 2 2 4 3 2 3 ... 4 0 0 0 0 2 \n",
"raydel 10 0 0 2 0 0 4 3 0 3 ... 4 2 2 2 0 3 \n",
"\n",
" 220 221 222 223 \n",
"ismou 1 1 1 1 \n",
"asbahati 3 4 2 4 \n",
"Hadaïta 3 4 2 2 \n",
"anissa 3 4 4 4 \n",
"raydel 3 4 4 4 \n",
"\n",
"[5 rows x 28 columns]"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xls_df = xls_df.rename(columns=cols).drop([\"Competence\", 'Barème', \"anchoura\"])\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 Taiassima\n",
"1 Ismou\n",
"2 Dhoulkamal\n",
"3 Asbahati\n",
"4 Ansufiddine\n",
"5 Fayadhi\n",
"6 Hadaïta\n",
"7 Anissa\n",
"8 Raydel\n",
"9 Fatima\n",
"10 Elzame\n",
"11 Zalida\n",
"12 Abdillah Mze Limassi\n",
"13 Zaankidine\n",
"14 Kayssoiria\n",
"15 Asna\n",
"16 Soibrata\n",
"17 Doulkifly\n",
"18 Nassur\n",
"19 Anchoura\n",
"20 Nadia\n",
"21 Izak\n",
"22 Bakari\n",
"23 Fatoumia\n",
"24 Claudiana\n",
"25 Salahou\n",
"26 Chaharzade\n",
"Name: surname, dtype: object"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s_df[\"surname\"]"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'Dhoulkamal': 3,\n",
" 'Hadaïta': 7,\n",
" 'abdillah mze': 13,\n",
" 'anissa': 8,\n",
" 'ansufiddine': 5,\n",
" 'asbahati': 4,\n",
" 'asna': 16,\n",
" 'bakari': 23,\n",
" 'chaharzade': 76,\n",
" 'claudiana': 25,\n",
" 'doulkifly': 18,\n",
" 'elzame': 11,\n",
" 'fatima': 10,\n",
" 'fatoumia': 24,\n",
" 'fayadhi': 6,\n",
" 'ismou': 2,\n",
" 'izak': 22,\n",
" 'kayssoiria': 15,\n",
" 'nadia': 21,\n",
" 'nassur': 19,\n",
" 'raydel': 9,\n",
" 'salahou': 26,\n",
" 'soibrata': 17,\n",
" 'taiassima': 1,\n",
" 'zaankidine': 14,\n",
" 'zalida': 12}"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"studs = {}\n",
"for s in xls_df.index:\n",
" ss = s_df[s_df['surname'].str.contains(s, case=False)]\n",
" ss = ss.id.values\n",
" try:\n",
" studs[s] = ss[0]\n",
" except IndexError:\n",
" print(f\"rien sur {s}\")\n",
"studs"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" 289 | \n",
" 201 | \n",
" 224 | \n",
" 225 | \n",
" 226 | \n",
" 227 | \n",
" 202 | \n",
" 203 | \n",
" 204 | \n",
" 205 | \n",
" ... | \n",
" 214 | \n",
" 215 | \n",
" 216 | \n",
" 217 | \n",
" 218 | \n",
" 219 | \n",
" 220 | \n",
" 221 | \n",
" 222 | \n",
" 223 | \n",
"
\n",
" \n",
" \n",
" \n",
" 2 | \n",
" 8 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
"
\n",
" \n",
" 4 | \n",
" 10 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 3 | \n",
" 3 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 4 | \n",
" 2 | \n",
" 4 | \n",
"
\n",
" \n",
" 7 | \n",
" 9 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 4 | \n",
" 3 | \n",
" 0 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 1 | \n",
" 3 | \n",
" 3 | \n",
" 4 | \n",
" 2 | \n",
" 2 | \n",
"
\n",
" \n",
" 8 | \n",
" 8 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 4 | \n",
" 3 | \n",
" 2 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 3 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
"
\n",
" \n",
" 9 | \n",
" 10 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 4 | \n",
" 3 | \n",
" 0 | \n",
" 3 | \n",
" ... | \n",
" 4 | \n",
" 2 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 28 columns
\n",
"
"
],
"text/plain": [
" 289 201 224 225 226 227 202 203 204 205 ... 214 215 216 217 218 219 220 221 \\\n",
"2 8 2 0 0 0 2 0 0 0 2 ... 4 0 1 0 0 0 1 1 \n",
"4 10 2 0 2 2 0 4 3 3 3 ... 4 0 0 0 0 3 3 4 \n",
"7 9 0 2 2 2 0 4 3 0 3 ... 4 0 2 0 1 3 3 4 \n",
"8 8 0 2 2 2 2 4 3 2 3 ... 4 0 0 0 0 2 3 4 \n",
"9 10 0 0 2 0 0 4 3 0 3 ... 4 2 2 2 0 3 3 4 \n",
"\n",
" 222 223 \n",
"2 1 1 \n",
"4 2 4 \n",
"7 2 2 \n",
"8 4 4 \n",
"9 4 4 \n",
"\n",
"[5 rows x 28 columns]"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xls_df = xls_df.rename(index=studs)\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2 289 8\n",
" 201 2\n",
" 224 0\n",
" 225 0\n",
" 226 0\n",
"dtype: object"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xls_df = xls_df.stack()\n",
"xls_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 2 | \n",
" 289 | \n",
" 8 | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" 201 | \n",
" 2 | \n",
"
\n",
" \n",
" 2 | \n",
" 2 | \n",
" 224 | \n",
" 0 | \n",
"
\n",
" \n",
" 3 | \n",
" 2 | \n",
" 225 | \n",
" 0 | \n",
"
\n",
" \n",
" 4 | \n",
" 2 | \n",
" 226 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id mark\n",
"0 2 289 8\n",
"1 2 201 2\n",
"2 2 224 0\n",
"3 2 225 0\n",
"4 2 226 0"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_df = xls_df.reset_index().rename(columns={\"level_0\": \"student_id\", \"level_1\": \"question_id\", 0:'mark'})\n",
"sc_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 2 | \n",
" 289 | \n",
" 8 | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" 201 | \n",
" 2 | \n",
"
\n",
" \n",
" 2 | \n",
" 2 | \n",
" 224 | \n",
" 0 | \n",
"
\n",
" \n",
" 3 | \n",
" 2 | \n",
" 225 | \n",
" 0 | \n",
"
\n",
" \n",
" 4 | \n",
" 2 | \n",
" 226 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id mark\n",
"0 2 289 8\n",
"1 2 201 2\n",
"2 2 224 0\n",
"3 2 225 0\n",
"4 2 226 0"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_df[\"mark\"] = sc_df[\"mark\"].astype(int)\n",
"sc_df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Maintenant il faut transformer tout ça en niveau de compétence"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from repytex.tools.sc_transforms import mark2level\n",
"def mark2level_row(x):\n",
" return mark2level(x[\"mark\"], x[\"score_rate\"])"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
" id | \n",
" name | \n",
" score_rate | \n",
" is_leveled | \n",
" exercise_id | \n",
" competence | \n",
" domain | \n",
" comment | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 2 | \n",
" 289 | \n",
" 8 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" 4 | \n",
" 289 | \n",
" 10 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" 7 | \n",
" 289 | \n",
" 9 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" 8 | \n",
" 289 | \n",
" 8 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 4 | \n",
" 9 | \n",
" 289 | \n",
" 10 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id mark id name score_rate is_leveled \\\n",
"0 2 289 8 289 10 1 \n",
"1 4 289 10 289 10 1 \n",
"2 7 289 9 289 10 1 \n",
"3 8 289 8 289 10 1 \n",
"4 9 289 10 289 10 1 \n",
"\n",
" exercise_id competence domain comment \n",
"0 91 Com Présentation \n",
"1 91 Com Présentation \n",
"2 91 Com Présentation \n",
"3 91 Com Présentation \n",
"4 91 Com Présentation "
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_q_df = pd.merge(sc_df, q_df, left_on=\"question_id\", right_on=\"id\")\n",
"sc_q_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"sc_q_df[\"value\"] = sc_q_df.apply(mark2level_row, axis=1)\n",
"sc_q_df = sc_q_df[['student_id', 'question_id', 'value']]"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"sc_df = pd.merge(sc_df, sc_q_df, on=[\"student_id\", 'question_id'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"On met tout ensemble dans l'évaluation"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"dnbBlanc = Evaluation(ev_df, t_df, s_df, ex_df)\n",
"dnbBlanc.set_scores(sc_df)\n",
"dnbBlanc.set_ex_qu_structure(ex_df, q_df)\n",
"dnbBlanc.set_competence_assessment(sc_df, q_df)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exploration"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
" value | \n",
" id_x | \n",
" name_x | \n",
" surname | \n",
" mail | \n",
" commment | \n",
" tribe_id | \n",
" ... | \n",
" is_leveled | \n",
" exercise_id | \n",
" competence | \n",
" domain | \n",
" comment_x | \n",
" id | \n",
" name | \n",
" eval_id | \n",
" date | \n",
" comment_y | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 2 | \n",
" 289 | \n",
" 8 | \n",
" 2 | \n",
" 2 | \n",
" ADANI | \n",
" Ismou | \n",
" | \n",
" None | \n",
" 1 | \n",
" ... | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
" 91 | \n",
" Présentation | \n",
" 21 | \n",
" 2018-02-18 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" 4 | \n",
" 289 | \n",
" 10 | \n",
" 3 | \n",
" 4 | \n",
" AHAMADI | \n",
" Asbahati | \n",
" | \n",
" None | \n",
" 1 | \n",
" ... | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
" 91 | \n",
" Présentation | \n",
" 21 | \n",
" 2018-02-18 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" 7 | \n",
" 289 | \n",
" 9 | \n",
" 3 | \n",
" 7 | \n",
" AHMED SAID | \n",
" Hadaïta | \n",
" | \n",
" None | \n",
" 1 | \n",
" ... | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
" 91 | \n",
" Présentation | \n",
" 21 | \n",
" 2018-02-18 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" 8 | \n",
" 289 | \n",
" 8 | \n",
" 2 | \n",
" 8 | \n",
" ALI MADI | \n",
" Anissa | \n",
" | \n",
" None | \n",
" 1 | \n",
" ... | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
" 91 | \n",
" Présentation | \n",
" 21 | \n",
" 2018-02-18 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 4 | \n",
" 9 | \n",
" 289 | \n",
" 10 | \n",
" 3 | \n",
" 9 | \n",
" ALI | \n",
" Raydel | \n",
" | \n",
" None | \n",
" 1 | \n",
" ... | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
" 91 | \n",
" Présentation | \n",
" 21 | \n",
" 2018-02-18 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 23 columns
\n",
"
"
],
"text/plain": [
" student_id question_id mark value id_x name_x surname mail \\\n",
"0 2 289 8 2 2 ADANI Ismou \n",
"1 4 289 10 3 4 AHAMADI Asbahati \n",
"2 7 289 9 3 7 AHMED SAID Hadaïta \n",
"3 8 289 8 2 8 ALI MADI Anissa \n",
"4 9 289 10 3 9 ALI Raydel \n",
"\n",
" commment tribe_id ... is_leveled exercise_id competence \\\n",
"0 None 1 ... 1 91 Com \n",
"1 None 1 ... 1 91 Com \n",
"2 None 1 ... 1 91 Com \n",
"3 None 1 ... 1 91 Com \n",
"4 None 1 ... 1 91 Com \n",
"\n",
" domain comment_x id name eval_id \\\n",
"0 Présentation 91 Présentation 21 \n",
"1 Présentation 91 Présentation 21 \n",
"2 Présentation 91 Présentation 21 \n",
"3 Présentation 91 Présentation 21 \n",
"4 Présentation 91 Présentation 21 \n",
"\n",
" date comment_y \n",
"0 2018-02-18 00:00:00.000000 \n",
"1 2018-02-18 00:00:00.000000 \n",
"2 2018-02-18 00:00:00.000000 \n",
"3 2018-02-18 00:00:00.000000 \n",
"4 2018-02-18 00:00:00.000000 \n",
"\n",
"[5 rows x 23 columns]"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_s_df = pd.merge(dnbBlanc.sc_df, dnbBlanc.s_df, left_on='student_id', right_on='id')\n",
"sc_s_df = pd.merge(sc_s_df, dnbBlanc.q_df, left_on='question_id', right_on='id')\n",
"sc_s_df = pd.merge(sc_s_df, dnbBlanc.ex_df, left_on='exercise_id', right_on='id')\n",
"sc_s_df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Le compte y est! Ouf"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" | \n",
" mark | \n",
" score_rate | \n",
"
\n",
" \n",
" surname | \n",
" name | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
" Abdillah Mze Limassi | \n",
" 1 - QCM | \n",
" 8 | \n",
" 10 | \n",
"
\n",
" \n",
" 2 - Boite de chocolat | \n",
" 8 | \n",
" 10 | \n",
"
\n",
" \n",
" 3 - Scratch | \n",
" 10 | \n",
" 10 | \n",
"
\n",
" \n",
" 4 - Programme de calcul | \n",
" 5 | \n",
" 15 | \n",
"
\n",
" \n",
" 5 - Macaron | \n",
" 8 | \n",
" 15 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" mark score_rate\n",
"surname name \n",
"Abdillah Mze Limassi 1 - QCM 8 10\n",
" 2 - Boite de chocolat 8 10\n",
" 3 - Scratch 10 10\n",
" 4 - Programme de calcul 5 15\n",
" 5 - Macaron 8 15"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_s_df.groupby([\"surname\", \"name\"]).sum()[[\"mark\", 'score_rate']].head()"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"surname\n",
"Abdillah Mze Limassi 69\n",
"Anissa 72\n",
"Ansufiddine 26\n",
"Asbahati 72\n",
"Asna 60\n",
"Name: mark, dtype: int64"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sc_s_df.groupby([\"surname\"]).sum()[\"mark\"].head()"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" mark | \n",
" value | \n",
" id_x | \n",
" name_x | \n",
" surname | \n",
" mail | \n",
" commment | \n",
" tribe_id | \n",
" id_y | \n",
" name_y | \n",
" score_rate | \n",
" is_leveled | \n",
" exercise_id | \n",
" competence | \n",
" domain | \n",
" comment | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 2 | \n",
" 289 | \n",
" 8 | \n",
" 2 | \n",
" 2 | \n",
" ADANI | \n",
" Ismou | \n",
" | \n",
" None | \n",
" 1 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" 4 | \n",
" 289 | \n",
" 10 | \n",
" 3 | \n",
" 4 | \n",
" AHAMADI | \n",
" Asbahati | \n",
" | \n",
" None | \n",
" 1 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" 7 | \n",
" 289 | \n",
" 9 | \n",
" 3 | \n",
" 7 | \n",
" AHMED SAID | \n",
" Hadaïta | \n",
" | \n",
" None | \n",
" 1 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" 8 | \n",
" 289 | \n",
" 8 | \n",
" 2 | \n",
" 8 | \n",
" ALI MADI | \n",
" Anissa | \n",
" | \n",
" None | \n",
" 1 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
" 4 | \n",
" 9 | \n",
" 289 | \n",
" 10 | \n",
" 3 | \n",
" 9 | \n",
" ALI | \n",
" Raydel | \n",
" | \n",
" None | \n",
" 1 | \n",
" 289 | \n",
" | \n",
" 10 | \n",
" 1 | \n",
" 91 | \n",
" Com | \n",
" Présentation | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id mark value id_x name_x surname mail \\\n",
"0 2 289 8 2 2 ADANI Ismou \n",
"1 4 289 10 3 4 AHAMADI Asbahati \n",
"2 7 289 9 3 7 AHMED SAID Hadaïta \n",
"3 8 289 8 2 8 ALI MADI Anissa \n",
"4 9 289 10 3 9 ALI Raydel \n",
"\n",
" commment tribe_id id_y name_y score_rate is_leveled exercise_id \\\n",
"0 None 1 289 10 1 91 \n",
"1 None 1 289 10 1 91 \n",
"2 None 1 289 10 1 91 \n",
"3 None 1 289 10 1 91 \n",
"4 None 1 289 10 1 91 \n",
"\n",
" competence domain comment \n",
"0 Com Présentation \n",
"1 Com Présentation \n",
"2 Com Présentation \n",
"3 Com Présentation \n",
"4 Com Présentation "
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"full_df = pd.merge(dnbBlanc.sc_df, dnbBlanc.s_df, left_on=\"student_id\", right_on=\"id\")\n",
"full_df = pd.merge(full_df, dnbBlanc.q_df, left_on=\"question_id\", right_on=\"id\")\n",
"full_df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## On compile?"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from repytex.reports.eval_reports import build_target_name\n",
"from repytex.reports.produce_compile import produce_compile"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Path('.//302/report_DNB blanc 1.tex')"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"datas = {\"evaluation\": dnbBlanc}\n",
"target = build_target_name('302', 'DNB blanc 1')\n",
"target"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"template=\"tpl_reports_eval.tex\""
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"b'! Package Rep Error: Undefinded type of answer: .\\n'\n",
"b'! Package Rep Error: Undefinded type of answer: .\\n'\n",
"b'! Package Rep Error: Undefinded type of answer: .\\n'\n",
"b'! Package Rep Error: Undefinded type of answer: .\\n'\n",
"b'! Package Rep Error: Undefinded type of answer: .\\n'\n"
]
}
],
"source": [
"produce_compile(template, datas, target, force=1)"
]
},
{
"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
}