2016-2017/Notes/Manip 308.ipynb
2017-06-16 09:49:23 +03:00

1248 lines
36 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'notes_tools'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-1-639ae9c8723e>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0mcm\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlight_palette\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"green\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mas_cmap\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 13\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mnotes_tools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtools\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mextract_flat_marks\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mget_class_ws\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdigest_flat_df\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mterm_tools\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0meval_tools\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 14\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mnotes_tools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbareme\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mtranform_scale\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mnotes_tools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmarks_plottings\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'notes_tools'"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"plt.style.use(\"seaborn-notebook\")\n",
"#plt.style.use('ggplot')\n",
"from ipywidgets import interact, interactive, fixed\n",
"import ipywidgets as widgets\n",
"from IPython.display import display\n",
"import seaborn as sns\n",
"cm = sns.light_palette(\"green\", as_cmap=True)\n",
"\n",
"from notes_tools.tools import extract_flat_marks, get_class_ws, digest_flat_df, term_tools, eval_tools\n",
"from notes_tools.tools.bareme import tranform_scale\n",
"from notes_tools.tools.marks_plottings import *"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div id=\"my_id_menu_nb\">run previous cell, wait for 2 seconds</div>\n",
"<script>\n",
"function repeat_indent_string(n){\n",
" var a = \"\" ;\n",
" for ( ; n > 0 ; --n) {\n",
" a += \" \";\n",
" }\n",
" return a;\n",
"}\n",
"var update_menu_string = function(begin, lfirst, llast, sformat, send, keep_item) {\n",
" var anchors = document.getElementsByClassName(\"section\");\n",
" if (anchors.length == 0) {\n",
" anchors = document.getElementsByClassName(\"text_cell_render rendered_html\");\n",
" }\n",
" var i,t;\n",
" var text_menu = begin;\n",
" var text_memo = \"<pre>\\nlength:\" + anchors.length + \"\\n\";\n",
" var ind = \"\";\n",
" var memo_level = 1;\n",
" var href;\n",
" var tags = [];\n",
" var main_item = 0;\n",
" for (i = 0; i <= llast; i++) {\n",
" tags.push(\"h\" + i);\n",
" }\n",
"\n",
" for (i = 0; i < anchors.length; i++) {\n",
" text_memo += \"**\" + anchors[i].id + \"--\\n\";\n",
"\n",
" var child = null;\n",
" for(t = 0; t < tags.length; t++) {\n",
" var r = anchors[i].getElementsByTagName(tags[t]);\n",
" if (r.length > 0) {\n",
"child = r[0];\n",
"break;\n",
" }\n",
" }\n",
" if (child == null){\n",
" text_memo += \"null\\n\";\n",
" continue;\n",
" }\n",
" if (anchors[i].hasAttribute(\"id\")) {\n",
" // when converted in RST\n",
" href = anchors[i].id;\n",
" text_memo += \"#1-\" + href;\n",
" // passer à child suivant (le chercher)\n",
" }\n",
" else if (child.hasAttribute(\"id\")) {\n",
" // in a notebook\n",
" href = child.id;\n",
" text_memo += \"#2-\" + href;\n",
" }\n",
" else {\n",
" text_memo += \"#3-\" + \"*\" + \"\\n\";\n",
" continue;\n",
" }\n",
" var title = child.textContent;\n",
" var level = parseInt(child.tagName.substring(1,2));\n",
"\n",
" text_memo += \"--\" + level + \"?\" + lfirst + \"--\" + title + \"\\n\";\n",
"\n",
" if ((level < lfirst) || (level > llast)) {\n",
" continue ;\n",
" }\n",
" if (title.endsWith('¶')) {\n",
" title = title.substring(0,title.length-1).replace(\"<\", \"&lt;\").replace(\">\", \"&gt;\").replace(\"&\", \"&amp;\")\n",
" }\n",
"\n",
" if (title.length == 0) {\n",
" continue;\n",
" }\n",
"\n",
" while (level < memo_level) {\n",
" text_menu += \"</ul>\\n\";\n",
" memo_level -= 1;\n",
" }\n",
" if (level == lfirst) {\n",
" main_item += 1;\n",
" }\n",
" if (keep_item != -1 && main_item != keep_item + 1) {\n",
" // alert(main_item + \" - \" + level + \" - \" + keep_item);\n",
" continue;\n",
" }\n",
" while (level > memo_level) {\n",
" text_menu += \"<ul>\\n\";\n",
" memo_level += 1;\n",
" }\n",
" text_menu += repeat_indent_string(level-2) + sformat.replace(\"__HREF__\", href).replace(\"__TITLE__\", title);\n",
" }\n",
" while (1 < memo_level) {\n",
" text_menu += \"</ul>\\n\";\n",
" memo_level -= 1;\n",
" }\n",
" text_menu += send;\n",
" //text_menu += \"\\n\" + text_memo;\n",
" return text_menu;\n",
"};\n",
"var update_menu = function() {\n",
" var sbegin = \"\";\n",
" var sformat = '<li><a href=\"#__HREF__\">__TITLE__</a></li>';\n",
" var send = \"\";\n",
" var keep_item = -1;\n",
" var text_menu = update_menu_string(sbegin, 2, 4, sformat, send, keep_item);\n",
" var menu = document.getElementById(\"my_id_menu_nb\");\n",
" menu.innerHTML=text_menu;\n",
"};\n",
"window.setTimeout(update_menu,2000);\n",
" </script>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from jyquickhelper import add_notebook_menu\n",
"add_notebook_menu()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ws = get_class_ws(\"308\")\n",
"flat = extract_flat_marks(ws)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"#quest_pov, exo_pov, eval_pov = digest_flat_df(flat)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array(['DM1', 'DS1', 'DS2', 'DM2', 'DS3', 'DS4', 'DNB blanc1', nan,\n",
" 'ConnT1', 'ConnT2'], dtype=object)"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"flat[\"Nom\"].unique()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Trimestre 1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Trimestre 2"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array(['DS3', 'DS4', 'DNB blanc1', 'ConnT2'], dtype=object)"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"flat_T2 = flat[flat[\"Trimestre\"] == 2]\n",
"quest_T2, exo_T2, eval_T2 = digest_flat_df(flat_T2)\n",
"flat_T2[\"Nom\"].unique()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## DS3"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ds3_flat = flat_T2[flat_T2[\"Nom\"]==\"DS3\"]\n",
"ds3_quest, ds3_exo, ds3_eval = digest_flat_df(ds3_flat)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array(['2016-12-05T00:00:00.000000000'], dtype='datetime64[ns]')"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds3_eval[\"Date\"].unique()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Eleve</th>\n",
" <th>Mark_barem</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>ABDOU Asmahane</td>\n",
" <td>10 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>ABOU Roihim</td>\n",
" <td>6,5 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>AHMED BOINALI Kouraichia</td>\n",
" <td>9 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>AHMED Rahada</td>\n",
" <td>14 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>ALI SAID Anchourati</td>\n",
" <td>4,5 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>ASSANE Noussouraniya</td>\n",
" <td>8,5 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>BACAR Issiaka</td>\n",
" <td>3,5 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>BACAR Samina</td>\n",
" <td>3 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>CHAIHANE Said</td>\n",
" <td>11 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>COMBO Houzaimati</td>\n",
" <td>7,5 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>DAOUD Anzilati</td>\n",
" <td>8 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>DAOUD Talaenti</td>\n",
" <td>6 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>DARKAOUI Rachma</td>\n",
" <td>6 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>DHAKIOINE Nabaouya</td>\n",
" <td>6,5 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>DJANFAR Soioutinour</td>\n",
" <td>7,5 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>DRISSA Ibrahim</td>\n",
" <td>8 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>HACHIM SIDI Assani</td>\n",
" <td>11 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>HAFIDHUI Zalifa</td>\n",
" <td>9 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>HOUMADI Marie</td>\n",
" <td>12 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>HOUMADI Sania</td>\n",
" <td>10 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>MAANDHUI Halouoi</td>\n",
" <td>5,5 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>MASSONDI Nasma</td>\n",
" <td>13,5 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>OUSSEN Eldine</td>\n",
" <td>7 / 18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>SAIDALI Irichad</td>\n",
" <td>7 / 18</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Eleve Mark_barem\n",
"0 ABDOU Asmahane 10 / 18\n",
"1 ABOU Roihim 6,5 / 18\n",
"2 AHMED BOINALI Kouraichia 9 / 18\n",
"3 AHMED Rahada 14 / 18\n",
"4 ALI SAID Anchourati 4,5 / 18\n",
"5 ASSANE Noussouraniya 8,5 / 18\n",
"6 BACAR Issiaka 3,5 / 18\n",
"7 BACAR Samina 3 / 18\n",
"8 CHAIHANE Said 11 / 18\n",
"9 COMBO Houzaimati 7,5 / 18\n",
"10 DAOUD Anzilati 8 / 18\n",
"11 DAOUD Talaenti 6 / 18\n",
"12 DARKAOUI Rachma 6 / 18\n",
"13 DHAKIOINE Nabaouya 6,5 / 18\n",
"14 DJANFAR Soioutinour 7,5 / 18\n",
"15 DRISSA Ibrahim 8 / 18\n",
"16 HACHIM SIDI Assani 11 / 18\n",
"17 HAFIDHUI Zalifa 9 / 18\n",
"18 HOUMADI Marie 12 / 18\n",
"19 HOUMADI Sania 10 / 18\n",
"20 MAANDHUI Halouoi 5,5 / 18\n",
"21 MASSONDI Nasma 13,5 / 18\n",
"22 OUSSEN Eldine 7 / 18\n",
"23 SAIDALI Irichad 7 / 18"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds3_eval[[\"Eleve\", \"Mark_barem\"]]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## DS4"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ds4_flat = flat_T2[flat_T2[\"Nom\"]==\"DS4\"]\n",
"ds4_quest, ds4_exo, ds4_eval = digest_flat_df(ds4_flat)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": true
},
"outputs": [
{
"data": {
"text/plain": [
"(array(['2017-01-26T00:00:00.000000000'], dtype='datetime64[ns]'),\n",
" array([ 21.]))"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds4_eval[\"Date\"].unique(), ds4_eval[\"Bareme\"].unique()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"ds4_eval = tranform_scale(ds4_eval, 20, \"min\")"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": true
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Eleve</th>\n",
" <th>Mark_barem</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>ABDOU Asmahane</td>\n",
" <td>11,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>ABOU Roihim</td>\n",
" <td>8,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>AHMED BOINALI Kouraichia</td>\n",
" <td>14 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>AHMED Rahada</td>\n",
" <td>19 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>ALI SAID Anchourati</td>\n",
" <td>7 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>ASSANE Noussouraniya</td>\n",
" <td>17 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>BACAR Issiaka</td>\n",
" <td>6 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>BACAR Samina</td>\n",
" <td>4,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>CHAIHANE Said</td>\n",
" <td>11,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>COMBO Houzaimati</td>\n",
" <td>8,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>DAOUD Anzilati</td>\n",
" <td>12 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>DAOUD Talaenti</td>\n",
" <td>3 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>DARKAOUI Rachma</td>\n",
" <td>12 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>DHAKIOINE Nabaouya</td>\n",
" <td>9,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>DJANFAR Soioutinour</td>\n",
" <td>12,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>DRISSA Ibrahim</td>\n",
" <td>nan / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>HACHIM SIDI Assani</td>\n",
" <td>17,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>HAFIDHUI Zalifa</td>\n",
" <td>13,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>HOUMADI Marie</td>\n",
" <td>12,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>HOUMADI Sania</td>\n",
" <td>15,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>MAANDHUI Halouoi</td>\n",
" <td>13,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>MASSONDI Nasma</td>\n",
" <td>12 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>OUSSEN Eldine</td>\n",
" <td>11,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>SAIDALI Irichad</td>\n",
" <td>8 / 20</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Eleve Mark_barem\n",
"0 ABDOU Asmahane 11,5 / 20\n",
"1 ABOU Roihim 8,5 / 20\n",
"2 AHMED BOINALI Kouraichia 14 / 20\n",
"3 AHMED Rahada 19 / 20\n",
"4 ALI SAID Anchourati 7 / 20\n",
"5 ASSANE Noussouraniya 17 / 20\n",
"6 BACAR Issiaka 6 / 20\n",
"7 BACAR Samina 4,5 / 20\n",
"8 CHAIHANE Said 11,5 / 20\n",
"9 COMBO Houzaimati 8,5 / 20\n",
"10 DAOUD Anzilati 12 / 20\n",
"11 DAOUD Talaenti 3 / 20\n",
"12 DARKAOUI Rachma 12 / 20\n",
"13 DHAKIOINE Nabaouya 9,5 / 20\n",
"14 DJANFAR Soioutinour 12,5 / 20\n",
"15 DRISSA Ibrahim nan / 20\n",
"16 HACHIM SIDI Assani 17,5 / 20\n",
"17 HAFIDHUI Zalifa 13,5 / 20\n",
"18 HOUMADI Marie 12,5 / 20\n",
"19 HOUMADI Sania 15,5 / 20\n",
"20 MAANDHUI Halouoi 13,5 / 20\n",
"21 MASSONDI Nasma 12 / 20\n",
"22 OUSSEN Eldine 11,5 / 20\n",
"23 SAIDALI Irichad 8 / 20"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds4_eval[[\"Eleve\", \"Mark_barem\"]]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## DNB blanc 1"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"dnb1_flat = flat_T2[flat_T2[\"Nom\"]=='DNB blanc1']\n",
"dnb1_quest, dnb1_exo, dnb1_eval = digest_flat_df(dnb1_flat)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(array(['2017-02-08T00:00:00.000000000'], dtype='datetime64[ns]'),\n",
" array([ 51.]))"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dnb1_eval[\"Date\"].unique(), dnb1_eval[\"Bareme\"].unique()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"count 24.00\n",
"mean 15.00\n",
"std 7.05\n",
"min 3.50\n",
"25% 9.38\n",
"50% 15.75\n",
"75% 18.88\n",
"max 31.50\n",
"Name: Mark, dtype: float64"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dnb1_eval[\"Mark\"].describe()"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Eleve</th>\n",
" <th>Mark_barem</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>ABDOU Asmahane</td>\n",
" <td>11 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>ABOU Roihim</td>\n",
" <td>8 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>AHMED BOINALI Kouraichia</td>\n",
" <td>18,5 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>AHMED Rahada</td>\n",
" <td>23 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>ALI SAID Anchourati</td>\n",
" <td>18 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>ASSANE Noussouraniya</td>\n",
" <td>26 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>BACAR Issiaka</td>\n",
" <td>6,5 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>BACAR Samina</td>\n",
" <td>12 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>CHAIHANE Said</td>\n",
" <td>16 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>COMBO Houzaimati</td>\n",
" <td>20 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>DAOUD Anzilati</td>\n",
" <td>14 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>DAOUD Talaenti</td>\n",
" <td>3,5 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>DARKAOUI Rachma</td>\n",
" <td>9,5 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>DHAKIOINE Nabaouya</td>\n",
" <td>18 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>DJANFAR Soioutinour</td>\n",
" <td>15,5 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>DRISSA Ibrahim</td>\n",
" <td>6,5 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>HACHIM SIDI Assani</td>\n",
" <td>31,5 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>HAFIDHUI Zalifa</td>\n",
" <td>21,5 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>HOUMADI Marie</td>\n",
" <td>21 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>HOUMADI Sania</td>\n",
" <td>17 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>MAANDHUI Halouoi</td>\n",
" <td>17 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>MASSONDI Nasma</td>\n",
" <td>9 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>OUSSEN Eldine</td>\n",
" <td>13 / 51</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>SAIDALI Irichad</td>\n",
" <td>4 / 51</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Eleve Mark_barem\n",
"0 ABDOU Asmahane 11 / 51\n",
"1 ABOU Roihim 8 / 51\n",
"2 AHMED BOINALI Kouraichia 18,5 / 51\n",
"3 AHMED Rahada 23 / 51\n",
"4 ALI SAID Anchourati 18 / 51\n",
"5 ASSANE Noussouraniya 26 / 51\n",
"6 BACAR Issiaka 6,5 / 51\n",
"7 BACAR Samina 12 / 51\n",
"8 CHAIHANE Said 16 / 51\n",
"9 COMBO Houzaimati 20 / 51\n",
"10 DAOUD Anzilati 14 / 51\n",
"11 DAOUD Talaenti 3,5 / 51\n",
"12 DARKAOUI Rachma 9,5 / 51\n",
"13 DHAKIOINE Nabaouya 18 / 51\n",
"14 DJANFAR Soioutinour 15,5 / 51\n",
"15 DRISSA Ibrahim 6,5 / 51\n",
"16 HACHIM SIDI Assani 31,5 / 51\n",
"17 HAFIDHUI Zalifa 21,5 / 51\n",
"18 HOUMADI Marie 21 / 51\n",
"19 HOUMADI Sania 17 / 51\n",
"20 MAANDHUI Halouoi 17 / 51\n",
"21 MASSONDI Nasma 9 / 51\n",
"22 OUSSEN Eldine 13 / 51\n",
"23 SAIDALI Irichad 4 / 51"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dnb1_eval[[\"Eleve\", \"Mark_barem\"]]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## ConnT2"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"connT2_flat = flat_T2[flat_T2[\"Nom\"]=='ConnT2']\n",
"connT2_quest, connT2_exo, connT2_eval = digest_flat_df(connT2_flat)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(array(['Trimestre'], dtype=object), array([ 27., 31., 26., 14.]))"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"connT2_eval[\"Date\"].unique(), connT2_eval[\"Bareme\"].unique()"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"connT2_eval = tranform_scale(connT2_eval, 20, \"prop\")"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"count 24.00\n",
"mean 11.50\n",
"std 3.80\n",
"min 4.00\n",
"25% 9.50\n",
"50% 12.50\n",
"75% 14.12\n",
"max 18.00\n",
"Name: Mark, dtype: float64"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"connT2_eval[\"Mark\"].describe()"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Eleve</th>\n",
" <th>Mark_barem</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>ABDOU Asmahane</td>\n",
" <td>12 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>ABOU Roihim</td>\n",
" <td>8 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>AHMED BOINALI Kouraichia</td>\n",
" <td>14,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>AHMED Rahada</td>\n",
" <td>15 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>ALI SAID Anchourati</td>\n",
" <td>6,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>ASSANE Noussouraniya</td>\n",
" <td>18 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>BACAR Issiaka</td>\n",
" <td>5,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>BACAR Samina</td>\n",
" <td>10 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>CHAIHANE Said</td>\n",
" <td>14 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>COMBO Houzaimati</td>\n",
" <td>13 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>DAOUD Anzilati</td>\n",
" <td>14 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>DAOUD Talaenti</td>\n",
" <td>5,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>DARKAOUI Rachma</td>\n",
" <td>15 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>DHAKIOINE Nabaouya</td>\n",
" <td>11 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>DJANFAR Soioutinour</td>\n",
" <td>10 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>DRISSA Ibrahim</td>\n",
" <td>4 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>HACHIM SIDI Assani</td>\n",
" <td>15,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>HAFIDHUI Zalifa</td>\n",
" <td>14 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>HOUMADI Marie</td>\n",
" <td>12 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>HOUMADI Sania</td>\n",
" <td>13,5 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>MAANDHUI Halouoi</td>\n",
" <td>15 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>MASSONDI Nasma</td>\n",
" <td>11 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>OUSSEN Eldine</td>\n",
" <td>13 / 20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>SAIDALI Irichad</td>\n",
" <td>6 / 20</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Eleve Mark_barem\n",
"0 ABDOU Asmahane 12 / 20\n",
"1 ABOU Roihim 8 / 20\n",
"2 AHMED BOINALI Kouraichia 14,5 / 20\n",
"3 AHMED Rahada 15 / 20\n",
"4 ALI SAID Anchourati 6,5 / 20\n",
"5 ASSANE Noussouraniya 18 / 20\n",
"6 BACAR Issiaka 5,5 / 20\n",
"7 BACAR Samina 10 / 20\n",
"8 CHAIHANE Said 14 / 20\n",
"9 COMBO Houzaimati 13 / 20\n",
"10 DAOUD Anzilati 14 / 20\n",
"11 DAOUD Talaenti 5,5 / 20\n",
"12 DARKAOUI Rachma 15 / 20\n",
"13 DHAKIOINE Nabaouya 11 / 20\n",
"14 DJANFAR Soioutinour 10 / 20\n",
"15 DRISSA Ibrahim 4 / 20\n",
"16 HACHIM SIDI Assani 15,5 / 20\n",
"17 HAFIDHUI Zalifa 14 / 20\n",
"18 HOUMADI Marie 12 / 20\n",
"19 HOUMADI Sania 13,5 / 20\n",
"20 MAANDHUI Halouoi 15 / 20\n",
"21 MASSONDI Nasma 11 / 20\n",
"22 OUSSEN Eldine 13 / 20\n",
"23 SAIDALI Irichad 6 / 20"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"connT2_eval[[\"Eleve\", \"Mark_barem\"]]"
]
},
{
"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.1"
}
},
"nbformat": 4,
"nbformat_minor": 1
}