{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import pandas as pd\n", "from texenv import texenv\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes = pd.read_excel(\"./../../../notes_1S.xls\",sheetname=\"DS_0323\")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "Index(['DS_0323', 'av_arrondi', 'Exercice 1', '1.a (Calculer termes)', '1.b (Reconnaître géométrique)', '1.c (Relation explicite)', '1.d (Calculer terme)', '2.a (Reconnaître arithmétique)', '2.b (Équation)', '2.c (algorithme)', 'Exercice 2', '1 (Delta)', '1 (Racines)', '1 (Tableau de signe)', '1 (Inéquation)', '2 (Dérivation)', '2 (Étude de signe)', '2 (Variation)', 'malus', 'Exercice 3', 'Modéliser', 'Calculer', 'Communiquer'], dtype='object')" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "notes.index" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": true }, "outputs": [], "source": [ "notes = notes.T" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes = notes.drop(\"av_arrondi\", axis=1)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [], "source": [ "barem = notes[:1]\n", "notes = notes[1:]" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes = notes[notes[\"DS_0323\"].notnull()]" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes = notes.astype(float)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "count 27.000000\n", "mean 10.666667\n", "std 3.968627\n", "min 2.000000\n", "25% 8.250000\n", "50% 11.000000\n", "75% 13.000000\n", "max 18.000000\n", "Name: DS_0323, dtype: float64" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "notes['DS_0323'].describe()" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "collapsed": false }, "outputs": [], "source": [ "list_exo = [\"Exercice 1\", \"Exercice 2\", \"Exercice 3\"]" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes[list_exo] = notes[list_exo].applymap(lambda x:round(x,2))" ] }, { "cell_type": "code", "execution_count": 27, "metadata": { "collapsed": false }, "outputs": [], "source": [ "def toRepVal(val):\n", " if pd.isnull(val):\n", " return \"\\\\NoRep\"\n", " elif val == 0:\n", " return \"\\\\RepZ\"\n", " elif val == 1:\n", " return \"\\\\RepU\"\n", " elif val == 2:\n", " return \"\\\\RepD\"\n", " elif val == 3:\n", " return \"\\\\RepT\"\n", " else:\n", " return val" ] }, { "cell_type": "code", "execution_count": 28, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "['1.a (Calculer termes)',\n", " '1.b (Reconnaître géométrique)',\n", " '1.c (Relation explicite)',\n", " '1.d (Calculer terme)',\n", " '2.a (Reconnaître arithmétique)',\n", " '2.b (Équation)',\n", " '2.c (algorithme)',\n", " '1 (Delta)',\n", " '1 (Racines)',\n", " '1 (Tableau de signe)',\n", " '1 (Inéquation)',\n", " '2 (Dérivation)',\n", " '2 (Étude de signe)',\n", " '2 (Variation)',\n", " 'malus',\n", " 'Modéliser',\n", " 'Calculer',\n", " 'Communiquer']" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sous_exo = [i for i in notes.T.index if i not in list_exo + ['DS_0323']]\n", "sous_exo" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes[sous_exo] = notes[sous_exo].applymap(toRepVal)" ] }, { "cell_type": "code", "execution_count": 33, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "22" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(notes.T.index)" ] }, { "cell_type": "code", "execution_count": 35, "metadata": { "collapsed": false }, "outputs": [], "source": [ "bilan = texenv.get_template(\"tpl_bilan.tex\")\n", "with open(\"./bilan.tex\",\"w\") as f:\n", " f.write(bilan.render(eleves = notes, barem = barem))" ] }, { "cell_type": "code", "execution_count": 54, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", " | DS_0318 | \n", "nan | \n", "Exercice 1 | \n", "1 (developper) | \n", "2 (developper) | \n", "Exercice 2 | \n", "1.a (stat calculatrice) | \n", "1.b (etendue interquartile) | \n", "2 | \n", "3.a (stat calculatrice) | \n", "... | \n", "2.c (equilibre) | \n", "3 (force opposée) | \n", "Exercice 4 | \n", "1 (placer points) | \n", "2 (calculer coord vecteurs) | \n", "3 (paralellogramme) | \n", "4.a (placer point) | \n", "4.b (calculer coord point) | \n", "5.a (placer point) | \n", "5.b (calculer coord point) | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ANANTHARASA Kisojana | \n", "8.5 | \n", "8.500000 | \n", "3.33 | \n", "\\RepD | \n", "\\RepD | \n", "2.50 | \n", "\\RepT | \n", "\\RepD | \n", "NaN | \n", "\\RepZ | \n", "... | \n", "NaN | \n", "NaN | \n", "2.00 | \n", "NaN | \n", "\\RepT | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
BAKAYOKO Aïcha | \n", "13.0 | \n", "12.666667 | \n", "4.00 | \n", "\\RepD | \n", "\\RepT | \n", "4.33 | \n", "\\RepU | \n", "\\RepT | \n", "\\RepT | \n", "\\RepU | \n", "... | \n", "NaN | \n", "NaN | \n", "1.67 | \n", "\\RepZ | \n", "\\RepT | \n", "\\RepD | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
BLAISE Emilie | \n", "4.5 | \n", "4.250000 | \n", "0.25 | \n", "0.25 | \n", "\\RepZ | \n", "2.67 | \n", "\\RepD | \n", "NaN | \n", "\\RepD | \n", "\\RepD | \n", "... | \n", "\\RepU | \n", "NaN | \n", "1.00 | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
CHOISI Geordy | \n", "6.5 | \n", "6.416667 | \n", "1.92 | \n", "1.25 | \n", "\\RepU | \n", "1.83 | \n", "\\RepU | \n", "NaN | \n", "\\RepU | \n", "\\RepT | \n", "... | \n", "\\RepD | \n", "NaN | \n", "1.00 | \n", "\\RepD | \n", "\\RepU | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
DRIDI Karim | \n", "11.0 | \n", "10.833333 | \n", "3.33 | \n", "\\RepD | \n", "\\RepD | \n", "2.17 | \n", "\\RepU | \n", "\\RepD | \n", "\\RepZ | \n", "\\RepU | \n", "... | \n", "\\RepU | \n", "\\RepD | \n", "3.33 | \n", "\\RepT | \n", "\\RepU | \n", "\\RepZ | \n", "\\RepT | \n", "\\RepZ | \n", "\\RepT | \n", "NaN | \n", "
FADIGA Mohamed | \n", "12.0 | \n", "11.833333 | \n", "3.33 | \n", "\\RepD | \n", "\\RepD | \n", "1.50 | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "\\RepT | \n", "NaN | \n", "3.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepU | \n", "NaN | \n", "\\RepZ | \n", "NaN | \n", "
FESSARD Katelyne | \n", "14.0 | \n", "13.666667 | \n", "3.33 | \n", "\\RepD | \n", "\\RepD | \n", "6.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "NaN | \n", "0.33 | \n", "\\RepZ | \n", "\\RepZ | \n", "\\RepU | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
FUSCO Manon | \n", "2.0 | \n", "1.916667 | \n", "1.25 | \n", "1.25 | \n", "\\RepZ | \n", "0.00 | \n", "\\RepZ | \n", "\\RepZ | \n", "\\RepZ | \n", "\\RepZ | \n", "... | \n", "NaN | \n", "NaN | \n", "0.67 | \n", "\\RepU | \n", "NaN | \n", "\\RepU | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
GILBERT Melissa | \n", "10.0 | \n", "9.666667 | \n", "4.00 | \n", "\\RepD | \n", "\\RepT | \n", "1.33 | \n", "NaN | \n", "\\RepD | \n", "\\RepU | \n", "NaN | \n", "... | \n", "\\RepT | \n", "\\RepD | \n", "1.67 | \n", "\\RepT | \n", "\\RepD | \n", "\\RepZ | \n", "\\RepZ | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
GUNARASA Rithurshan | \n", "19.0 | \n", "19.333333 | \n", "4.00 | \n", "\\RepD | \n", "\\RepT | \n", "3.67 | \n", "\\RepD | \n", "\\RepD | \n", "\\RepD | \n", "\\RepD | \n", "... | \n", "\\RepD | \n", "\\RepT | \n", "7.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "
HAMLAOUI Fattouma | \n", "17.0 | \n", "17.000000 | \n", "4.00 | \n", "\\RepD | \n", "\\RepT | \n", "3.67 | \n", "\\RepU | \n", "\\RepT | \n", "\\RepD | \n", "\\RepU | \n", "... | \n", "\\RepT | \n", "\\RepD | \n", "4.67 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "
INACIO Bastien | \n", "17.0 | \n", "16.666667 | \n", "3.33 | \n", "\\RepD | \n", "\\RepD | \n", "5.33 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "\\RepD | \n", "4.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "\\RepU | \n", "NaN | \n", "NaN | \n", "
JAMAL EL AMRANI Hafar | \n", "9.0 | \n", "8.666667 | \n", "2.33 | \n", "\\RepU | \n", "\\RepD | \n", "0.00 | \n", "\\RepZ | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "\\RepT | \n", "\\RepD | \n", "3.33 | \n", "\\RepT | \n", "\\RepU | \n", "\\RepZ | \n", "\\RepT | \n", "NaN | \n", "\\RepT | \n", "NaN | \n", "
JOHNSON Yannick | \n", "9.5 | \n", "9.500000 | \n", "3.33 | \n", "\\RepD | \n", "\\RepD | \n", "2.50 | \n", "\\RepD | \n", "\\RepT | \n", "\\RepZ | \n", "NaN | \n", "... | \n", "\\RepZ | \n", "NaN | \n", "1.67 | \n", "\\RepT | \n", "\\RepD | \n", "\\RepZ | \n", "\\RepZ | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
KEITA Yakaré | \n", "13.0 | \n", "13.000000 | \n", "2.50 | \n", "0.5 | \n", "\\RepT | \n", "3.50 | \n", "\\RepD | \n", "\\RepT | \n", "\\RepU | \n", "\\RepD | \n", "... | \n", "\\RepU | \n", "NaN | \n", "5.33 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "\\RepU | \n", "\\RepT | \n", "\\RepU | \n", "
KONE Yacouba | \n", "19.0 | \n", "19.250000 | \n", "3.25 | \n", "1.25 | \n", "\\RepT | \n", "5.33 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "\\RepT | \n", "5.67 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepZ | \n", "\\RepD | \n", "
LE Quentin | \n", "9.0 | \n", "9.333333 | \n", "3.00 | \n", "\\RepU | \n", "\\RepT | \n", "3.33 | \n", "\\RepU | \n", "\\RepT | \n", "\\RepD | \n", "\\RepU | \n", "... | \n", "NaN | \n", "\\RepD | \n", "1.00 | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
LOUKA Marina | \n", "15.0 | \n", "14.666667 | \n", "4.00 | \n", "\\RepD | \n", "\\RepT | \n", "5.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepD | \n", "\\RepD | \n", "2.33 | \n", "\\RepT | \n", "\\RepD | \n", "\\RepZ | \n", "\\RepZ | \n", "\\RepD | \n", "NaN | \n", "NaN | \n", "
MARIGA Alexis | \n", "6.0 | \n", "5.666667 | \n", "0.50 | \n", "0.5 | \n", "\\RepZ | \n", "2.50 | \n", "\\RepT | \n", "NaN | \n", "\\RepD | \n", "\\RepZ | \n", "... | \n", "NaN | \n", "NaN | \n", "2.67 | \n", "\\RepT | \n", "\\RepD | \n", "NaN | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
MATOS GOMES Jean Daniel | \n", "6.5 | \n", "6.500000 | \n", "0.67 | \n", "\\RepZ | \n", "\\RepU | \n", "1.83 | \n", "\\RepT | \n", "NaN | \n", "\\RepU | \n", "NaN | \n", "... | \n", "\\RepD | \n", "\\RepD | \n", "1.67 | \n", "\\RepT | \n", "\\RepD | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
MELAYAH Marwa | \n", "8.0 | \n", "8.333333 | \n", "2.67 | \n", "\\RepD | \n", "\\RepU | \n", "4.67 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "NaN | \n", "NaN | \n", "0.00 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
MOALI Lauryn | \n", "20.0 | \n", "20.666667 | \n", "4.00 | \n", "\\RepD | \n", "\\RepT | \n", "5.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "\\RepT | \n", "6.67 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "
MONTAGNINI Cindy | \n", "16.0 | \n", "15.833333 | \n", "3.50 | \n", "1.5 | \n", "\\RepT | \n", "5.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "\\RepD | \n", "2.67 | \n", "\\RepD | \n", "\\RepT | \n", "NaN | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
NGO Viviane | \n", "14.0 | \n", "13.916667 | \n", "2.08 | \n", "0.75 | \n", "\\RepD | \n", "4.50 | \n", "\\RepT | \n", "\\RepD | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "NaN | \n", "3.67 | \n", "\\RepD | \n", "\\RepT | \n", "\\RepU | \n", "\\RepT | \n", "\\RepD | \n", "\\RepZ | \n", "NaN | \n", "
PEREIRA VAZ Luis Carlos | \n", "17.5 | \n", "17.250000 | \n", "2.58 | \n", "1.25 | \n", "\\RepD | \n", "5.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "\\RepT | \n", "4.67 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepZ | \n", "\\RepT | \n", "\\RepU | \n", "\\RepT | \n", "\\RepU | \n", "
QADIR Maryam | \n", "14.0 | \n", "14.333333 | \n", "4.00 | \n", "\\RepD | \n", "\\RepT | \n", "2.00 | \n", "\\RepD | \n", "\\RepD | \n", "NaN | \n", "NaN | \n", "... | \n", "\\RepU | \n", "\\RepZ | \n", "5.67 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "NaN | \n", "
SAIDANE Maissa | \n", "10.5 | \n", "10.583333 | \n", "3.25 | \n", "1.25 | \n", "\\RepT | \n", "5.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "NaN | \n", "0.00 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
SANTOS DO CARMO Kevin | \n", "12.0 | \n", "11.916667 | \n", "0.75 | \n", "0.75 | \n", "\\RepZ | \n", "4.50 | \n", "\\RepT | \n", "\\RepD | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepD | \n", "\\RepZ | \n", "3.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepZ | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
SILVA Andre Luis | \n", "15.0 | \n", "14.916667 | \n", "3.25 | \n", "1.25 | \n", "\\RepT | \n", "6.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "\\RepD | \n", "2.00 | \n", "\\RepT | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
STAUFF Léna | \n", "16.0 | \n", "15.666667 | \n", "2.67 | \n", "\\RepD | \n", "\\RepU | \n", "5.00 | \n", "\\RepT | \n", "\\RepT | \n", "\\RepD | \n", "\\RepT | \n", "... | \n", "\\RepT | \n", "\\RepT | \n", "3.00 | \n", "\\RepT | \n", "\\RepU | \n", "\\RepD | \n", "\\RepT | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
30 rows × 25 columns
\n", "