{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import pandas as pd\n", "from opytex import texenv\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Informations sur le devoir" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "{'classe': '313', 'date': '18 septembre 2015', 'titre': 'DM 1'}" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ds_name = \"DM_15_09_18\"\n", "classe = \"313\"\n", "\n", "latex_info = {}\n", "latex_info['titre'] = \"DM 1\" \n", "latex_info['classe'] = \"313\"\n", "latex_info['date'] = \"18 septembre 2015\"\n", "latex_info" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Import et premiers traitements" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "ename": "AssertionError", "evalue": "", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mAssertionError\u001b[0m Traceback (most recent call last)", "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mnotes\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mExcelFile\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"./../../../313_.xlsx\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mnotes\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msheet_names\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mnotes\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnotes\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mparse\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mds_name\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;32m/home/lafrite/.virtualenvs/enseignement/lib/python3.4/site-packages/pandas/io/excel.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, io, **kwds)\u001b[0m\n\u001b[0;32m 186\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbook\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mxlrd\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mopen_workbook\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfile_contents\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 187\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 188\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbook\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mxlrd\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mopen_workbook\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mio\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 189\u001b[0m \u001b[1;32melif\u001b[0m \u001b[0mengine\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;34m'xlrd'\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mio\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mxlrd\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mBook\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 190\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbook\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mio\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;32m/home/lafrite/.virtualenvs/enseignement/lib/python3.4/site-packages/xlrd/__init__.py\u001b[0m in \u001b[0;36mopen_workbook\u001b[1;34m(filename, logfile, verbosity, use_mmap, file_contents, encoding_override, formatting_info, on_demand, ragged_rows)\u001b[0m\n\u001b[0;32m 414\u001b[0m \u001b[0mformatting_info\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mformatting_info\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 415\u001b[0m \u001b[0mon_demand\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mon_demand\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 416\u001b[1;33m \u001b[0mragged_rows\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mragged_rows\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 417\u001b[0m )\n\u001b[0;32m 418\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mbk\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;32m/home/lafrite/.virtualenvs/enseignement/lib/python3.4/site-packages/xlrd/xlsx.py\u001b[0m in \u001b[0;36mopen_workbook_2007_xml\u001b[1;34m(zf, component_names, logfile, verbosity, use_mmap, formatting_info, on_demand, ragged_rows)\u001b[0m\n\u001b[0;32m 789\u001b[0m \u001b[0mx12sheet\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mX12Sheet\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msheet\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlogfile\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mverbosity\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 790\u001b[0m \u001b[0mheading\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m\"Sheet %r (sheetx=%d) from %r\"\u001b[0m \u001b[1;33m%\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0msheet\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msheetx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mfname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 791\u001b[1;33m \u001b[0mx12sheet\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mprocess_stream\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mzflo\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mheading\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 792\u001b[0m \u001b[1;32mdel\u001b[0m \u001b[0mzflo\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 793\u001b[0m \u001b[0mcomments_fname\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'xl/comments%d.xml'\u001b[0m \u001b[1;33m%\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0msheetx\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;32m/home/lafrite/.virtualenvs/enseignement/lib/python3.4/site-packages/xlrd/xlsx.py\u001b[0m in \u001b[0;36mown_process_stream\u001b[1;34m(self, stream, heading)\u001b[0m\n\u001b[0;32m 529\u001b[0m \u001b[0melem\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mclear\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;31m# destroy all child elements (cells)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 530\u001b[0m \u001b[1;32melif\u001b[0m \u001b[0melem\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtag\u001b[0m \u001b[1;33m==\u001b[0m \u001b[0mU_SSML12\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;34m\"dimension\"\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 531\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdo_dimension\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0melem\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 532\u001b[0m \u001b[1;32melif\u001b[0m \u001b[0melem\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtag\u001b[0m \u001b[1;33m==\u001b[0m \u001b[0mU_SSML12\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;34m\"mergeCell\"\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 533\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdo_merge_cell\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0melem\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;32m/home/lafrite/.virtualenvs/enseignement/lib/python3.4/site-packages/xlrd/xlsx.py\u001b[0m in \u001b[0;36mdo_dimension\u001b[1;34m(self, elem)\u001b[0m\n\u001b[0;32m 563\u001b[0m \u001b[1;31m# print >> self.logfile, \"dimension: ref=%r\" % ref\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 564\u001b[0m \u001b[0mlast_cell_ref\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mref\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msplit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m':'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;31m# example: \"Z99\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 565\u001b[1;33m \u001b[0mrowx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcolx\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcell_name_to_rowx_colx\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlast_cell_ref\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 566\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msheet\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_dimnrows\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mrowx\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 567\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msheet\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_dimncols\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcolx\u001b[0m \u001b[1;33m+\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;32m/home/lafrite/.virtualenvs/enseignement/lib/python3.4/site-packages/xlrd/xlsx.py\u001b[0m in \u001b[0;36mcell_name_to_rowx_colx\u001b[1;34m(cell_name, letter_value)\u001b[0m\n\u001b[0;32m 87\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m \u001b[1;31m# start of row number; can't be '0'\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 88\u001b[0m \u001b[0mcolx\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcolx\u001b[0m \u001b[1;33m-\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 89\u001b[1;33m \u001b[1;32massert\u001b[0m \u001b[1;36m0\u001b[0m \u001b[1;33m<=\u001b[0m \u001b[0mcolx\u001b[0m \u001b[1;33m<\u001b[0m \u001b[0mX12_MAX_COLS\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 90\u001b[0m \u001b[1;32mbreak\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 91\u001b[0m \u001b[1;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;31mAssertionError\u001b[0m: " ] } ], "source": [ "notes = pd.ExcelFile(\"./../../../313_.xlsx\")\n", "notes.sheet_names\n", "notes = notes.parse(ds_name)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "ename": "NameError", "evalue": "name 'notes' is not defined", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mnotes\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mindex\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[1;31mNameError\u001b[0m: name 'notes' is not defined" ] } ], "source": [ "notes.index" ] }, { "cell_type": "code", "execution_count": 124, "metadata": { "collapsed": true }, "outputs": [], "source": [ "notes = notes.T" ] }, { "cell_type": "code", "execution_count": 125, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes = notes.drop('av_arrondi', axis=1)\n", "notes = notes.drop('num_sujet', axis=1)" ] }, { "cell_type": "code", "execution_count": 126, "metadata": { "collapsed": false }, "outputs": [], "source": [ "barem = notes[:1]\n", "notes = notes[1:]\n", "#notes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Supression des notes inutiles " ] }, { "cell_type": "code", "execution_count": 127, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes = notes[notes[ds_name].notnull()]\n", "notes = notes[notes[ds_name] != 'abs']" ] }, { "cell_type": "code", "execution_count": 128, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes = notes.astype(float)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Traitement des notes" ] }, { "cell_type": "code", "execution_count": 129, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "data": { "text/plain": [ "Index(['DM_0506', 'Malus', 'Exercice 1', '1.1.a', '1.1.b', '1.1.c', '1.2.a',\n", " '1.2.b', '1.2.c', '1.2.d', '1.3.a', '1.3.b', '1.3.c', '1.3.d',\n", " 'Exercice 2', '2.1', '2.2', '2.3', 'Exercice 3', '3.1.a', '3.1.b',\n", " '3.1.c', '3.1.d', '3.2.a', '3.2.b', '3.2.c', '3.2.d'],\n", " dtype='object')" ] }, "execution_count": 129, "metadata": {}, "output_type": "execute_result" } ], "source": [ "notes.T.index" ] }, { "cell_type": "code", "execution_count": 130, "metadata": { "collapsed": false }, "outputs": [], "source": [ "list_exo = [\"Exercice 1\", \"Exercice 2\", \"Exercice 3\"]" ] }, { "cell_type": "code", "execution_count": 131, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes[list_exo] = notes[list_exo].applymap(lambda x:round(x,2))\n", "#notes[list_exo]" ] }, { "cell_type": "code", "execution_count": 132, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "data": { "text/plain": [ "['1.1.a',\n", " '1.1.b',\n", " '1.1.c',\n", " '1.2.a',\n", " '1.2.b',\n", " '1.2.c',\n", " '1.2.d',\n", " '1.3.a',\n", " '1.3.b',\n", " '1.3.c',\n", " '1.3.d',\n", " '2.1',\n", " '2.2',\n", " '2.3',\n", " '3.1.a',\n", " '3.1.b',\n", " '3.1.c',\n", " '3.1.d',\n", " '3.2.a',\n", " '3.2.b',\n", " '3.2.c',\n", " '3.2.d']" ] }, "execution_count": 132, "metadata": {}, "output_type": "execute_result" } ], "source": [ "item_avec_note = list_exo + [ds_name, \"Malus\"]\n", "sous_exo = [i for i in notes.T.index if i not in item_avec_note]\n", "sous_exo" ] }, { "cell_type": "code", "execution_count": 133, "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": 134, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes[item_avec_note] = notes[item_avec_note].fillna(\".\")\n", "#notes" ] }, { "cell_type": "code", "execution_count": 135, "metadata": { "collapsed": true }, "outputs": [], "source": [ "eleves = notes.copy()\n", "eleves[sous_exo] = notes[sous_exo].applymap(toRepVal)" ] }, { "cell_type": "code", "execution_count": 136, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "27" ] }, "execution_count": 136, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(notes.T.index)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Preparation du fichier .tex" ] }, { "cell_type": "code", "execution_count": 157, "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 = eleves, barem = barem, ds_name = ds_name, latex_info = latex_info, nbr_questions = len(barem.T)))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Un peu de statistiques" ] }, { "cell_type": "code", "execution_count": 138, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "count 28.000000\n", "mean 14.696429\n", "std 5.894661\n", "min 0.000000\n", "25% 14.375000\n", "50% 16.500000\n", "75% 18.625000\n", "max 20.000000\n", "Name: DM_0506, dtype: float64" ] }, "execution_count": 138, "metadata": {}, "output_type": "execute_result" } ], "source": [ "notes[ds_name].describe()" ] }, { "cell_type": "code", "execution_count": 139, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 139, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAE8BJREFUeJzt3X+MZfdZ3/H3x15HIYSygkjbxLvVIMVB2ELsEslZOVSe\n9JfsVbvQKoJYioJTqVmVbmOlKgKkAOYv+CfUdXCdlXCypqpiRUEYB21IQrPjJqq0DsS7rJN1a4u4\n2IGskRxbSRYkL376x5yx71zfH+fOnpkz9/j9kkZzv+d8z7nPPHv2mTPPfO+dVBWSpGG4qu8AJEnd\nsahL0oBY1CVpQCzqkjQgFnVJGhCLuiQNSKuinuTqJI8m+cyU/XcneSLJuSSHug1RktRW2zv1O4Cv\nA69a1J7kCPDWqroO+ABwb3fhSZIWMbeoJ9kPHAF+F8iEKUeB+wGq6gywN8m+LoOUJLXT5k79vwC/\nCLw0Zf+1wNMj42eA/VcYlyRpC2YW9ST/Eni2qh5l8l36y1PHxr73gCT1YM+c/TcBR5u++euBf5Dk\n96rqfSNzvgkcGBnvb7ZtksRCL0lbUFWzbqo3Sds39EpyM/Cfq+pfjW0/AhyvqiNJDgN3VdXhCcfX\nIoFptiR3VtWdfccxBOayW+azvfWb3Xk1OAsV9Xl36uOqCeQYQFWdqKpTSY4keRL4HvD+Bc+prVnp\nO4ABWek7gIFZ6TuA17LWRb2qHgYebh6fGNt3vOO4JElb4CtKl9fJvgMYkJN9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L\nSY4DnwOuBu6rqgtJjjX7T1TVqSRHkjwJfA94/7ZHLUmaKFV2PCRpKHbkFaVtXsCkdpI8leTPkzya\n5JG+41k2ST6e5GKS8yPbfijJF5L83ySfT+Jy0Zam5PPOJM801+ijSW7pM8ZlkeRAktNJvpbksSQf\nbLYvdH1ue1Fv8wImLaSA1ao6VFU39h3MEvoE69fiqF8GvlBVbwP+ZzNWO5PyWcBvN9fooar64x7i\nWkYvAh+qqhuAw8B/aGrlQtfnTtypt3kBkxbjL523qKq+BHx7bPPLL6BrPv/Mjga1xKbkE7xGF1ZV\n36qqs83j7wIXWH8d0ELX504U9TYvYFJ7BfxJkj9N8u/6DmYg9o2s2LoI+IroK/cfm/eCus921uKa\nFYeHgDMseH3uRFH3N7HdemdVHQJuZf3Hs3/cd0BDUusrB7xmr8y9wI+w/v5Efw18pN9wlkuSNwK/\nD9xRVd8Z3dfm+tyJot7mBUxqqar+uvn8N8AfsN7e0pW5mOQfAiR5M/Bsz/Estap6thrA7+I12lqS\na1gv6P+9qh5sNi90fe5EUX/5BUxJXsf6C5ge2oHnHZwkb0jyA83j7wf+BXB+9lFq4SFg49W5Pw88\nOGOu5mgKz4Z/jddoK0kC3Ad8varuGtm10PW5I+vUk9wK3MUrL2D6zW1/0gFK8iOs353D+gvH/oe5\nXEySTwI3A29ivT/5a8AfAp8C/hHwFPCzVfV8XzEukwn5/HVglfXWSwHfAI5NepW5NkvyU8D/Av6c\nV1osvwI8wgLXpy8+kqQB8c/ZSdKAWNQlaUAs6pI0IBZ1SRoQi7okDYhFXZIGxKIuSQNiUZekAfn/\nRtJfj8QdO38AAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "notes_seules = notes[ds_name]\n", "notes_seules.hist(bins = (notes_seules.max() - notes_seules.min())*2)" ] }, { "cell_type": "code", "execution_count": 154, "metadata": { "collapsed": false }, "outputs": [], "source": [ "notes_questions = notes[sous_exo]\n", "notes_analysis = notes_questions.describe()" ] }, { "cell_type": "code", "execution_count": 155, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
1.1.a1.1.b1.1.c1.2.a1.2.b1.2.c1.2.d1.3.a1.3.b1.3.c...2.22.33.1.a3.1.b3.1.c3.1.d3.2.a3.2.b3.2.c3.2.d
count25252525NaNNaNNaN2525NaN...NaN25NaNNaNNaNNaNNaNNaNNaNNaN
\n", "

1 rows × 22 columns

\n", "
" ], "text/plain": [ " 1.1.a 1.1.b 1.1.c 1.2.a 1.2.b 1.2.c 1.2.d 1.3.a 1.3.b 1.3.c \\\n", "count 25 25 25 25 NaN NaN NaN 25 25 NaN \n", "\n", " ... 2.2 2.3 3.1.a 3.1.b 3.1.c 3.1.d 3.2.a 3.2.b 3.2.c 3.2.d \n", "count ... NaN 25 NaN NaN NaN NaN NaN NaN NaN NaN \n", "\n", "[1 rows x 22 columns]" ] }, "execution_count": 155, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# J'aimerai récupérer le nom des questions qui ont été le moins répondus\n", "notes_analysis[:1][notes_analysis[:1] == 25]" ] }, { "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.4.3" } }, "nbformat": 4, "nbformat_minor": 0 }