{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import xlsxwriter"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from repytex.worksheets.worksheet import pull_datas\n",
"from repytex.reports.eval import pull_datas as pull_sqlite\n",
"import pandas as pd\n",
"import numpy as np\n",
"import sqlite3"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"conn = sqlite3.connect('./recopytex.db')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# to xlxs"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'evaluation': id name term t_id\n",
" 0 1 DS1 mise en jambe 1 1,\n",
" 'exercises': id name eval_id date comment\n",
" 0 1 1 - Prendre la température 1 2017-09-05 00:00:00.000000 \n",
" 1 2 2 - Maladroite! 1 2017-09-05 00:00:00.000000 ,\n",
" 'question_scores': id question_id student_id value\n",
" 0 1 1 1 1\n",
" 1 2 2 1 2\n",
" 2 3 3 1 .\n",
" 3 4 1 2 2\n",
" 4 5 2 2 2\n",
" 5 6 3 2 1\n",
" 6 7 1 3 3\n",
" 7 8 2 3 0\n",
" 8 9 3 3 0\n",
" 9 10 1 4 3\n",
" 10 11 2 4 3\n",
" 11 12 3 4 0\n",
" 12 13 1 5 1\n",
" 13 14 2 5 2\n",
" 14 15 3 5 .\n",
" 15 16 1 6 3\n",
" 16 17 2 6 2\n",
" 17 18 3 6 0\n",
" 18 19 1 7 2\n",
" 19 20 2 7 2\n",
" 20 21 3 7 2\n",
" 21 22 1 9 2\n",
" 22 23 2 9 1\n",
" 23 24 3 9 2\n",
" 24 25 1 8 3\n",
" 25 26 2 8 1\n",
" 26 27 3 8 .\n",
" 27 28 1 10 1\n",
" 28 29 2 10 2\n",
" 29 30 3 10 0\n",
" .. ... ... ... ...\n",
" 178 803 4 21 .\n",
" 179 804 5 21 .\n",
" 180 805 6 21 .\n",
" 181 806 7 21 .\n",
" 182 807 8 21 .\n",
" 183 808 4 22 0\n",
" 184 809 5 22 .\n",
" 185 810 6 22 .\n",
" 186 811 7 22 .\n",
" 187 812 8 22 .\n",
" 188 813 4 23 3\n",
" 189 814 5 23 1\n",
" 190 815 6 23 1\n",
" 191 816 7 23 1\n",
" 192 817 8 23 1\n",
" 193 818 4 25 .\n",
" 194 819 5 25 .\n",
" 195 820 6 25 .\n",
" 196 821 7 25 .\n",
" 197 822 8 25 1\n",
" 198 823 4 24 3\n",
" 199 824 5 24 3\n",
" 200 825 6 24 3\n",
" 201 826 7 24 2\n",
" 202 827 8 24 2\n",
" 203 828 4 26 3\n",
" 204 829 5 26 3\n",
" 205 830 6 26 3\n",
" 206 831 7 26 3\n",
" 207 832 8 26 3\n",
" \n",
" [200 rows x 4 columns],\n",
" 'questions': id name score_rate is_leveled exercise_id competence domain \\\n",
" 0 1 1 0 1 1 Cher Grandeurs \n",
" 1 2 2 0 1 1 Cal Grandeurs \n",
" 2 3 2.c 0 1 1 Cal Grandeurs \n",
" 0 4 0 1 2 Cher 4opérations \n",
" 1 5 0 1 2 Cher 4opérations \n",
" 2 6 0 1 2 Rai 4opérations \n",
" 3 7 0 1 2 Cal 4opérations \n",
" 4 8 0 1 2 Com 4opérations \n",
" \n",
" comment \n",
" 0 Lecture du thermomètre \n",
" 1 Suivre programme de calculs \n",
" 2 Renverser un programme de calculs \n",
" 0 Lire le tableau et le graphique \n",
" 1 Décomposer le problème \n",
" 2 Manipuler les grandeurs \n",
" 3 Mener à bien les calculs \n",
" 4 Rédaction ,\n",
" 'students': 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\n",
" 5 6 AHAMED Fayadhi None 1\n",
" 6 7 AHMED SAID Hadaïta None 1\n",
" 7 8 ALI MADI Anissa None 1\n",
" 8 9 ALI Raydel None 1\n",
" 9 10 ATTOUMANE ALI Fatima None 1\n",
" 10 11 BACHIROU Elzame None 1\n",
" 11 12 BINALI Zalida None 1\n",
" 12 13 BOINA Abdillah Mze Limassi None 1\n",
" 13 14 BOUDRA Zaankidine None 1\n",
" 14 15 BOURA Kayssoiria None 1\n",
" 15 16 HALADI Asna None 1\n",
" 16 17 HALIDI Soibrata None 1\n",
" 17 18 HAMEDALY Doulkifly None 1\n",
" 18 19 IBRAHIM Nassur None 1\n",
" 19 20 INOUSSA Anchoura None 1\n",
" 20 21 MOHAMED Nadia None 1\n",
" 21 22 MOUHOUDHOIRE Izak None 1\n",
" 22 23 MOUSSRI Bakari None 1\n",
" 23 24 SAÏD Fatoumia None 1\n",
" 24 25 SAKOTRA Claudiana None 1\n",
" 25 26 TOUFAIL Salahou None 1\n",
" 26 76 Ibrahim Chaharzade None 1,\n",
" 'tribe': id name grade\n",
" 0 1 302 3e}"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"datas = pull_datas(1, conn)\n",
"datas"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'DS1 mise en jambe'"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"datas['evaluation'][\"name\"][0]"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"q_df = datas[\"questions\"]\n",
"q_df = q_df.assign(\n",
" Nom = q_df[[\"name\", \"comment\"]].apply(lambda x: \" \".join(x), 1)\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 7,
"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",
" Nom | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" Cher | \n",
" Grandeurs | \n",
" Lecture du thermomètre | \n",
" 1 Lecture du thermomètre | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" 2 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" Cal | \n",
" Grandeurs | \n",
" Suivre programme de calculs | \n",
" 2 Suivre programme de calculs | \n",
"
\n",
" \n",
" 2 | \n",
" 3 | \n",
" 2.c | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" Cal | \n",
" Grandeurs | \n",
" Renverser un programme de calculs | \n",
" 2.c Renverser un programme de calculs | \n",
"
\n",
" \n",
" 0 | \n",
" 4 | \n",
" | \n",
" 0 | \n",
" 1 | \n",
" 2 | \n",
" Cher | \n",
" 4opérations | \n",
" Lire le tableau et le graphique | \n",
" Lire le tableau et le graphique | \n",
"
\n",
" \n",
" 1 | \n",
" 5 | \n",
" | \n",
" 0 | \n",
" 1 | \n",
" 2 | \n",
" Cher | \n",
" 4opérations | \n",
" Décomposer le problème | \n",
" Décomposer le problème | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name score_rate is_leveled exercise_id competence domain \\\n",
"0 1 1 0 1 1 Cher Grandeurs \n",
"1 2 2 0 1 1 Cal Grandeurs \n",
"2 3 2.c 0 1 1 Cal Grandeurs \n",
"0 4 0 1 2 Cher 4opérations \n",
"1 5 0 1 2 Cher 4opérations \n",
"\n",
" comment Nom \n",
"0 Lecture du thermomètre 1 Lecture du thermomètre \n",
"1 Suivre programme de calculs 2 Suivre programme de calculs \n",
"2 Renverser un programme de calculs 2.c Renverser un programme de calculs \n",
"0 Lire le tableau et le graphique Lire le tableau et le graphique \n",
"1 Décomposer le problème Décomposer le problème "
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_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",
" 1 | \n",
" 1 - Prendre la température | \n",
" 1 | \n",
" 2017-09-05 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" 2 - Maladroite! | \n",
" 1 | \n",
" 2017-09-05 00:00:00.000000 | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name eval_id date comment\n",
"0 1 1 - Prendre la température 1 2017-09-05 00:00:00.000000 \n",
"1 2 2 - Maladroite! 1 2017-09-05 00:00:00.000000 "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"datas[\"exercises\"]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ex_q = q_df.groupby(\"exercise_id\")\\\n",
" .agg({\"score_rate\": np.sum, \"competence\": lambda x: '-'.join(list(x))}) \\\n",
" .merge(datas[\"exercises\"], left_index=True, right_on='id')\n",
"ex_q = ex_q.assign(\n",
" Nom = ex_q[\"name\"].apply(lambda x: f\"Ex {x}\"),\n",
" exercise_id = ex_q[\"id\"]\n",
")\n",
"#ex_q"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"sel_fields = ['Nom', 'competence', 'score_rate', 'exercise_id']\n",
"xls_df = pd.concat([ex_q[sel_fields], q_df[sel_fields]]).sort_values(\"exercise_id\")\n",
"#xls_df"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#writer = pd.ExcelWriter(\"./test.xlsx\", engine=\"xlsxwriter\")\n",
"#xls_df.to_excel(writer, index=False, sheet_name='DNB blanc 2')"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#workbook = writer.book\n",
"#worksheet = writer.sheets['DNB blanc 2']"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#first_line_format = workbook.add_format({\"align\": 'center', \"rotation\":90})\n",
"\n",
"#worksheet.set_column('A:D', 20)\n"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#writer.save()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## From xlsx"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" competence | \n",
" Barème | \n",
" ABDALLAH ALAOUI Taiassima | \n",
" ADANI Ismou | \n",
" AHAMADA Dhoulkamal | \n",
" AHAMADI Asbahati | \n",
" AHAMADI OUSSENI Ansufidine | \n",
" AHAMED Fayadhi | \n",
" AHMED SAID Hadaita | \n",
" ALI MADI Anissa | \n",
" ... | \n",
" MOUSSRI Bakari | \n",
" SAID Ftoumia | \n",
" ZAKOTRA Claudian | \n",
" TOUFAIL Salahou | \n",
" moyenne | \n",
" Min | \n",
" Q1 | \n",
" ME | \n",
" Q3 | \n",
" Max | \n",
"
\n",
" \n",
" \n",
" \n",
" DNB blanc 2 général | \n",
" NaN | \n",
" 112 | \n",
" 24 | \n",
" 52.0 | \n",
" 46.5 | \n",
" 65 | \n",
" 27.0 | \n",
" 25.5 | \n",
" 75 | \n",
" 72 | \n",
" ... | \n",
" 40 | \n",
" 50 | \n",
" 60 | \n",
" 58.5 | \n",
" 43.403846 | \n",
" 21 | \n",
" 27.125 | \n",
" 41.25 | \n",
" 56.875 | \n",
" 75.0 | \n",
"
\n",
" \n",
" Ex 1 - Programme de calculs | \n",
" NaN | \n",
" 15 | \n",
" 3 | \n",
" 11.0 | \n",
" 3.0 | \n",
" 0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 10 | \n",
" ... | \n",
" 2 | \n",
" 0 | \n",
" 7 | \n",
" 2.0 | \n",
" 4.019231 | \n",
" 0 | \n",
" 1.250 | \n",
" 3.00 | \n",
" 6.875 | \n",
" 11.0 | \n",
"
\n",
" \n",
" 1 et 2 Suivre le programme | \n",
" Cal | \n",
" 6 | \n",
" 3 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2 | \n",
" 6 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 1.0 | \n",
" 2.692308 | \n",
" 0 | \n",
" 0.250 | \n",
" 2.00 | \n",
" 5.750 | \n",
" 6.0 | \n",
"
\n",
" \n",
" 3 Renverser le programme | \n",
" Rai | \n",
" 3 | \n",
" 0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0.0 | \n",
" 0.596154 | \n",
" 0 | \n",
" 0.000 | \n",
" 0.00 | \n",
" 1.125 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 4 Toujours la même chose | \n",
" Rai | \n",
" 3 | \n",
" 0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 3 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.192308 | \n",
" 0 | \n",
" 0.000 | \n",
" 0.00 | \n",
" 0.000 | \n",
" 3.0 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 35 columns
\n",
"
"
],
"text/plain": [
" competence Barème ABDALLAH ALAOUI Taiassima \\\n",
"DNB blanc 2 général NaN 112 24 \n",
"Ex 1 - Programme de calculs NaN 15 3 \n",
"1 et 2 Suivre le programme Cal 6 3 \n",
"3 Renverser le programme Rai 3 0 \n",
"4 Toujours la même chose Rai 3 0 \n",
"\n",
" ADANI Ismou AHAMADA Dhoulkamal \\\n",
"DNB blanc 2 général 52.0 46.5 \n",
"Ex 1 - Programme de calculs 11.0 3.0 \n",
"1 et 2 Suivre le programme 6.0 2.0 \n",
"3 Renverser le programme 3.0 0.0 \n",
"4 Toujours la même chose 2.0 0.0 \n",
"\n",
" AHAMADI Asbahati AHAMADI OUSSENI Ansufidine \\\n",
"DNB blanc 2 général 65 27.0 \n",
"Ex 1 - Programme de calculs 0 1.0 \n",
"1 et 2 Suivre le programme 0 0.0 \n",
"3 Renverser le programme 0 0.0 \n",
"4 Toujours la même chose 0 0.0 \n",
"\n",
" AHAMED Fayadhi AHMED SAID Hadaita \\\n",
"DNB blanc 2 général 25.5 75 \n",
"Ex 1 - Programme de calculs 0.0 3 \n",
"1 et 2 Suivre le programme 0.0 2 \n",
"3 Renverser le programme 0.0 0 \n",
"4 Toujours la même chose 0.0 0 \n",
"\n",
" ALI MADI Anissa ... MOUSSRI Bakari \\\n",
"DNB blanc 2 général 72 ... 40 \n",
"Ex 1 - Programme de calculs 10 ... 2 \n",
"1 et 2 Suivre le programme 6 ... 0 \n",
"3 Renverser le programme 0 ... 0 \n",
"4 Toujours la même chose 3 ... 0 \n",
"\n",
" SAID Ftoumia ZAKOTRA Claudian TOUFAIL Salahou \\\n",
"DNB blanc 2 général 50 60 58.5 \n",
"Ex 1 - Programme de calculs 0 7 2.0 \n",
"1 et 2 Suivre le programme 0 2 1.0 \n",
"3 Renverser le programme 0 2 0.0 \n",
"4 Toujours la même chose 0 0 0.0 \n",
"\n",
" moyenne Min Q1 ME Q3 Max \n",
"DNB blanc 2 général 43.403846 21 27.125 41.25 56.875 75.0 \n",
"Ex 1 - Programme de calculs 4.019231 0 1.250 3.00 6.875 11.0 \n",
"1 et 2 Suivre le programme 2.692308 0 0.250 2.00 5.750 6.0 \n",
"3 Renverser le programme 0.596154 0 0.000 0.00 1.125 3.0 \n",
"4 Toujours la même chose 0.192308 0 0.000 0.00 0.000 3.0 \n",
"\n",
"[5 rows x 35 columns]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.read_excel(\"./DNB_blanc2/DNB2_302.xlsx\")\n",
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"On enlève les colonnes inutiles et on format les prénoms"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import unicodedata\n",
"def normalize_str(s):\n",
" return unicodedata.normalize('NFD', s).encode('ascii', 'ignore').lower()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" b'abdallah alaoui taiassima' | \n",
" b'adani ismou' | \n",
" b'ahamada dhoulkamal' | \n",
" b'ahamadi asbahati' | \n",
" b'ahamadi ousseni ansufidine' | \n",
" b'ahamed fayadhi' | \n",
" b'ahmed said hadaita' | \n",
" b'ali madi anissa' | \n",
" b'ali raydel' | \n",
" b'attoumane ali fatima' | \n",
" ... | \n",
" b'hamedaly doulkifly' | \n",
" b'ibrahim chaharzade' | \n",
" b'ibrahim nassur' | \n",
" b'inoussa anchoura' | \n",
" b'mohamed nadia' | \n",
" b'mouhoudhoire izak' | \n",
" b'moussri bakari' | \n",
" b'said ftoumia' | \n",
" b'zakotra claudian' | \n",
" b'toufail salahou' | \n",
"
\n",
" \n",
" \n",
" \n",
" DNB blanc 2 général | \n",
" 24 | \n",
" 52.0 | \n",
" 46.5 | \n",
" 65 | \n",
" 27.0 | \n",
" 25.5 | \n",
" 75 | \n",
" 72 | \n",
" 45.5 | \n",
" 26.0 | \n",
" ... | \n",
" 23.5 | \n",
" 49.0 | \n",
" 42.5 | \n",
" NaN | \n",
" 27.5 | \n",
" 37 | \n",
" 40 | \n",
" 50 | \n",
" 60 | \n",
" 58.5 | \n",
"
\n",
" \n",
" Ex 1 - Programme de calculs | \n",
" 3 | \n",
" 11.0 | \n",
" 3.0 | \n",
" 0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 10 | \n",
" 9.0 | \n",
" 6.5 | \n",
" ... | \n",
" 2.0 | \n",
" 4.5 | \n",
" 7.5 | \n",
" NaN | \n",
" 2.5 | \n",
" 5 | \n",
" 2 | \n",
" 0 | \n",
" 7 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 1 et 2 Suivre le programme | \n",
" 3 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2 | \n",
" 6 | \n",
" 6.0 | \n",
" 5.0 | \n",
" ... | \n",
" 2.0 | \n",
" 3.0 | \n",
" 6.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 3 Renverser le programme | \n",
" 0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3.0 | \n",
" 1.5 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.5 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 4 Toujours la même chose | \n",
" 0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 27 columns
\n",
"
"
],
"text/plain": [
" b'abdallah alaoui taiassima' b'adani ismou' \\\n",
"DNB blanc 2 général 24 52.0 \n",
"Ex 1 - Programme de calculs 3 11.0 \n",
"1 et 2 Suivre le programme 3 6.0 \n",
"3 Renverser le programme 0 3.0 \n",
"4 Toujours la même chose 0 2.0 \n",
"\n",
" b'ahamada dhoulkamal' b'ahamadi asbahati' \\\n",
"DNB blanc 2 général 46.5 65 \n",
"Ex 1 - Programme de calculs 3.0 0 \n",
"1 et 2 Suivre le programme 2.0 0 \n",
"3 Renverser le programme 0.0 0 \n",
"4 Toujours la même chose 0.0 0 \n",
"\n",
" b'ahamadi ousseni ansufidine' b'ahamed fayadhi' \\\n",
"DNB blanc 2 général 27.0 25.5 \n",
"Ex 1 - Programme de calculs 1.0 0.0 \n",
"1 et 2 Suivre le programme 0.0 0.0 \n",
"3 Renverser le programme 0.0 0.0 \n",
"4 Toujours la même chose 0.0 0.0 \n",
"\n",
" b'ahmed said hadaita' b'ali madi anissa' \\\n",
"DNB blanc 2 général 75 72 \n",
"Ex 1 - Programme de calculs 3 10 \n",
"1 et 2 Suivre le programme 2 6 \n",
"3 Renverser le programme 0 0 \n",
"4 Toujours la même chose 0 3 \n",
"\n",
" b'ali raydel' b'attoumane ali fatima' \\\n",
"DNB blanc 2 général 45.5 26.0 \n",
"Ex 1 - Programme de calculs 9.0 6.5 \n",
"1 et 2 Suivre le programme 6.0 5.0 \n",
"3 Renverser le programme 3.0 1.5 \n",
"4 Toujours la même chose 0.0 0.0 \n",
"\n",
" ... b'hamedaly doulkifly' \\\n",
"DNB blanc 2 général ... 23.5 \n",
"Ex 1 - Programme de calculs ... 2.0 \n",
"1 et 2 Suivre le programme ... 2.0 \n",
"3 Renverser le programme ... 0.0 \n",
"4 Toujours la même chose ... 0.0 \n",
"\n",
" b'ibrahim chaharzade' b'ibrahim nassur' \\\n",
"DNB blanc 2 général 49.0 42.5 \n",
"Ex 1 - Programme de calculs 4.5 7.5 \n",
"1 et 2 Suivre le programme 3.0 6.0 \n",
"3 Renverser le programme 0.0 1.5 \n",
"4 Toujours la même chose 0.0 0.0 \n",
"\n",
" b'inoussa anchoura' b'mohamed nadia' \\\n",
"DNB blanc 2 général NaN 27.5 \n",
"Ex 1 - Programme de calculs NaN 2.5 \n",
"1 et 2 Suivre le programme NaN 1.0 \n",
"3 Renverser le programme NaN 0.0 \n",
"4 Toujours la même chose NaN 0.0 \n",
"\n",
" b'mouhoudhoire izak' b'moussri bakari' \\\n",
"DNB blanc 2 général 37 40 \n",
"Ex 1 - Programme de calculs 5 2 \n",
"1 et 2 Suivre le programme 4 0 \n",
"3 Renverser le programme 0 0 \n",
"4 Toujours la même chose 0 0 \n",
"\n",
" b'said ftoumia' b'zakotra claudian' \\\n",
"DNB blanc 2 général 50 60 \n",
"Ex 1 - Programme de calculs 0 7 \n",
"1 et 2 Suivre le programme 0 2 \n",
"3 Renverser le programme 0 2 \n",
"4 Toujours la même chose 0 0 \n",
"\n",
" b'toufail salahou' \n",
"DNB blanc 2 général 58.5 \n",
"Ex 1 - Programme de calculs 2.0 \n",
"1 et 2 Suivre le programme 1.0 \n",
"3 Renverser le programme 0.0 \n",
"4 Toujours la même chose 0.0 \n",
"\n",
"[5 rows x 27 columns]"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = df.drop(['competence', 'Barème','moyenne',\n",
" 'Min', 'Q1', 'ME', 'Q3', 'Max'], 1)\n",
"df.columns = [normalize_str(i) for i in df.columns]\n",
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"On enlèves les lignes calculées par excel pour ne garder que les données"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" b'abdallah alaoui taiassima' | \n",
" b'adani ismou' | \n",
" b'ahamada dhoulkamal' | \n",
" b'ahamadi asbahati' | \n",
" b'ahamadi ousseni ansufidine' | \n",
" b'ahamed fayadhi' | \n",
" b'ahmed said hadaita' | \n",
" b'ali madi anissa' | \n",
" b'ali raydel' | \n",
" b'attoumane ali fatima' | \n",
" ... | \n",
" b'hamedaly doulkifly' | \n",
" b'ibrahim chaharzade' | \n",
" b'ibrahim nassur' | \n",
" b'inoussa anchoura' | \n",
" b'mohamed nadia' | \n",
" b'mouhoudhoire izak' | \n",
" b'moussri bakari' | \n",
" b'said ftoumia' | \n",
" b'zakotra claudian' | \n",
" b'toufail salahou' | \n",
"
\n",
" \n",
" \n",
" \n",
" 1 et 2 Suivre le programme | \n",
" 3 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2 | \n",
" 6 | \n",
" 6.0 | \n",
" 5.0 | \n",
" ... | \n",
" 2.0 | \n",
" 3.0 | \n",
" 6.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 3 Renverser le programme | \n",
" 0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3.0 | \n",
" 1.5 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.5 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 4 Toujours la même chose | \n",
" 0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 4 Développer F | \n",
" 0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1 | \n",
" 1 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 1.5 | \n",
" 0.0 | \n",
" NaN | \n",
" 1.5 | \n",
" 1 | \n",
" 2 | \n",
" 0 | \n",
" 3 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 1 Fraction réponse | \n",
" 4 | \n",
" 4.0 | \n",
" 4.0 | \n",
" 4 | \n",
" 3.0 | \n",
" 4.0 | \n",
" 4 | \n",
" 4 | \n",
" 4.0 | \n",
" 4.0 | \n",
" ... | \n",
" 3.0 | \n",
" 4.0 | \n",
" 4.0 | \n",
" NaN | \n",
" 4.0 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
" 4.0 | \n",
"
\n",
" \n",
" 1 Notation et vocabulaire | \n",
" 6 | \n",
" 0.0 | \n",
" 6.0 | \n",
" 8 | \n",
" 3.0 | \n",
" 6.0 | \n",
" 8 | \n",
" 8 | \n",
" 0.0 | \n",
" 2.0 | \n",
" ... | \n",
" 6.0 | \n",
" 6.0 | \n",
" 1.0 | \n",
" NaN | \n",
" 2.0 | \n",
" 6 | \n",
" 5 | \n",
" 6 | \n",
" 8 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 2 Arbre de probabilité | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 1 et 2 Raisonnement pour choisir | \n",
" 2 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 5 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 5 | \n",
" 5 | \n",
" 4.0 | \n",
" 3.0 | \n",
" ... | \n",
" 2.5 | \n",
" 2.0 | \n",
" 2.0 | \n",
" NaN | \n",
" 4.0 | \n",
" 2 | \n",
" 4 | \n",
" 1 | \n",
" 3 | \n",
" 5.0 | \n",
"
\n",
" \n",
" 1 et 2 Décomposer le problème | \n",
" 2 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 5 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 5 | \n",
" 5 | \n",
" 2.5 | \n",
" 2.5 | \n",
" ... | \n",
" 2.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" NaN | \n",
" 3.0 | \n",
" 1 | \n",
" 4 | \n",
" 1 | \n",
" 3 | \n",
" 5.0 | \n",
"
\n",
" \n",
" 1 et 2 Choix des opérations et calculs | \n",
" 0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 4 | \n",
" 1 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 3 Composition des réductions | \n",
" 0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 1 Logique de la réponse | \n",
" 0 | \n",
" 3.0 | \n",
" 3.0 | \n",
" 3 | \n",
" 1.5 | \n",
" 0.5 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 1 Calculs des indicateurs | \n",
" 0 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 3 | \n",
" 1.5 | \n",
" 0.5 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 1.5 | \n",
"
\n",
" \n",
" 1 Clarté des explications | \n",
" 0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 3 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 2 Calculs | \n",
" 0 | \n",
" 1.5 | \n",
" 0.0 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 2 Validité des réponses | \n",
" 0 | \n",
" 1.5 | \n",
" 1.5 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 2 Tests des possibilités | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 2 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" Reconnaitre les théorèmes | \n",
" 2 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 3 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 6 | \n",
" 4 | \n",
" 6.0 | \n",
" 0.0 | \n",
" ... | \n",
" 1.0 | \n",
" 6.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 3.0 | \n",
" 6 | \n",
" 3 | \n",
" 5 | \n",
" 6 | \n",
" 6.0 | \n",
"
\n",
" \n",
" Validité des calculs | \n",
" 0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 3 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 6 | \n",
" 3 | \n",
" 6.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 4.0 | \n",
" 2.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 3 | \n",
" 4 | \n",
" 6 | \n",
" 4 | \n",
" 5.0 | \n",
"
\n",
" \n",
" Suivi du raisonnement géométrique | \n",
" 0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 3 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 5 | \n",
" 3 | \n",
" 4.0 | \n",
" 1.0 | \n",
" ... | \n",
" 0.0 | \n",
" 4.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 4 | \n",
" 3 | \n",
" 6 | \n",
" 4 | \n",
" 5.0 | \n",
"
\n",
" \n",
" 1 Quantité de sucre | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 0.0 | \n",
" 1.5 | \n",
" 0 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 3 | \n",
" 0 | \n",
" 3 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 2 Calcul du volume | \n",
" 0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 1.5 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 2 Nombre de pots | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 3 Dessin de l'étiquette | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 3 Mise à l'echelle | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 3 Longueur de l'étiquette | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
"
\n",
"
26 rows × 27 columns
\n",
"
"
],
"text/plain": [
" b'abdallah alaoui taiassima' \\\n",
"1 et 2 Suivre le programme 3 \n",
"3 Renverser le programme 0 \n",
"4 Toujours la même chose 0 \n",
"4 Développer F 0 \n",
"1 Fraction réponse 4 \n",
"1 Notation et vocabulaire 6 \n",
"2 Arbre de probabilité 0 \n",
"1 et 2 Raisonnement pour choisir 2 \n",
"1 et 2 Décomposer le problème 2 \n",
"1 et 2 Choix des opérations et calculs 0 \n",
"3 Composition des réductions 0 \n",
"1 Logique de la réponse 0 \n",
"1 Calculs des indicateurs 0 \n",
"1 Clarté des explications 0 \n",
"2 Calculs 0 \n",
"2 Validité des réponses 0 \n",
"2 Tests des possibilités 0 \n",
" Reconnaitre les théorèmes 2 \n",
" Validité des calculs 0 \n",
" Suivi du raisonnement géométrique 0 \n",
"1 Quantité de sucre 0 \n",
"2 Calcul du volume 0 \n",
"2 Nombre de pots 0 \n",
"3 Dessin de l'étiquette 0 \n",
"3 Mise à l'echelle 0 \n",
"3 Longueur de l'étiquette 0 \n",
"\n",
" b'adani ismou' b'ahamada dhoulkamal' \\\n",
"1 et 2 Suivre le programme 6.0 2.0 \n",
"3 Renverser le programme 3.0 0.0 \n",
"4 Toujours la même chose 2.0 0.0 \n",
"4 Développer F 0.0 1.0 \n",
"1 Fraction réponse 4.0 4.0 \n",
"1 Notation et vocabulaire 0.0 6.0 \n",
"2 Arbre de probabilité 0.0 0.0 \n",
"1 et 2 Raisonnement pour choisir 1.0 3.0 \n",
"1 et 2 Décomposer le problème 2.0 3.0 \n",
"1 et 2 Choix des opérations et calculs 1.0 0.0 \n",
"3 Composition des réductions 0.0 1.0 \n",
"1 Logique de la réponse 3.0 3.0 \n",
"1 Calculs des indicateurs 2.0 3.0 \n",
"1 Clarté des explications 1.0 3.0 \n",
"2 Calculs 1.5 0.0 \n",
"2 Validité des réponses 1.5 1.5 \n",
"2 Tests des possibilités 0.0 0.0 \n",
" Reconnaitre les théorèmes 2.0 4.0 \n",
" Validité des calculs 0.0 3.0 \n",
" Suivi du raisonnement géométrique 0.0 1.0 \n",
"1 Quantité de sucre 0.0 0.0 \n",
"2 Calcul du volume 0.0 1.0 \n",
"2 Nombre de pots 0.0 0.0 \n",
"3 Dessin de l'étiquette 0.0 0.0 \n",
"3 Mise à l'echelle 0.0 0.0 \n",
"3 Longueur de l'étiquette 0.0 0.0 \n",
"\n",
" b'ahamadi asbahati' \\\n",
"1 et 2 Suivre le programme 0 \n",
"3 Renverser le programme 0 \n",
"4 Toujours la même chose 0 \n",
"4 Développer F 0 \n",
"1 Fraction réponse 4 \n",
"1 Notation et vocabulaire 8 \n",
"2 Arbre de probabilité 0 \n",
"1 et 2 Raisonnement pour choisir 5 \n",
"1 et 2 Décomposer le problème 5 \n",
"1 et 2 Choix des opérations et calculs 2 \n",
"3 Composition des réductions 1 \n",
"1 Logique de la réponse 3 \n",
"1 Calculs des indicateurs 3 \n",
"1 Clarté des explications 3 \n",
"2 Calculs 3 \n",
"2 Validité des réponses 3 \n",
"2 Tests des possibilités 3 \n",
" Reconnaitre les théorèmes 3 \n",
" Validité des calculs 3 \n",
" Suivi du raisonnement géométrique 3 \n",
"1 Quantité de sucre 3 \n",
"2 Calcul du volume 0 \n",
"2 Nombre de pots 0 \n",
"3 Dessin de l'étiquette 0 \n",
"3 Mise à l'echelle 0 \n",
"3 Longueur de l'étiquette 0 \n",
"\n",
" b'ahamadi ousseni ansufidine' \\\n",
"1 et 2 Suivre le programme 0.0 \n",
"3 Renverser le programme 0.0 \n",
"4 Toujours la même chose 0.0 \n",
"4 Développer F 1.0 \n",
"1 Fraction réponse 3.0 \n",
"1 Notation et vocabulaire 3.0 \n",
"2 Arbre de probabilité 0.0 \n",
"1 et 2 Raisonnement pour choisir 2.0 \n",
"1 et 2 Décomposer le problème 1.0 \n",
"1 et 2 Choix des opérations et calculs 0.0 \n",
"3 Composition des réductions 0.0 \n",
"1 Logique de la réponse 1.5 \n",
"1 Calculs des indicateurs 1.5 \n",
"1 Clarté des explications 1.0 \n",
"2 Calculs 0.0 \n",
"2 Validité des réponses 0.0 \n",
"2 Tests des possibilités 0.0 \n",
" Reconnaitre les théorèmes 5.0 \n",
" Validité des calculs 0.0 \n",
" Suivi du raisonnement géométrique 1.0 \n",
"1 Quantité de sucre 0.0 \n",
"2 Calcul du volume 0.0 \n",
"2 Nombre de pots 0.0 \n",
"3 Dessin de l'étiquette 0.0 \n",
"3 Mise à l'echelle 0.0 \n",
"3 Longueur de l'étiquette 0.0 \n",
"\n",
" b'ahamed fayadhi' \\\n",
"1 et 2 Suivre le programme 0.0 \n",
"3 Renverser le programme 0.0 \n",
"4 Toujours la même chose 0.0 \n",
"4 Développer F 0.0 \n",
"1 Fraction réponse 4.0 \n",
"1 Notation et vocabulaire 6.0 \n",
"2 Arbre de probabilité 0.0 \n",
"1 et 2 Raisonnement pour choisir 1.0 \n",
"1 et 2 Décomposer le problème 1.0 \n",
"1 et 2 Choix des opérations et calculs 0.0 \n",
"3 Composition des réductions 0.0 \n",
"1 Logique de la réponse 0.5 \n",
"1 Calculs des indicateurs 0.5 \n",
"1 Clarté des explications 0.0 \n",
"2 Calculs 0.0 \n",
"2 Validité des réponses 0.0 \n",
"2 Tests des possibilités 0.0 \n",
" Reconnaitre les théorèmes 2.0 \n",
" Validité des calculs 1.0 \n",
" Suivi du raisonnement géométrique 1.0 \n",
"1 Quantité de sucre 1.5 \n",
"2 Calcul du volume 0.0 \n",
"2 Nombre de pots 0.0 \n",
"3 Dessin de l'étiquette 0.0 \n",
"3 Mise à l'echelle 0.0 \n",
"3 Longueur de l'étiquette 0.0 \n",
"\n",
" b'ahmed said hadaita' \\\n",
"1 et 2 Suivre le programme 2 \n",
"3 Renverser le programme 0 \n",
"4 Toujours la même chose 0 \n",
"4 Développer F 1 \n",
"1 Fraction réponse 4 \n",
"1 Notation et vocabulaire 8 \n",
"2 Arbre de probabilité 0 \n",
"1 et 2 Raisonnement pour choisir 5 \n",
"1 et 2 Décomposer le problème 5 \n",
"1 et 2 Choix des opérations et calculs 4 \n",
"3 Composition des réductions 2 \n",
"1 Logique de la réponse 3 \n",
"1 Calculs des indicateurs 3 \n",
"1 Clarté des explications 3 \n",
"2 Calculs 3 \n",
"2 Validité des réponses 3 \n",
"2 Tests des possibilités 3 \n",
" Reconnaitre les théorèmes 6 \n",
" Validité des calculs 6 \n",
" Suivi du raisonnement géométrique 5 \n",
"1 Quantité de sucre 0 \n",
"2 Calcul du volume 0 \n",
"2 Nombre de pots 0 \n",
"3 Dessin de l'étiquette 0 \n",
"3 Mise à l'echelle 0 \n",
"3 Longueur de l'étiquette 0 \n",
"\n",
" b'ali madi anissa' b'ali raydel' \\\n",
"1 et 2 Suivre le programme 6 6.0 \n",
"3 Renverser le programme 0 3.0 \n",
"4 Toujours la même chose 3 0.0 \n",
"4 Développer F 1 0.0 \n",
"1 Fraction réponse 4 4.0 \n",
"1 Notation et vocabulaire 8 0.0 \n",
"2 Arbre de probabilité 0 0.0 \n",
"1 et 2 Raisonnement pour choisir 5 4.0 \n",
"1 et 2 Décomposer le problème 5 2.5 \n",
"1 et 2 Choix des opérations et calculs 1 0.0 \n",
"3 Composition des réductions 0 0.0 \n",
"1 Logique de la réponse 3 0.0 \n",
"1 Calculs des indicateurs 3 0.0 \n",
"1 Clarté des explications 3 0.0 \n",
"2 Calculs 3 0.0 \n",
"2 Validité des réponses 3 0.0 \n",
"2 Tests des possibilités 2 0.0 \n",
" Reconnaitre les théorèmes 4 6.0 \n",
" Validité des calculs 3 6.0 \n",
" Suivi du raisonnement géométrique 3 4.0 \n",
"1 Quantité de sucre 3 0.0 \n",
"2 Calcul du volume 0 0.0 \n",
"2 Nombre de pots 0 0.0 \n",
"3 Dessin de l'étiquette 0 0.0 \n",
"3 Mise à l'echelle 0 0.0 \n",
"3 Longueur de l'étiquette 0 0.0 \n",
"\n",
" b'attoumane ali fatima' \\\n",
"1 et 2 Suivre le programme 5.0 \n",
"3 Renverser le programme 1.5 \n",
"4 Toujours la même chose 0.0 \n",
"4 Développer F 0.0 \n",
"1 Fraction réponse 4.0 \n",
"1 Notation et vocabulaire 2.0 \n",
"2 Arbre de probabilité 0.0 \n",
"1 et 2 Raisonnement pour choisir 3.0 \n",
"1 et 2 Décomposer le problème 2.5 \n",
"1 et 2 Choix des opérations et calculs 0.0 \n",
"3 Composition des réductions 0.0 \n",
"1 Logique de la réponse 0.0 \n",
"1 Calculs des indicateurs 0.0 \n",
"1 Clarté des explications 0.0 \n",
"2 Calculs 0.0 \n",
"2 Validité des réponses 0.0 \n",
"2 Tests des possibilités 0.0 \n",
" Reconnaitre les théorèmes 0.0 \n",
" Validité des calculs 0.0 \n",
" Suivi du raisonnement géométrique 1.0 \n",
"1 Quantité de sucre 0.0 \n",
"2 Calcul du volume 0.0 \n",
"2 Nombre de pots 0.0 \n",
"3 Dessin de l'étiquette 0.0 \n",
"3 Mise à l'echelle 0.0 \n",
"3 Longueur de l'étiquette 0.0 \n",
"\n",
" ... \\\n",
"1 et 2 Suivre le programme ... \n",
"3 Renverser le programme ... \n",
"4 Toujours la même chose ... \n",
"4 Développer F ... \n",
"1 Fraction réponse ... \n",
"1 Notation et vocabulaire ... \n",
"2 Arbre de probabilité ... \n",
"1 et 2 Raisonnement pour choisir ... \n",
"1 et 2 Décomposer le problème ... \n",
"1 et 2 Choix des opérations et calculs ... \n",
"3 Composition des réductions ... \n",
"1 Logique de la réponse ... \n",
"1 Calculs des indicateurs ... \n",
"1 Clarté des explications ... \n",
"2 Calculs ... \n",
"2 Validité des réponses ... \n",
"2 Tests des possibilités ... \n",
" Reconnaitre les théorèmes ... \n",
" Validité des calculs ... \n",
" Suivi du raisonnement géométrique ... \n",
"1 Quantité de sucre ... \n",
"2 Calcul du volume ... \n",
"2 Nombre de pots ... \n",
"3 Dessin de l'étiquette ... \n",
"3 Mise à l'echelle ... \n",
"3 Longueur de l'étiquette ... \n",
"\n",
" b'hamedaly doulkifly' \\\n",
"1 et 2 Suivre le programme 2.0 \n",
"3 Renverser le programme 0.0 \n",
"4 Toujours la même chose 0.0 \n",
"4 Développer F 0.0 \n",
"1 Fraction réponse 3.0 \n",
"1 Notation et vocabulaire 6.0 \n",
"2 Arbre de probabilité 0.0 \n",
"1 et 2 Raisonnement pour choisir 2.5 \n",
"1 et 2 Décomposer le problème 2.0 \n",
"1 et 2 Choix des opérations et calculs 0.0 \n",
"3 Composition des réductions 0.0 \n",
"1 Logique de la réponse 0.0 \n",
"1 Calculs des indicateurs 0.0 \n",
"1 Clarté des explications 0.0 \n",
"2 Calculs 0.0 \n",
"2 Validité des réponses 0.0 \n",
"2 Tests des possibilités 0.0 \n",
" Reconnaitre les théorèmes 1.0 \n",
" Validité des calculs 0.0 \n",
" Suivi du raisonnement géométrique 0.0 \n",
"1 Quantité de sucre 0.0 \n",
"2 Calcul du volume 0.0 \n",
"2 Nombre de pots 0.0 \n",
"3 Dessin de l'étiquette 0.0 \n",
"3 Mise à l'echelle 0.0 \n",
"3 Longueur de l'étiquette 0.0 \n",
"\n",
" b'ibrahim chaharzade' \\\n",
"1 et 2 Suivre le programme 3.0 \n",
"3 Renverser le programme 0.0 \n",
"4 Toujours la même chose 0.0 \n",
"4 Développer F 1.5 \n",
"1 Fraction réponse 4.0 \n",
"1 Notation et vocabulaire 6.0 \n",
"2 Arbre de probabilité 0.0 \n",
"1 et 2 Raisonnement pour choisir 2.0 \n",
"1 et 2 Décomposer le problème 2.0 \n",
"1 et 2 Choix des opérations et calculs 0.0 \n",
"3 Composition des réductions 0.0 \n",
"1 Logique de la réponse 1.0 \n",
"1 Calculs des indicateurs 1.0 \n",
"1 Clarté des explications 0.0 \n",
"2 Calculs 1.0 \n",
"2 Validité des réponses 3.0 \n",
"2 Tests des possibilités 0.0 \n",
" Reconnaitre les théorèmes 6.0 \n",
" Validité des calculs 4.0 \n",
" Suivi du raisonnement géométrique 4.0 \n",
"1 Quantité de sucre 0.0 \n",
"2 Calcul du volume 1.5 \n",
"2 Nombre de pots 0.0 \n",
"3 Dessin de l'étiquette 0.0 \n",
"3 Mise à l'echelle 0.0 \n",
"3 Longueur de l'étiquette 0.0 \n",
"\n",
" b'ibrahim nassur' \\\n",
"1 et 2 Suivre le programme 6.0 \n",
"3 Renverser le programme 1.5 \n",
"4 Toujours la même chose 0.0 \n",
"4 Développer F 0.0 \n",
"1 Fraction réponse 4.0 \n",
"1 Notation et vocabulaire 1.0 \n",
"2 Arbre de probabilité 0.0 \n",
"1 et 2 Raisonnement pour choisir 2.0 \n",
"1 et 2 Décomposer le problème 2.0 \n",
"1 et 2 Choix des opérations et calculs 0.0 \n",
"3 Composition des réductions 1.0 \n",
"1 Logique de la réponse 3.0 \n",
"1 Calculs des indicateurs 3.0 \n",
"1 Clarté des explications 3.0 \n",
"2 Calculs 0.0 \n",
"2 Validité des réponses 0.0 \n",
"2 Tests des possibilités 0.0 \n",
" Reconnaitre les théorèmes 3.0 \n",
" Validité des calculs 2.0 \n",
" Suivi du raisonnement géométrique 0.0 \n",
"1 Quantité de sucre 3.0 \n",
"2 Calcul du volume 0.0 \n",
"2 Nombre de pots 0.0 \n",
"3 Dessin de l'étiquette 0.0 \n",
"3 Mise à l'echelle 0.0 \n",
"3 Longueur de l'étiquette 0.0 \n",
"\n",
" b'inoussa anchoura' b'mohamed nadia' \\\n",
"1 et 2 Suivre le programme NaN 1.0 \n",
"3 Renverser le programme NaN 0.0 \n",
"4 Toujours la même chose NaN 0.0 \n",
"4 Développer F NaN 1.5 \n",
"1 Fraction réponse NaN 4.0 \n",
"1 Notation et vocabulaire NaN 2.0 \n",
"2 Arbre de probabilité NaN 0.0 \n",
"1 et 2 Raisonnement pour choisir NaN 4.0 \n",
"1 et 2 Décomposer le problème NaN 3.0 \n",
"1 et 2 Choix des opérations et calculs NaN 1.0 \n",
"3 Composition des réductions NaN 0.0 \n",
"1 Logique de la réponse NaN 0.0 \n",
"1 Calculs des indicateurs NaN 1.0 \n",
"1 Clarté des explications NaN 0.0 \n",
"2 Calculs NaN 0.0 \n",
"2 Validité des réponses NaN 0.0 \n",
"2 Tests des possibilités NaN 0.0 \n",
" Reconnaitre les théorèmes NaN 3.0 \n",
" Validité des calculs NaN 0.0 \n",
" Suivi du raisonnement géométrique NaN 1.0 \n",
"1 Quantité de sucre NaN 0.0 \n",
"2 Calcul du volume NaN 0.0 \n",
"2 Nombre de pots NaN 0.0 \n",
"3 Dessin de l'étiquette NaN 0.0 \n",
"3 Mise à l'echelle NaN 0.0 \n",
"3 Longueur de l'étiquette NaN 0.0 \n",
"\n",
" b'mouhoudhoire izak' \\\n",
"1 et 2 Suivre le programme 4 \n",
"3 Renverser le programme 0 \n",
"4 Toujours la même chose 0 \n",
"4 Développer F 1 \n",
"1 Fraction réponse 4 \n",
"1 Notation et vocabulaire 6 \n",
"2 Arbre de probabilité 0 \n",
"1 et 2 Raisonnement pour choisir 2 \n",
"1 et 2 Décomposer le problème 1 \n",
"1 et 2 Choix des opérations et calculs 0 \n",
"3 Composition des réductions 0 \n",
"1 Logique de la réponse 0 \n",
"1 Calculs des indicateurs 0 \n",
"1 Clarté des explications 0 \n",
"2 Calculs 0 \n",
"2 Validité des réponses 0 \n",
"2 Tests des possibilités 0 \n",
" Reconnaitre les théorèmes 6 \n",
" Validité des calculs 3 \n",
" Suivi du raisonnement géométrique 4 \n",
"1 Quantité de sucre 0 \n",
"2 Calcul du volume 0 \n",
"2 Nombre de pots 0 \n",
"3 Dessin de l'étiquette 0 \n",
"3 Mise à l'echelle 0 \n",
"3 Longueur de l'étiquette 0 \n",
"\n",
" b'moussri bakari' b'said ftoumia' \\\n",
"1 et 2 Suivre le programme 0 0 \n",
"3 Renverser le programme 0 0 \n",
"4 Toujours la même chose 0 0 \n",
"4 Développer F 2 0 \n",
"1 Fraction réponse 4 4 \n",
"1 Notation et vocabulaire 5 6 \n",
"2 Arbre de probabilité 0 0 \n",
"1 et 2 Raisonnement pour choisir 4 1 \n",
"1 et 2 Décomposer le problème 4 1 \n",
"1 et 2 Choix des opérations et calculs 1 0 \n",
"3 Composition des réductions 0 0 \n",
"1 Logique de la réponse 0 3 \n",
"1 Calculs des indicateurs 0 3 \n",
"1 Clarté des explications 0 3 \n",
"2 Calculs 0 0 \n",
"2 Validité des réponses 0 3 \n",
"2 Tests des possibilités 0 0 \n",
" Reconnaitre les théorèmes 3 5 \n",
" Validité des calculs 4 6 \n",
" Suivi du raisonnement géométrique 3 6 \n",
"1 Quantité de sucre 3 0 \n",
"2 Calcul du volume 1 1 \n",
"2 Nombre de pots 0 0 \n",
"3 Dessin de l'étiquette 0 0 \n",
"3 Mise à l'echelle 0 0 \n",
"3 Longueur de l'étiquette 0 0 \n",
"\n",
" b'zakotra claudian' \\\n",
"1 et 2 Suivre le programme 2 \n",
"3 Renverser le programme 2 \n",
"4 Toujours la même chose 0 \n",
"4 Développer F 3 \n",
"1 Fraction réponse 4 \n",
"1 Notation et vocabulaire 8 \n",
"2 Arbre de probabilité 0 \n",
"1 et 2 Raisonnement pour choisir 3 \n",
"1 et 2 Décomposer le problème 3 \n",
"1 et 2 Choix des opérations et calculs 0 \n",
"3 Composition des réductions 0 \n",
"1 Logique de la réponse 3 \n",
"1 Calculs des indicateurs 3 \n",
"1 Clarté des explications 3 \n",
"2 Calculs 0 \n",
"2 Validité des réponses 0 \n",
"2 Tests des possibilités 0 \n",
" Reconnaitre les théorèmes 6 \n",
" Validité des calculs 4 \n",
" Suivi du raisonnement géométrique 4 \n",
"1 Quantité de sucre 3 \n",
"2 Calcul du volume 0 \n",
"2 Nombre de pots 0 \n",
"3 Dessin de l'étiquette 0 \n",
"3 Mise à l'echelle 0 \n",
"3 Longueur de l'étiquette 0 \n",
"\n",
" b'toufail salahou' \n",
"1 et 2 Suivre le programme 1.0 \n",
"3 Renverser le programme 0.0 \n",
"4 Toujours la même chose 0.0 \n",
"4 Développer F 1.0 \n",
"1 Fraction réponse 4.0 \n",
"1 Notation et vocabulaire 3.0 \n",
"2 Arbre de probabilité 0.0 \n",
"1 et 2 Raisonnement pour choisir 5.0 \n",
"1 et 2 Décomposer le problème 5.0 \n",
"1 et 2 Choix des opérations et calculs 3.0 \n",
"3 Composition des réductions 1.0 \n",
"1 Logique de la réponse 3.0 \n",
"1 Calculs des indicateurs 1.5 \n",
"1 Clarté des explications 2.0 \n",
"2 Calculs 0.0 \n",
"2 Validité des réponses 0.0 \n",
"2 Tests des possibilités 0.0 \n",
" Reconnaitre les théorèmes 6.0 \n",
" Validité des calculs 5.0 \n",
" Suivi du raisonnement géométrique 5.0 \n",
"1 Quantité de sucre 3.0 \n",
"2 Calcul du volume 1.0 \n",
"2 Nombre de pots 0.0 \n",
"3 Dessin de l'étiquette 0.0 \n",
"3 Mise à l'echelle 0.0 \n",
"3 Longueur de l'étiquette 0.0 \n",
"\n",
"[26 rows x 27 columns]"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = df[list(~df.reset_index()[\"index\"].apply(lambda x: x.startswith(\"Ex\") or x.startswith(\"DNB\")))]\n",
"df"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" index | \n",
" b'abdallah alaoui taiassima' | \n",
" b'adani ismou' | \n",
" b'ahamada dhoulkamal' | \n",
" b'ahamadi asbahati' | \n",
" b'ahamadi ousseni ansufidine' | \n",
" b'ahamed fayadhi' | \n",
" b'ahmed said hadaita' | \n",
" b'ali madi anissa' | \n",
" b'ali raydel' | \n",
" ... | \n",
" b'hamedaly doulkifly' | \n",
" b'ibrahim chaharzade' | \n",
" b'ibrahim nassur' | \n",
" b'inoussa anchoura' | \n",
" b'mohamed nadia' | \n",
" b'mouhoudhoire izak' | \n",
" b'moussri bakari' | \n",
" b'said ftoumia' | \n",
" b'zakotra claudian' | \n",
" b'toufail salahou' | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 et 2 Suivre le programme | \n",
" 3 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2 | \n",
" 6 | \n",
" 6.0 | \n",
" ... | \n",
" 2.0 | \n",
" 3.0 | \n",
" 6.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 1 | \n",
" 3 Renverser le programme | \n",
" 0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.5 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 4 Toujours la même chose | \n",
" 0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 3 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 3 | \n",
" 4 Développer F | \n",
" 0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1 | \n",
" 1 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" 1.5 | \n",
" 0.0 | \n",
" NaN | \n",
" 1.5 | \n",
" 1 | \n",
" 2 | \n",
" 0 | \n",
" 3 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 4 | \n",
" 1 Fraction réponse | \n",
" 4 | \n",
" 4.0 | \n",
" 4.0 | \n",
" 4 | \n",
" 3.0 | \n",
" 4.0 | \n",
" 4 | \n",
" 4 | \n",
" 4.0 | \n",
" ... | \n",
" 3.0 | \n",
" 4.0 | \n",
" 4.0 | \n",
" NaN | \n",
" 4.0 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
" 4.0 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 28 columns
\n",
"
"
],
"text/plain": [
" index b'abdallah alaoui taiassima' b'adani ismou' \\\n",
"0 1 et 2 Suivre le programme 3 6.0 \n",
"1 3 Renverser le programme 0 3.0 \n",
"2 4 Toujours la même chose 0 2.0 \n",
"3 4 Développer F 0 0.0 \n",
"4 1 Fraction réponse 4 4.0 \n",
"\n",
" b'ahamada dhoulkamal' b'ahamadi asbahati' b'ahamadi ousseni ansufidine' \\\n",
"0 2.0 0 0.0 \n",
"1 0.0 0 0.0 \n",
"2 0.0 0 0.0 \n",
"3 1.0 0 1.0 \n",
"4 4.0 4 3.0 \n",
"\n",
" b'ahamed fayadhi' b'ahmed said hadaita' b'ali madi anissa' \\\n",
"0 0.0 2 6 \n",
"1 0.0 0 0 \n",
"2 0.0 0 3 \n",
"3 0.0 1 1 \n",
"4 4.0 4 4 \n",
"\n",
" b'ali raydel' ... b'hamedaly doulkifly' \\\n",
"0 6.0 ... 2.0 \n",
"1 3.0 ... 0.0 \n",
"2 0.0 ... 0.0 \n",
"3 0.0 ... 0.0 \n",
"4 4.0 ... 3.0 \n",
"\n",
" b'ibrahim chaharzade' b'ibrahim nassur' b'inoussa anchoura' \\\n",
"0 3.0 6.0 NaN \n",
"1 0.0 1.5 NaN \n",
"2 0.0 0.0 NaN \n",
"3 1.5 0.0 NaN \n",
"4 4.0 4.0 NaN \n",
"\n",
" b'mohamed nadia' b'mouhoudhoire izak' b'moussri bakari' b'said ftoumia' \\\n",
"0 1.0 4 0 0 \n",
"1 0.0 0 0 0 \n",
"2 0.0 0 0 0 \n",
"3 1.5 1 2 0 \n",
"4 4.0 4 4 4 \n",
"\n",
" b'zakotra claudian' b'toufail salahou' \n",
"0 2 1.0 \n",
"1 2 0.0 \n",
"2 0 0.0 \n",
"3 3 1.0 \n",
"4 4 4.0 \n",
"\n",
"[5 rows x 28 columns]"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = df.reset_index()\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" index | \n",
" b'abdallah alaoui taiassima' | \n",
" b'adani ismou' | \n",
" b'ahamada dhoulkamal' | \n",
" b'ahamadi asbahati' | \n",
" b'ahamadi ousseni ansufidine' | \n",
" b'ahamed fayadhi' | \n",
" b'ahmed said hadaita' | \n",
" b'ali madi anissa' | \n",
" b'ali raydel' | \n",
" ... | \n",
" b'ibrahim nassur' | \n",
" b'inoussa anchoura' | \n",
" b'mohamed nadia' | \n",
" b'mouhoudhoire izak' | \n",
" b'moussri bakari' | \n",
" b'said ftoumia' | \n",
" b'zakotra claudian' | \n",
" b'toufail salahou' | \n",
" q_comment | \n",
" q_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 et 2 Suivre le programme | \n",
" 3 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2 | \n",
" 6 | \n",
" 6.0 | \n",
" ... | \n",
" 6.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 1.0 | \n",
" et 2 Suivre le programme | \n",
" 1 | \n",
"
\n",
" \n",
" 1 | \n",
" 3 Renverser le programme | \n",
" 0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3.0 | \n",
" ... | \n",
" 1.5 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0.0 | \n",
" Renverser le programme | \n",
" 3 | \n",
"
\n",
" \n",
" 2 | \n",
" 4 Toujours la même chose | \n",
" 0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 3 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" Toujours la même chose | \n",
" 4 | \n",
"
\n",
" \n",
" 3 | \n",
" 4 Développer F | \n",
" 0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1 | \n",
" 1 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 1.5 | \n",
" 1 | \n",
" 2 | \n",
" 0 | \n",
" 3 | \n",
" 1.0 | \n",
" Développer F | \n",
" 4 | \n",
"
\n",
" \n",
" 4 | \n",
" 1 Fraction réponse | \n",
" 4 | \n",
" 4.0 | \n",
" 4.0 | \n",
" 4 | \n",
" 3.0 | \n",
" 4.0 | \n",
" 4 | \n",
" 4 | \n",
" 4.0 | \n",
" ... | \n",
" 4.0 | \n",
" NaN | \n",
" 4.0 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
" 4 | \n",
" 4.0 | \n",
" Fraction réponse | \n",
" 1 | \n",
"
\n",
" \n",
" 5 | \n",
" 1 Notation et vocabulaire | \n",
" 6 | \n",
" 0.0 | \n",
" 6.0 | \n",
" 8 | \n",
" 3.0 | \n",
" 6.0 | \n",
" 8 | \n",
" 8 | \n",
" 0.0 | \n",
" ... | \n",
" 1.0 | \n",
" NaN | \n",
" 2.0 | \n",
" 6 | \n",
" 5 | \n",
" 6 | \n",
" 8 | \n",
" 3.0 | \n",
" Notation et vocabulaire | \n",
" 1 | \n",
"
\n",
" \n",
" 6 | \n",
" 2 Arbre de probabilité | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" Arbre de probabilité | \n",
" 2 | \n",
"
\n",
" \n",
" 7 | \n",
" 1 et 2 Raisonnement pour choisir | \n",
" 2 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 5 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 5 | \n",
" 5 | \n",
" 4.0 | \n",
" ... | \n",
" 2.0 | \n",
" NaN | \n",
" 4.0 | \n",
" 2 | \n",
" 4 | \n",
" 1 | \n",
" 3 | \n",
" 5.0 | \n",
" et 2 Raisonnement pour choisir | \n",
" 1 | \n",
"
\n",
" \n",
" 8 | \n",
" 1 et 2 Décomposer le problème | \n",
" 2 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 5 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 5 | \n",
" 5 | \n",
" 2.5 | \n",
" ... | \n",
" 2.0 | \n",
" NaN | \n",
" 3.0 | \n",
" 1 | \n",
" 4 | \n",
" 1 | \n",
" 3 | \n",
" 5.0 | \n",
" et 2 Décomposer le problème | \n",
" 1 | \n",
"
\n",
" \n",
" 9 | \n",
" 1 et 2 Choix des opérations et calculs | \n",
" 0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 4 | \n",
" 1 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 3.0 | \n",
" et 2 Choix des opérations et calculs | \n",
" 1 | \n",
"
\n",
" \n",
" 10 | \n",
" 3 Composition des réductions | \n",
" 0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2 | \n",
" 0 | \n",
" 0.0 | \n",
" ... | \n",
" 1.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1.0 | \n",
" Composition des réductions | \n",
" 3 | \n",
"
\n",
" \n",
" 11 | \n",
" 1 Logique de la réponse | \n",
" 0 | \n",
" 3.0 | \n",
" 3.0 | \n",
" 3 | \n",
" 1.5 | \n",
" 0.5 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" ... | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 3.0 | \n",
" Logique de la réponse | \n",
" 1 | \n",
"
\n",
" \n",
" 12 | \n",
" 1 Calculs des indicateurs | \n",
" 0 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 3 | \n",
" 1.5 | \n",
" 0.5 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" ... | \n",
" 3.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 1.5 | \n",
" Calculs des indicateurs | \n",
" 1 | \n",
"
\n",
" \n",
" 13 | \n",
" 1 Clarté des explications | \n",
" 0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 3 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" ... | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 3 | \n",
" 2.0 | \n",
" Clarté des explications | \n",
" 1 | \n",
"
\n",
" \n",
" 14 | \n",
" 2 Calculs | \n",
" 0 | \n",
" 1.5 | \n",
" 0.0 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" Calculs | \n",
" 2 | \n",
"
\n",
" \n",
" 15 | \n",
" 2 Validité des réponses | \n",
" 0 | \n",
" 1.5 | \n",
" 1.5 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 3 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 0 | \n",
" 0.0 | \n",
" Validité des réponses | \n",
" 2 | \n",
"
\n",
" \n",
" 16 | \n",
" 2 Tests des possibilités | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 2 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" Tests des possibilités | \n",
" 2 | \n",
"
\n",
" \n",
" 17 | \n",
" Reconnaitre les théorèmes | \n",
" 2 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 3 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 6 | \n",
" 4 | \n",
" 6.0 | \n",
" ... | \n",
" 3.0 | \n",
" NaN | \n",
" 3.0 | \n",
" 6 | \n",
" 3 | \n",
" 5 | \n",
" 6 | \n",
" 6.0 | \n",
" Reconnaitre les théorèmes | \n",
" | \n",
"
\n",
" \n",
" 18 | \n",
" Validité des calculs | \n",
" 0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 3 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 6 | \n",
" 3 | \n",
" 6.0 | \n",
" ... | \n",
" 2.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 3 | \n",
" 4 | \n",
" 6 | \n",
" 4 | \n",
" 5.0 | \n",
" Validité des calculs | \n",
" | \n",
"
\n",
" \n",
" 19 | \n",
" Suivi du raisonnement géométrique | \n",
" 0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 3 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 5 | \n",
" 3 | \n",
" 4.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 1.0 | \n",
" 4 | \n",
" 3 | \n",
" 6 | \n",
" 4 | \n",
" 5.0 | \n",
" Suivi du raisonnement géométrique | \n",
" | \n",
"
\n",
" \n",
" 20 | \n",
" 1 Quantité de sucre | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3 | \n",
" 0.0 | \n",
" 1.5 | \n",
" 0 | \n",
" 3 | \n",
" 0.0 | \n",
" ... | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 3 | \n",
" 0 | \n",
" 3 | \n",
" 3.0 | \n",
" Quantité de sucre | \n",
" 1 | \n",
"
\n",
" \n",
" 21 | \n",
" 2 Calcul du volume | \n",
" 0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" 1.0 | \n",
" Calcul du volume | \n",
" 2 | \n",
"
\n",
" \n",
" 22 | \n",
" 2 Nombre de pots | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" Nombre de pots | \n",
" 2 | \n",
"
\n",
" \n",
" 23 | \n",
" 3 Dessin de l'étiquette | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" Dessin de l'étiquette | \n",
" 3 | \n",
"
\n",
" \n",
" 24 | \n",
" 3 Mise à l'echelle | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" Mise à l'echelle | \n",
" 3 | \n",
"
\n",
" \n",
" 25 | \n",
" 3 Longueur de l'étiquette | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" ... | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.0 | \n",
" Longueur de l'étiquette | \n",
" 3 | \n",
"
\n",
" \n",
"
\n",
"
26 rows × 30 columns
\n",
"
"
],
"text/plain": [
" index b'abdallah alaoui taiassima' \\\n",
"0 1 et 2 Suivre le programme 3 \n",
"1 3 Renverser le programme 0 \n",
"2 4 Toujours la même chose 0 \n",
"3 4 Développer F 0 \n",
"4 1 Fraction réponse 4 \n",
"5 1 Notation et vocabulaire 6 \n",
"6 2 Arbre de probabilité 0 \n",
"7 1 et 2 Raisonnement pour choisir 2 \n",
"8 1 et 2 Décomposer le problème 2 \n",
"9 1 et 2 Choix des opérations et calculs 0 \n",
"10 3 Composition des réductions 0 \n",
"11 1 Logique de la réponse 0 \n",
"12 1 Calculs des indicateurs 0 \n",
"13 1 Clarté des explications 0 \n",
"14 2 Calculs 0 \n",
"15 2 Validité des réponses 0 \n",
"16 2 Tests des possibilités 0 \n",
"17 Reconnaitre les théorèmes 2 \n",
"18 Validité des calculs 0 \n",
"19 Suivi du raisonnement géométrique 0 \n",
"20 1 Quantité de sucre 0 \n",
"21 2 Calcul du volume 0 \n",
"22 2 Nombre de pots 0 \n",
"23 3 Dessin de l'étiquette 0 \n",
"24 3 Mise à l'echelle 0 \n",
"25 3 Longueur de l'étiquette 0 \n",
"\n",
" b'adani ismou' b'ahamada dhoulkamal' b'ahamadi asbahati' \\\n",
"0 6.0 2.0 0 \n",
"1 3.0 0.0 0 \n",
"2 2.0 0.0 0 \n",
"3 0.0 1.0 0 \n",
"4 4.0 4.0 4 \n",
"5 0.0 6.0 8 \n",
"6 0.0 0.0 0 \n",
"7 1.0 3.0 5 \n",
"8 2.0 3.0 5 \n",
"9 1.0 0.0 2 \n",
"10 0.0 1.0 1 \n",
"11 3.0 3.0 3 \n",
"12 2.0 3.0 3 \n",
"13 1.0 3.0 3 \n",
"14 1.5 0.0 3 \n",
"15 1.5 1.5 3 \n",
"16 0.0 0.0 3 \n",
"17 2.0 4.0 3 \n",
"18 0.0 3.0 3 \n",
"19 0.0 1.0 3 \n",
"20 0.0 0.0 3 \n",
"21 0.0 1.0 0 \n",
"22 0.0 0.0 0 \n",
"23 0.0 0.0 0 \n",
"24 0.0 0.0 0 \n",
"25 0.0 0.0 0 \n",
"\n",
" b'ahamadi ousseni ansufidine' b'ahamed fayadhi' b'ahmed said hadaita' \\\n",
"0 0.0 0.0 2 \n",
"1 0.0 0.0 0 \n",
"2 0.0 0.0 0 \n",
"3 1.0 0.0 1 \n",
"4 3.0 4.0 4 \n",
"5 3.0 6.0 8 \n",
"6 0.0 0.0 0 \n",
"7 2.0 1.0 5 \n",
"8 1.0 1.0 5 \n",
"9 0.0 0.0 4 \n",
"10 0.0 0.0 2 \n",
"11 1.5 0.5 3 \n",
"12 1.5 0.5 3 \n",
"13 1.0 0.0 3 \n",
"14 0.0 0.0 3 \n",
"15 0.0 0.0 3 \n",
"16 0.0 0.0 3 \n",
"17 5.0 2.0 6 \n",
"18 0.0 1.0 6 \n",
"19 1.0 1.0 5 \n",
"20 0.0 1.5 0 \n",
"21 0.0 0.0 0 \n",
"22 0.0 0.0 0 \n",
"23 0.0 0.0 0 \n",
"24 0.0 0.0 0 \n",
"25 0.0 0.0 0 \n",
"\n",
" b'ali madi anissa' b'ali raydel' ... b'ibrahim nassur' \\\n",
"0 6 6.0 ... 6.0 \n",
"1 0 3.0 ... 1.5 \n",
"2 3 0.0 ... 0.0 \n",
"3 1 0.0 ... 0.0 \n",
"4 4 4.0 ... 4.0 \n",
"5 8 0.0 ... 1.0 \n",
"6 0 0.0 ... 0.0 \n",
"7 5 4.0 ... 2.0 \n",
"8 5 2.5 ... 2.0 \n",
"9 1 0.0 ... 0.0 \n",
"10 0 0.0 ... 1.0 \n",
"11 3 0.0 ... 3.0 \n",
"12 3 0.0 ... 3.0 \n",
"13 3 0.0 ... 3.0 \n",
"14 3 0.0 ... 0.0 \n",
"15 3 0.0 ... 0.0 \n",
"16 2 0.0 ... 0.0 \n",
"17 4 6.0 ... 3.0 \n",
"18 3 6.0 ... 2.0 \n",
"19 3 4.0 ... 0.0 \n",
"20 3 0.0 ... 3.0 \n",
"21 0 0.0 ... 0.0 \n",
"22 0 0.0 ... 0.0 \n",
"23 0 0.0 ... 0.0 \n",
"24 0 0.0 ... 0.0 \n",
"25 0 0.0 ... 0.0 \n",
"\n",
" b'inoussa anchoura' b'mohamed nadia' b'mouhoudhoire izak' \\\n",
"0 NaN 1.0 4 \n",
"1 NaN 0.0 0 \n",
"2 NaN 0.0 0 \n",
"3 NaN 1.5 1 \n",
"4 NaN 4.0 4 \n",
"5 NaN 2.0 6 \n",
"6 NaN 0.0 0 \n",
"7 NaN 4.0 2 \n",
"8 NaN 3.0 1 \n",
"9 NaN 1.0 0 \n",
"10 NaN 0.0 0 \n",
"11 NaN 0.0 0 \n",
"12 NaN 1.0 0 \n",
"13 NaN 0.0 0 \n",
"14 NaN 0.0 0 \n",
"15 NaN 0.0 0 \n",
"16 NaN 0.0 0 \n",
"17 NaN 3.0 6 \n",
"18 NaN 0.0 3 \n",
"19 NaN 1.0 4 \n",
"20 NaN 0.0 0 \n",
"21 NaN 0.0 0 \n",
"22 NaN 0.0 0 \n",
"23 NaN 0.0 0 \n",
"24 NaN 0.0 0 \n",
"25 NaN 0.0 0 \n",
"\n",
" b'moussri bakari' b'said ftoumia' b'zakotra claudian' \\\n",
"0 0 0 2 \n",
"1 0 0 2 \n",
"2 0 0 0 \n",
"3 2 0 3 \n",
"4 4 4 4 \n",
"5 5 6 8 \n",
"6 0 0 0 \n",
"7 4 1 3 \n",
"8 4 1 3 \n",
"9 1 0 0 \n",
"10 0 0 0 \n",
"11 0 3 3 \n",
"12 0 3 3 \n",
"13 0 3 3 \n",
"14 0 0 0 \n",
"15 0 3 0 \n",
"16 0 0 0 \n",
"17 3 5 6 \n",
"18 4 6 4 \n",
"19 3 6 4 \n",
"20 3 0 3 \n",
"21 1 1 0 \n",
"22 0 0 0 \n",
"23 0 0 0 \n",
"24 0 0 0 \n",
"25 0 0 0 \n",
"\n",
" b'toufail salahou' q_comment q_name \n",
"0 1.0 et 2 Suivre le programme 1 \n",
"1 0.0 Renverser le programme 3 \n",
"2 0.0 Toujours la même chose 4 \n",
"3 1.0 Développer F 4 \n",
"4 4.0 Fraction réponse 1 \n",
"5 3.0 Notation et vocabulaire 1 \n",
"6 0.0 Arbre de probabilité 2 \n",
"7 5.0 et 2 Raisonnement pour choisir 1 \n",
"8 5.0 et 2 Décomposer le problème 1 \n",
"9 3.0 et 2 Choix des opérations et calculs 1 \n",
"10 1.0 Composition des réductions 3 \n",
"11 3.0 Logique de la réponse 1 \n",
"12 1.5 Calculs des indicateurs 1 \n",
"13 2.0 Clarté des explications 1 \n",
"14 0.0 Calculs 2 \n",
"15 0.0 Validité des réponses 2 \n",
"16 0.0 Tests des possibilités 2 \n",
"17 6.0 Reconnaitre les théorèmes \n",
"18 5.0 Validité des calculs \n",
"19 5.0 Suivi du raisonnement géométrique \n",
"20 3.0 Quantité de sucre 1 \n",
"21 1.0 Calcul du volume 2 \n",
"22 0.0 Nombre de pots 2 \n",
"23 0.0 Dessin de l'étiquette 3 \n",
"24 0.0 Mise à l'echelle 3 \n",
"25 0.0 Longueur de l'étiquette 3 \n",
"\n",
"[26 rows x 30 columns]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = df.assign(\n",
" q_name = df[\"index\"].apply(lambda x: x.split(\" \")[0]),\n",
" q_comment = df[\"index\"].apply(lambda x: \" \".join(x.split(\" \")[1:])),\n",
" )\n",
"df"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" index | \n",
" q_name | \n",
" q_comment | \n",
" level_3 | \n",
" 0 | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 et 2 Suivre le programme | \n",
" 1 | \n",
" et 2 Suivre le programme | \n",
" b'abdallah alaoui taiassima' | \n",
" 3.0 | \n",
"
\n",
" \n",
" 1 | \n",
" 1 et 2 Suivre le programme | \n",
" 1 | \n",
" et 2 Suivre le programme | \n",
" b'adani ismou' | \n",
" 6.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 1 et 2 Suivre le programme | \n",
" 1 | \n",
" et 2 Suivre le programme | \n",
" b'ahamada dhoulkamal' | \n",
" 2.0 | \n",
"
\n",
" \n",
" 3 | \n",
" 1 et 2 Suivre le programme | \n",
" 1 | \n",
" et 2 Suivre le programme | \n",
" b'ahamadi asbahati' | \n",
" 0.0 | \n",
"
\n",
" \n",
" 4 | \n",
" 1 et 2 Suivre le programme | \n",
" 1 | \n",
" et 2 Suivre le programme | \n",
" b'ahamadi ousseni ansufidine' | \n",
" 0.0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" index q_name q_comment \\\n",
"0 1 et 2 Suivre le programme 1 et 2 Suivre le programme \n",
"1 1 et 2 Suivre le programme 1 et 2 Suivre le programme \n",
"2 1 et 2 Suivre le programme 1 et 2 Suivre le programme \n",
"3 1 et 2 Suivre le programme 1 et 2 Suivre le programme \n",
"4 1 et 2 Suivre le programme 1 et 2 Suivre le programme \n",
"\n",
" level_3 0 \n",
"0 b'abdallah alaoui taiassima' 3.0 \n",
"1 b'adani ismou' 6.0 \n",
"2 b'ahamada dhoulkamal' 2.0 \n",
"3 b'ahamadi asbahati' 0.0 \n",
"4 b'ahamadi ousseni ansufidine' 0.0 "
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = df.set_index([\"index\", \"q_name\", \"q_comment\"]).stack().reset_index()\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"df = df.rename(columns={0:\"value\", \"level_3\": \"norm_surname\"})"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Il ne reste plus qu'à trouver les correspondances avec la base de données."
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"sqlite_datas = pull_sqlite(34, conn)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Les élèves"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" surname | \n",
" mail | \n",
" commment | \n",
" tribe_id | \n",
" norm_surname | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" ABDALLAH ALLAOUI | \n",
" Taiassima | \n",
" | \n",
" None | \n",
" 1 | \n",
" NaN | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" ADANI | \n",
" Ismou | \n",
" | \n",
" None | \n",
" 1 | \n",
" NaN | \n",
"
\n",
" \n",
" 2 | \n",
" 3 | \n",
" AHAMADA | \n",
" Dhoulkamal | \n",
" | \n",
" None | \n",
" 1 | \n",
" NaN | \n",
"
\n",
" \n",
" 3 | \n",
" 4 | \n",
" AHAMADI | \n",
" Asbahati | \n",
" | \n",
" None | \n",
" 1 | \n",
" NaN | \n",
"
\n",
" \n",
" 4 | \n",
" 5 | \n",
" AHAMADI OUSSENI | \n",
" Ansufiddine | \n",
" | \n",
" None | \n",
" 1 | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name surname mail commment tribe_id norm_surname\n",
"0 1 ABDALLAH ALLAOUI Taiassima None 1 NaN\n",
"1 2 ADANI Ismou None 1 NaN\n",
"2 3 AHAMADA Dhoulkamal None 1 NaN\n",
"3 4 AHAMADI Asbahati None 1 NaN\n",
"4 5 AHAMADI OUSSENI Ansufiddine None 1 NaN"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def tmp()\n",
"st_df = sqlite_datas[\"students\"]\n",
"st_df = st_df.assign(\n",
" norm_surname = st_df[[\"surname\", \"name\"]].apply(lambda x: normalize_str(\" \".join(x)))\n",
")\n",
"st_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"df = pd.merge(df, st_df, left_on='norm_surname', right_on=\"norm_surname\")[[\"q_comment\", \"id\", \"value\"]]"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" q_comment | \n",
" id | \n",
" value | \n",
"
\n",
" \n",
" \n",
" \n",
"
\n",
"
"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [q_comment, id, value]\n",
"Index: []"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Les questions"
]
},
{
"cell_type": "code",
"execution_count": 26,
"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",
" 369 | \n",
" 1 | \n",
" 3 | \n",
" 0 | \n",
" 114 | \n",
" Mod | \n",
" Geometrie | \n",
" Reconnaitre Pythagore | \n",
"
\n",
" \n",
" 1 | \n",
" 370 | \n",
" 1 | \n",
" 3 | \n",
" 0 | \n",
" 114 | \n",
" Cal | \n",
" Geometrie | \n",
" Calculs | \n",
"
\n",
" \n",
" 2 | \n",
" 371 | \n",
" 2 | \n",
" 4 | \n",
" 0 | \n",
" 114 | \n",
" Rep | \n",
" Geometrie | \n",
" Calcul de l'aire | \n",
"
\n",
" \n",
" 0 | \n",
" 372 | \n",
" 1.a | \n",
" 3 | \n",
" 0 | \n",
" 115 | \n",
" Cher | \n",
" Statistiques | \n",
" Lecture de tableau | \n",
"
\n",
" \n",
" 1 | \n",
" 373 | \n",
" 1.b et 2.b | \n",
" 3 | \n",
" 0 | \n",
" 115 | \n",
" Rep | \n",
" Statistiques | \n",
" Minimum et maximum | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id name score_rate is_leveled exercise_id competence \\\n",
"0 369 1 3 0 114 Mod \n",
"1 370 1 3 0 114 Cal \n",
"2 371 2 4 0 114 Rep \n",
"0 372 1.a 3 0 115 Cher \n",
"1 373 1.b et 2.b 3 0 115 Rep \n",
"\n",
" domain comment \n",
"0 Geometrie Reconnaitre Pythagore \n",
"1 Geometrie Calculs \n",
"2 Geometrie Calcul de l'aire \n",
"0 Statistiques Lecture de tableau \n",
"1 Statistiques Minimum et maximum "
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"q_df = sqlite_datas[\"questions\"]\n",
"q_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"df = pd.merge(df, q_df, left_on=\"q_comment\", right_on=\"comment\")[[\"id_x\", \"id_y\", \"value\"]]\\\n",
" .rename(columns={\"id_x\": \"student_id\", \"id_y\": \"question_id\"})"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Yes ça y est je dois les avoir!"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" student_id | \n",
" question_id | \n",
" value | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 27 | \n",
" 369 | \n",
" 3 | \n",
"
\n",
" \n",
" 1 | \n",
" 28 | \n",
" 369 | \n",
" 0 | \n",
"
\n",
" \n",
" 2 | \n",
" 29 | \n",
" 369 | \n",
" 3 | \n",
"
\n",
" \n",
" 3 | \n",
" 30 | \n",
" 369 | \n",
" 3 | \n",
"
\n",
" \n",
" 4 | \n",
" 32 | \n",
" 369 | \n",
" 1 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" student_id question_id value\n",
"0 27 369 3\n",
"1 28 369 0\n",
"2 29 369 3\n",
"3 30 369 3\n",
"4 32 369 1"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Et maintenant on sauvegarde tout!"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"df.to_sql(\"score\", conn, if_exists='append', index=False)"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'fdsqfdsq' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mfdsqfdsq\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'fdsqfdsq' is not defined"
]
}
],
"source": [
"fdsqfdsq"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Fait au DNB blanc 1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"wb = xlsxwriter.Workbook(\"DNB_BLANC_pro1.xlsx\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Formatages"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"eval_format = wb.add_format({'bold': True, 'font_color': 'red'})\n",
"eval_cell = wb.add_format()\n",
"eval_cell.set_bg_color(\"red\")\n",
"# exo_cell"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"La feuille de calcul"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"wb = xlsxwriter.Workbook(\"DS4_302.xlsx\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ws = wb.add_worksheet()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"En tête du tableau"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ws.write(0,1,\"Competence\")\n",
"ws.write(0,2,\"Barème\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Toutes les questions et exercices"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def q_line(q, row, ws):\n",
" ws.write(row, 0, f\"{q.name} - {q.comment}\")\n",
" ws.write(row, 1, f\"{q.competence}\")\n",
" ws.write(row, 2, q.score_rate)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def exo_block(exo, row, ws):\n",
" qrow = row\n",
" for q in exo[\"questions\"]:\n",
" qrow += 1\n",
" q_line(q, qrow, ws)\n",
" ws.write(row, 0, f\"Ex {exo['name']}\")\n",
" row_range = \", \".join([f\"C{i}\" for i in range(row+2, qrow+2)])\n",
" for i in range(30):\n",
" ws.write(row, i+2, f\"=SUM({row_range})\")\n",
" return qrow"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"scrolled": false
},
"outputs": [],
"source": [
"row = 2\n",
"exo_rows = []\n",
"for exo in ev.exercises:\n",
" exo_rows.append(row)\n",
" row = exo_block(exo, row, ws) + 1\n",
"ws.write(1,0, ev.name, eval_format)\n",
"exo_xls_range = \", \".join([f\"C{i+1}\" for i in exo_rows])\n",
"for i in range(30):\n",
" ws.write(1,i+2, f\"=SUM({exo_xls_range})\", eval_format)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"wb.close()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Avec openpyxl"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from openpyxl import Workbook\n",
"from openpyxl.styles import PatternFill, Border, Side, Alignment, Protection, Font, colors"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"colors.RED"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"wb = Workbook()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ws = wb.create_sheet(ev.name)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ws.cell(1,2,\"Competence\")\n",
"ws.cell(1,3,\"Barème\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def q_line(q, row, ws):\n",
" ws.cell(row, 1, f\"{q.name} - {q.comment}\")\n",
" ws.cell(row, 2, f\"{q.competence}\")\n",
" ws.cell(row, 3, q.score_rate)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def exo_block(exo, row, ws):\n",
" qrow = row\n",
" for q in exo[\"questions\"]:\n",
" qrow += 1\n",
" q_line(q, qrow, ws)\n",
" ws.cell(row, 1, f\"Ex {exo['name']}\")\n",
" row_range = \", \".join([f\"C{i}\" for i in range(row+1, qrow+1)])\n",
" ws.cell(row, 3, f\"=SUM({row_range})\")\n",
" return qrow"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"row = 3\n",
"exo_rows = []\n",
"for exo in ev.exercises:\n",
" exo_rows.append(row)\n",
" row = exo_block(exo, row, ws) + 1\n",
"eval_row = ws.row_dimensions[2]\n",
"eval_row.fill = PatternFill(bgColor=colors.RED)\n",
"ws.cell(2,1, ev.name)\n",
"exo_xls_range = \", \".join([f\"C{i}\" for i in exo_rows])\n",
"ws.cell(2,3, f\"=SUM({exo_xls_range})\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ev.tribe"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"wb.save(f\"./{ev.name}-{ev.tribe}.xlsx\")"
]
},
{
"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.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}