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

3539 lines
108 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"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": [
"<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>id</th>\n",
" <th>name</th>\n",
" <th>term</th>\n",
" <th>t_id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>21</td>\n",
" <td>DNB blanc1</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>id</th>\n",
" <th>name</th>\n",
" <th>grade</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>302</td>\n",
" <td>3e</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>id</th>\n",
" <th>name</th>\n",
" <th>surname</th>\n",
" <th>mail</th>\n",
" <th>commment</th>\n",
" <th>tribe_id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\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>2</td>\n",
" <td>ADANI</td>\n",
" <td>Ismou</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>AHAMADA</td>\n",
" <td>Dhoulkamal</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>AHAMADI</td>\n",
" <td>Asbahati</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\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",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>id</th>\n",
" <th>name</th>\n",
" <th>eval_id</th>\n",
" <th>date</th>\n",
" <th>comment</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>64</td>\n",
" <td>1 - QCM</td>\n",
" <td>21</td>\n",
" <td>2018-02-07 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>65</td>\n",
" <td>2 - Boite de chocolat</td>\n",
" <td>21</td>\n",
" <td>2018-02-07 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>66</td>\n",
" <td>3 - Scratch</td>\n",
" <td>21</td>\n",
" <td>2018-02-07 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>67</td>\n",
" <td>4 - Programme de calcul</td>\n",
" <td>21</td>\n",
" <td>2018-02-07 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>68</td>\n",
" <td>5 - Macaron</td>\n",
" <td>21</td>\n",
" <td>2018-02-07 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>69</td>\n",
" <td>6 - Inspecteur</td>\n",
" <td>21</td>\n",
" <td>2018-02-07 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>70</td>\n",
" <td>7 - La tache</td>\n",
" <td>21</td>\n",
" <td>2018-02-07 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>91</td>\n",
" <td>Présentation</td>\n",
" <td>21</td>\n",
" <td>2018-02-18 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>id</th>\n",
" <th>question_id</th>\n",
" <th>student_id</th>\n",
" <th>value</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>Présentation</th>\n",
" <th>Ex 1 - QCM</th>\n",
" <th>0 - QCM</th>\n",
" <th>1 - QCM</th>\n",
" <th>2 - QCM</th>\n",
" <th>3 - QCM</th>\n",
" <th>4 - QCM</th>\n",
" <th>Ex 2 - Boite de chocolat</th>\n",
" <th>0 - Calcul proba</th>\n",
" <th>1 - Modification situation</th>\n",
" <th>...</th>\n",
" <th>0 - Hypothèses</th>\n",
" <th>1 - Reconnaissance des théorèmes</th>\n",
" <th>2 - Calculs dans les théorèmes</th>\n",
" <th>3 - Réponse à la question</th>\n",
" <th>4 - Confiance au pilote</th>\n",
" <th>Ex 7 - La tache</th>\n",
" <th>0 - Décomposition du problème</th>\n",
" <th>1 - Lecture des informations</th>\n",
" <th>2 - Calculs sensé</th>\n",
" <th>3 - Clarté des explications</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Competence</th>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Cal</td>\n",
" <td>Cal</td>\n",
" <td>Cal</td>\n",
" <td>Rep</td>\n",
" <td>Cal</td>\n",
" <td>NaN</td>\n",
" <td>Rep</td>\n",
" <td>Rai</td>\n",
" <td>...</td>\n",
" <td>Cher</td>\n",
" <td>Mod</td>\n",
" <td>Cal</td>\n",
" <td>Com</td>\n",
" <td>Rai</td>\n",
" <td>NaN</td>\n",
" <td>Cher</td>\n",
" <td>Cher</td>\n",
" <td>Cal</td>\n",
" <td>Com</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Barème</th>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>10</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>15</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ismou</th>\n",
" <td>8</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>asbahati</th>\n",
" <td>10</td>\n",
" <td>6</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>10</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>13</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Hadaïta</th>\n",
" <td>9</td>\n",
" <td>6</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>7</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>11</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 35 columns</p>\n",
"</div>"
],
"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": [
"<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>Présentation</th>\n",
" <th>0 - QCM</th>\n",
" <th>1 - QCM</th>\n",
" <th>2 - QCM</th>\n",
" <th>3 - QCM</th>\n",
" <th>4 - QCM</th>\n",
" <th>0 - Calcul proba</th>\n",
" <th>1 - Modification situation</th>\n",
" <th>2 - Nouvelle composition</th>\n",
" <th>0 - Que fait le programme</th>\n",
" <th>...</th>\n",
" <th>3 - Satisfaction</th>\n",
" <th>0 - Hypothèses</th>\n",
" <th>1 - Reconnaissance des théorèmes</th>\n",
" <th>2 - Calculs dans les théorèmes</th>\n",
" <th>3 - Réponse à la question</th>\n",
" <th>4 - Confiance au pilote</th>\n",
" <th>0 - Décomposition du problème</th>\n",
" <th>1 - Lecture des informations</th>\n",
" <th>2 - Calculs sensé</th>\n",
" <th>3 - Clarté des explications</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Competence</th>\n",
" <td>NaN</td>\n",
" <td>Cal</td>\n",
" <td>Cal</td>\n",
" <td>Cal</td>\n",
" <td>Rep</td>\n",
" <td>Cal</td>\n",
" <td>Rep</td>\n",
" <td>Rai</td>\n",
" <td>Rai</td>\n",
" <td>Com</td>\n",
" <td>...</td>\n",
" <td>Com</td>\n",
" <td>Cher</td>\n",
" <td>Mod</td>\n",
" <td>Cal</td>\n",
" <td>Com</td>\n",
" <td>Rai</td>\n",
" <td>Cher</td>\n",
" <td>Cher</td>\n",
" <td>Cal</td>\n",
" <td>Com</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Barème</th>\n",
" <td>10</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ismou</th>\n",
" <td>8</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>asbahati</th>\n",
" <td>10</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Hadaïta</th>\n",
" <td>9</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 28 columns</p>\n",
"</div>"
],
"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": [
"<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>id</th>\n",
" <th>name</th>\n",
" <th>score_rate</th>\n",
" <th>is_leveled</th>\n",
" <th>exercise_id</th>\n",
" <th>competence</th>\n",
" <th>domain</th>\n",
" <th>comment</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>201</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Cal</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>224</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Cal</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>225</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Cal</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>226</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Rep</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>227</td>\n",
" <td>5</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Cal</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>202</td>\n",
" <td>1 à 3</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>65</td>\n",
" <td>Rep</td>\n",
" <td>Proba</td>\n",
" <td>Calcul proba</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>203</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>65</td>\n",
" <td>Rai</td>\n",
" <td>Proba</td>\n",
" <td>Modification situation</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>204</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>65</td>\n",
" <td>Rai</td>\n",
" <td>Proba</td>\n",
" <td>Nouvelle composition</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>205</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>66</td>\n",
" <td>Com</td>\n",
" <td>Scratch</td>\n",
" <td>Que fait le programme</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>206</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>66</td>\n",
" <td>Rai</td>\n",
" <td>Scratch</td>\n",
" <td>Réponse à 13</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>207</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>66</td>\n",
" <td>Cher</td>\n",
" <td>Scratch</td>\n",
" <td>Age pour conduire</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>208</td>\n",
" <td>1</td>\n",
" <td>5</td>\n",
" <td>1</td>\n",
" <td>67</td>\n",
" <td>Cal</td>\n",
" <td>Programme</td>\n",
" <td>Application du calcul</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>209</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>67</td>\n",
" <td>Rai</td>\n",
" <td>Programme</td>\n",
" <td>Renverser le calcul</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>210</td>\n",
" <td>3</td>\n",
" <td>6</td>\n",
" <td>1</td>\n",
" <td>67</td>\n",
" <td>Cal</td>\n",
" <td>Programme</td>\n",
" <td>Appliquer à x et developper</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>211</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>68</td>\n",
" <td>Mod</td>\n",
" <td>Proportionnel</td>\n",
" <td>Proportionnalité</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>212</td>\n",
" <td>2 et 4</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>68</td>\n",
" <td>Rep</td>\n",
" <td>Graphique</td>\n",
" <td>Lecture graphique</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>213</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>68</td>\n",
" <td>Rep</td>\n",
" <td>Graphique</td>\n",
" <td>Écart de température</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>214</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>68</td>\n",
" <td>Com</td>\n",
" <td>Graphique</td>\n",
" <td>Satisfaction</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>215</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Cher</td>\n",
" <td>Géométrie</td>\n",
" <td>Hypothèses</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>216</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Mod</td>\n",
" <td>Géométrie</td>\n",
" <td>Reconnaissance des théorèmes</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>217</td>\n",
" <td>1</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Cal</td>\n",
" <td>Géométrie</td>\n",
" <td>Calculs dans les théorèmes</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>218</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Com</td>\n",
" <td>Géométrie</td>\n",
" <td>Réponse à la question</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>219</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Rai</td>\n",
" <td>Géométrie</td>\n",
" <td>Confiance au pilote</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>220</td>\n",
" <td></td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>70</td>\n",
" <td>Cher</td>\n",
" <td>TC</td>\n",
" <td>Décomposition du problème</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>221</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>70</td>\n",
" <td>Cher</td>\n",
" <td>TC</td>\n",
" <td>Lecture des informations</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>222</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>70</td>\n",
" <td>Cal</td>\n",
" <td>TC</td>\n",
" <td>Calculs sensé</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>223</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>70</td>\n",
" <td>Com</td>\n",
" <td>TC</td>\n",
" <td>Clarté des explications</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>id</th>\n",
" <th>name</th>\n",
" <th>score_rate</th>\n",
" <th>is_leveled</th>\n",
" <th>exercise_id</th>\n",
" <th>competence</th>\n",
" <th>domain</th>\n",
" <th>comment</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>201</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Cal</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>224</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Cal</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>225</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Cal</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>226</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Rep</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>227</td>\n",
" <td>5</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>64</td>\n",
" <td>Cal</td>\n",
" <td></td>\n",
" <td>QCM</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>202</td>\n",
" <td>1 à 3</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>65</td>\n",
" <td>Rep</td>\n",
" <td>Proba</td>\n",
" <td>Calcul proba</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>203</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>65</td>\n",
" <td>Rai</td>\n",
" <td>Proba</td>\n",
" <td>Modification situation</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>204</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>65</td>\n",
" <td>Rai</td>\n",
" <td>Proba</td>\n",
" <td>Nouvelle composition</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>205</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>66</td>\n",
" <td>Com</td>\n",
" <td>Scratch</td>\n",
" <td>Que fait le programme</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>206</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>66</td>\n",
" <td>Rai</td>\n",
" <td>Scratch</td>\n",
" <td>Réponse à 13</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>207</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>66</td>\n",
" <td>Cher</td>\n",
" <td>Scratch</td>\n",
" <td>Age pour conduire</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>208</td>\n",
" <td>1</td>\n",
" <td>5</td>\n",
" <td>1</td>\n",
" <td>67</td>\n",
" <td>Cal</td>\n",
" <td>Programme</td>\n",
" <td>Application du calcul</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>209</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>67</td>\n",
" <td>Rai</td>\n",
" <td>Programme</td>\n",
" <td>Renverser le calcul</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>210</td>\n",
" <td>3</td>\n",
" <td>6</td>\n",
" <td>1</td>\n",
" <td>67</td>\n",
" <td>Cal</td>\n",
" <td>Programme</td>\n",
" <td>Appliquer à x et developper</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>211</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>68</td>\n",
" <td>Mod</td>\n",
" <td>Proportionnel</td>\n",
" <td>Proportionnalité</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>212</td>\n",
" <td>2 et 4</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>68</td>\n",
" <td>Rep</td>\n",
" <td>Graphique</td>\n",
" <td>Lecture graphique</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>213</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>68</td>\n",
" <td>Rep</td>\n",
" <td>Graphique</td>\n",
" <td>Écart de température</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>214</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>68</td>\n",
" <td>Com</td>\n",
" <td>Graphique</td>\n",
" <td>Satisfaction</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>215</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Cher</td>\n",
" <td>Géométrie</td>\n",
" <td>Hypothèses</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>216</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Mod</td>\n",
" <td>Géométrie</td>\n",
" <td>Reconnaissance des théorèmes</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>217</td>\n",
" <td>1</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Cal</td>\n",
" <td>Géométrie</td>\n",
" <td>Calculs dans les théorèmes</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>218</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Com</td>\n",
" <td>Géométrie</td>\n",
" <td>Réponse à la question</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>219</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>69</td>\n",
" <td>Rai</td>\n",
" <td>Géométrie</td>\n",
" <td>Confiance au pilote</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>220</td>\n",
" <td></td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>70</td>\n",
" <td>Cher</td>\n",
" <td>TC</td>\n",
" <td>Décomposition du problème</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>221</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>70</td>\n",
" <td>Cher</td>\n",
" <td>TC</td>\n",
" <td>Lecture des informations</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>222</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>70</td>\n",
" <td>Cal</td>\n",
" <td>TC</td>\n",
" <td>Calculs sensé</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>223</td>\n",
" <td></td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>70</td>\n",
" <td>Com</td>\n",
" <td>TC</td>\n",
" <td>Clarté des explications</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>289</th>\n",
" <th>201</th>\n",
" <th>224</th>\n",
" <th>225</th>\n",
" <th>226</th>\n",
" <th>227</th>\n",
" <th>202</th>\n",
" <th>203</th>\n",
" <th>204</th>\n",
" <th>205</th>\n",
" <th>...</th>\n",
" <th>214</th>\n",
" <th>215</th>\n",
" <th>216</th>\n",
" <th>217</th>\n",
" <th>218</th>\n",
" <th>219</th>\n",
" <th>220</th>\n",
" <th>221</th>\n",
" <th>222</th>\n",
" <th>223</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>ismou</th>\n",
" <td>8</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>asbahati</th>\n",
" <td>10</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Hadaïta</th>\n",
" <td>9</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>anissa</th>\n",
" <td>8</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>raydel</th>\n",
" <td>10</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 28 columns</p>\n",
"</div>"
],
"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": [
"<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>289</th>\n",
" <th>201</th>\n",
" <th>224</th>\n",
" <th>225</th>\n",
" <th>226</th>\n",
" <th>227</th>\n",
" <th>202</th>\n",
" <th>203</th>\n",
" <th>204</th>\n",
" <th>205</th>\n",
" <th>...</th>\n",
" <th>214</th>\n",
" <th>215</th>\n",
" <th>216</th>\n",
" <th>217</th>\n",
" <th>218</th>\n",
" <th>219</th>\n",
" <th>220</th>\n",
" <th>221</th>\n",
" <th>222</th>\n",
" <th>223</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>8</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>10</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>9</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>8</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>10</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>...</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 28 columns</p>\n",
"</div>"
],
"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": [
"<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>mark</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2</td>\n",
" <td>289</td>\n",
" <td>8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>201</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>224</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>2</td>\n",
" <td>225</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>2</td>\n",
" <td>226</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>mark</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2</td>\n",
" <td>289</td>\n",
" <td>8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>201</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2</td>\n",
" <td>224</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>2</td>\n",
" <td>225</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>2</td>\n",
" <td>226</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>mark</th>\n",
" <th>id</th>\n",
" <th>name</th>\n",
" <th>score_rate</th>\n",
" <th>is_leveled</th>\n",
" <th>exercise_id</th>\n",
" <th>competence</th>\n",
" <th>domain</th>\n",
" <th>comment</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2</td>\n",
" <td>289</td>\n",
" <td>8</td>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>4</td>\n",
" <td>289</td>\n",
" <td>10</td>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>7</td>\n",
" <td>289</td>\n",
" <td>9</td>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>8</td>\n",
" <td>289</td>\n",
" <td>8</td>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>9</td>\n",
" <td>289</td>\n",
" <td>10</td>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>mark</th>\n",
" <th>value</th>\n",
" <th>id_x</th>\n",
" <th>name_x</th>\n",
" <th>surname</th>\n",
" <th>mail</th>\n",
" <th>commment</th>\n",
" <th>tribe_id</th>\n",
" <th>...</th>\n",
" <th>is_leveled</th>\n",
" <th>exercise_id</th>\n",
" <th>competence</th>\n",
" <th>domain</th>\n",
" <th>comment_x</th>\n",
" <th>id</th>\n",
" <th>name</th>\n",
" <th>eval_id</th>\n",
" <th>date</th>\n",
" <th>comment_y</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2</td>\n",
" <td>289</td>\n",
" <td>8</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>...</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" <td>91</td>\n",
" <td>Présentation</td>\n",
" <td>21</td>\n",
" <td>2018-02-18 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>4</td>\n",
" <td>289</td>\n",
" <td>10</td>\n",
" <td>3</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>...</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" <td>91</td>\n",
" <td>Présentation</td>\n",
" <td>21</td>\n",
" <td>2018-02-18 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>7</td>\n",
" <td>289</td>\n",
" <td>9</td>\n",
" <td>3</td>\n",
" <td>7</td>\n",
" <td>AHMED SAID</td>\n",
" <td>Hadaïta</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>...</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" <td>91</td>\n",
" <td>Présentation</td>\n",
" <td>21</td>\n",
" <td>2018-02-18 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>8</td>\n",
" <td>289</td>\n",
" <td>8</td>\n",
" <td>2</td>\n",
" <td>8</td>\n",
" <td>ALI MADI</td>\n",
" <td>Anissa</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>...</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" <td>91</td>\n",
" <td>Présentation</td>\n",
" <td>21</td>\n",
" <td>2018-02-18 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>9</td>\n",
" <td>289</td>\n",
" <td>10</td>\n",
" <td>3</td>\n",
" <td>9</td>\n",
" <td>ALI</td>\n",
" <td>Raydel</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>...</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" <td>91</td>\n",
" <td>Présentation</td>\n",
" <td>21</td>\n",
" <td>2018-02-18 00:00:00.000000</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 23 columns</p>\n",
"</div>"
],
"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": [
"<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>mark</th>\n",
" <th>score_rate</th>\n",
" </tr>\n",
" <tr>\n",
" <th>surname</th>\n",
" <th>name</th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th rowspan=\"5\" valign=\"top\">Abdillah Mze Limassi</th>\n",
" <th>1 - QCM</th>\n",
" <td>8</td>\n",
" <td>10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2 - Boite de chocolat</th>\n",
" <td>8</td>\n",
" <td>10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3 - Scratch</th>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4 - Programme de calcul</th>\n",
" <td>5</td>\n",
" <td>15</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5 - Macaron</th>\n",
" <td>8</td>\n",
" <td>15</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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": [
"<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>mark</th>\n",
" <th>value</th>\n",
" <th>id_x</th>\n",
" <th>name_x</th>\n",
" <th>surname</th>\n",
" <th>mail</th>\n",
" <th>commment</th>\n",
" <th>tribe_id</th>\n",
" <th>id_y</th>\n",
" <th>name_y</th>\n",
" <th>score_rate</th>\n",
" <th>is_leveled</th>\n",
" <th>exercise_id</th>\n",
" <th>competence</th>\n",
" <th>domain</th>\n",
" <th>comment</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2</td>\n",
" <td>289</td>\n",
" <td>8</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>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>4</td>\n",
" <td>289</td>\n",
" <td>10</td>\n",
" <td>3</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>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>7</td>\n",
" <td>289</td>\n",
" <td>9</td>\n",
" <td>3</td>\n",
" <td>7</td>\n",
" <td>AHMED SAID</td>\n",
" <td>Hadaïta</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>8</td>\n",
" <td>289</td>\n",
" <td>8</td>\n",
" <td>2</td>\n",
" <td>8</td>\n",
" <td>ALI MADI</td>\n",
" <td>Anissa</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>9</td>\n",
" <td>289</td>\n",
" <td>10</td>\n",
" <td>3</td>\n",
" <td>9</td>\n",
" <td>ALI</td>\n",
" <td>Raydel</td>\n",
" <td></td>\n",
" <td>None</td>\n",
" <td>1</td>\n",
" <td>289</td>\n",
" <td></td>\n",
" <td>10</td>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>Com</td>\n",
" <td>Présentation</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"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
}