-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
326 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,326 @@ | ||
{ | ||
"nbformat": 4, | ||
"nbformat_minor": 0, | ||
"metadata": { | ||
"colab": { | ||
"provenance": [], | ||
"include_colab_link": true | ||
}, | ||
"kernelspec": { | ||
"name": "python3", | ||
"display_name": "Python 3" | ||
}, | ||
"language_info": { | ||
"name": "python" | ||
} | ||
}, | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "view-in-github", | ||
"colab_type": "text" | ||
}, | ||
"source": [ | ||
"<a href=\"https://colab.research.google.com/github/jeanprt/jeanprt.github.io/blob/main/colles/Colles.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"!pip install icalendar" | ||
], | ||
"metadata": { | ||
"id": "cWDBaoHm3pu8" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"# Test 3/12/2024 utiliser seulement une fonction avec le jeu de data en argument\n", | ||
"import pandas as pd\n", | ||
"from icalendar import Calendar, Event\n", | ||
"from datetime import datetime\n", | ||
"import io\n", | ||
"\n", | ||
"def pdc(data):\n", | ||
" \"\"\"\n", | ||
" In : data sous forme de jeux de données (Total = 4)\n", | ||
" Out : Fichier Ical format ics éditable en txt\n", | ||
" \"\"\"\n", | ||
"\n", | ||
" df = pd.read_csv(io.StringIO(data))\n", | ||
"\n", | ||
" # Créer un objet Calendrier\n", | ||
" cal = Calendar()\n", | ||
"\n", | ||
" # Définir la matière\n", | ||
" matiere = df.iloc[1,0].strip()\n", | ||
"\n", | ||
" # Parcourir les lignes du DataFrame à partir de la ligne 3 (index 2)\n", | ||
" for index, ligne in df.iloc[2:].iterrows():\n", | ||
" # Extraire les informations\n", | ||
" professeur = ligne.iloc[0].strip()\n", | ||
" info_date_heure = ligne.iloc[1]\n", | ||
" salle = ligne.iloc[2]\n", | ||
"\n", | ||
" # Parcourir les colonnes de dates à partir de la 4ème colonne (index 3)\n", | ||
" for i in range(3, len(df.columns)):\n", | ||
" semaine = df.columns[i]\n", | ||
" valeur = ligne.iloc[i]\n", | ||
"\n", | ||
" # Vérifier si la valeur est celle demandée\n", | ||
" if valeur == group:\n", | ||
" # Vérifier si la cellule contient le format attendu et n'est pas vide\n", | ||
" if isinstance(info_date_heure, str) and \" \" in info_date_heure:\n", | ||
" jour, horaire = info_date_heure.split(' ')\n", | ||
" heure_debut, heure_fin = horaire.split('-')\n", | ||
"\n", | ||
" # Calculer la date complète de l'événement\n", | ||
" # Calculer le jour relatif\n", | ||
" if jour == 'Lu':\n", | ||
" jour_semaine = 0\n", | ||
" elif jour == 'Ma':\n", | ||
" jour_semaine = 1\n", | ||
" elif jour == 'Me':\n", | ||
" jour_semaine = 2\n", | ||
" elif jour == 'Je':\n", | ||
" jour_semaine = 3\n", | ||
" elif jour == 'Ve':\n", | ||
" jour_semaine = 4\n", | ||
" # Calculer la date complete\n", | ||
" date_event = datetime.strptime(semaine, '%d/%m/%Y') + pd.DateOffset(days=jour_semaine)\n", | ||
"\n", | ||
" # Définir l'heure de début et de fin de l'événement\n", | ||
" heure_debut = int(heure_debut)\n", | ||
" heure_fin = int(heure_fin)\n", | ||
"\n", | ||
" # Créer un objet Événement\n", | ||
" event = Event()\n", | ||
" event.add('summary', f\"Colle {matiere} {professeur}\")\n", | ||
" event.add('location', salle)\n", | ||
" event.add('dtstart', datetime(date_event.year, date_event.month, date_event.day, heure_debut, 0))\n", | ||
" event.add('dtend', datetime(date_event.year, date_event.month, date_event.day, heure_fin, 0))\n", | ||
" cal.add_component(event)\n", | ||
"\n", | ||
" return (cal.to_ical())\n", | ||
"\n", | ||
"def savefile(nomfichier):\n", | ||
" \"\"\"\n", | ||
" In : filename\n", | ||
" Out : Ics file\n", | ||
" \"\"\"\n", | ||
" assert type(nomfichier) == str\n", | ||
" jeu1 = pdc('''\n", | ||
" ,horaire,salle,2/9/2024,9/9/2024,16/9/2024,23/9/2024,30/9/2024,7/10/2024,14/10/2024,,4/11/2024,11/11/2024,18/11/2024,25/11/2024,2/12/2024,9/12/2024,16/12/2024,,6/1/2025,13/1/2025,20/1/2025,27/1/2025,3/2/2025,10/2/2025,17/2/2025\n", | ||
" ,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
" Anglais,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
" Mme Tschudi,Lu 12-13,E02 E04,,,,1,2,3,4,,5,6,7,8,9,14,11,,12,13,14,1,2,3,2\n", | ||
" Mme Mc Grath,Lu 12-13,E20,,,,3,4,13,6,,7,8,9,10,11,12,7,,14,7,16,15,6,1,4\n", | ||
" Mme Mc Grath,Lu 13-14,E20,,,,5,12,1,14,,15,16,11,2,13,10,5,,8,1,2,3,4,5,6\n", | ||
" Mme Rébillon,Lu 13-14,E08 E10,,,,7,8,9,8,,9,4,3,14,15,16,13,,2,15,4,5,16,11,8\n", | ||
" M. Coquilhat,Lu 13-14,K08 K09,,,,9,10,5,12,,13,14,15,16,1,2,3,,16,11,6,7,8,9,10\n", | ||
" Mme Heikka,Lu 18-19,E01 E05,,,,15,14,11,16,,11,10,1,12,3,4,15,,6,3,10,9,10,15,12\n", | ||
" Mme Otéro,Ma 17-18,B21 B22,,,,13,6,15,10,,1,12,13,6,5,8,1,,4,9,8,13,12,7,14\n", | ||
" Mme Otéro,Ma 18-19,B21 B22,,,,11,16,7,2,,3,2,5,4,7,6,9,,10,5,12,11,14,13,16\n", | ||
" ''')\n", | ||
" jeu2 = pdc('''\n", | ||
" ,horaire,salle,2/9/2024,9/9/2024,16/9/2024,23/9/2024,30/9/2024,7/10/2024,14/10/2024,,4/11/2024,11/11/2024,18/11/2024,25/11/2024,2/12/2024,9/12/2024,16/12/2024,,6/1/2025,13/1/2025,20/1/2025,27/1/2025,3/2/2025,10/2/2025,17/2/2025\n", | ||
" ,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
" Maths,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
" M. Sautonie,Lu 12-13,E01,,,,,16,7,2,,11,10,5,6,7,4,9,,10,3,12,9,14,15,16\n", | ||
" M. Falconnet,Lu 13-14,F106,,,,,14,11,16,,1,2,1,12,5,6,15,,6,5,10,11,12,13,14\n", | ||
" Mme Plà,Ma 12-13,E01,,,,,8,1,14,,9,16,7,2,3,12,5,,14,7,8,13,4,3,12\n", | ||
" Mme Plà,Ma 13-14,E01,,,,,10,15,12,,5,14,15,10,1,8,3,,4,9,6,1,8,9,10\n", | ||
" M. Magniez,Ma 13-14,F103,,,,,6,5,10,,3,12,13,8,15,16,1,,2,11,4,5,16,1,2\n", | ||
" M. Sageaux,Ma 17-18,F205,,,,,4,13,8,,7,4,11,4,13,10,7,,16,13,2,15,10,5,4\n", | ||
" M. Raymond,Ma 18-19,E04,,,,,12,9,6,,15,8,9,16,11,14,13,,12,15,16,7,2,11,6\n", | ||
" Mme Deville,Je 17-18,B21,,,,,2,3,4,,13,6,3,14,9,2,11,,8,1,14,3,6,7,8\n", | ||
" ''')\n", | ||
" jeu3 = pdc('''\n", | ||
" ,horaire,salle,2/9/2024,9/9/2024,16/9/2024,23/9/2024,30/9/2024,7/10/2024,14/10/2024,,4/11/2024,11/11/2024,18/11/2024,25/11/2024,2/12/2024,9/12/2024,16/12/2024,,6/1/2025,13/1/2025,20/1/2025,27/1/2025,3/2/2025,10/2/2025,17/2/2025\n", | ||
" ,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
" SI,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
" Mme Pradier,Lu 12-13,B21,,,,2,11,4,3,,2,5,8,1,10,9,12,,11,8,13,16,15,2,11\n", | ||
" M. Lisle,Lu 12-13,Labo PT,,,,4,3,6,5,,8,7,10,15,8,11,6,,13,16,15,8,1,4,3\n", | ||
" Mme Pradier,Lu 13-14,B21,,,,6,5,2,7,,14,9,12,11,4,13,16,,15,2,1,12,3,6,5\n", | ||
" M. Boyer,Lu 13-14,Labo PT,,,,8,7,10,9,,12,11,4,13,16,7,2,,1,6,9,6,5,8,7\n", | ||
" M. Lisle,Ma 12-13,Labo PT,,,,16,9,12,11,,10,3,16,9,2,15,10,,3,14,5,4,7,10,15\n", | ||
" M. Deluche,Ma 18-19,Labo PT,,,,12,15,14,13,,16,15,6,7,14,3,14,,5,4,7,2,13,16,1\n", | ||
" M. Vallenet,Je 17-18,Labo PT,,,,14,13,16,15,,6,1,14,3,6,5,8,,7,12,11,14,11,14,13\n", | ||
" M. Deluche,Ve 13-14,Labo PT,,,,10,1,8,1,,4,13,2,5,12,1,4,,9,10,3,10,9,12,9\n", | ||
" ''')\n", | ||
" jeu4 = pdc('''\n", | ||
" ,horaire,salle,2/9/2024,9/9/2024,16/9/2024,23/9/2024,30/9/2024,7/10/2024,14/10/2024,,4/11/2024,11/11/2024,18/11/2024,25/11/2024,2/12/2024,9/12/2024,16/12/2024,,6/1/2025,13/1/2025,20/1/2025,27/1/2025,3/2/2025,10/2/2025,17/2/2025\n", | ||
" ,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
" Physique,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
" Mme Lefort,Lu 12-13,H105,,,,,15,8,1,,10,3,16,9,2,1,10,,9,4,11,14,13,16,15\n", | ||
" M. Raimi,Lu 12-13,H108,,,,,13,16,15,,6,1,14,3,6,5,8,,7,10,3,2,11,14,13\n", | ||
" M. Qadri,Lu 12-13,B23,,,,,9,14,13,,16,15,2,7,14,15,14,,3,14,7,10,9,12,1\n", | ||
" M. Scotto,Ma 17-18,H111,,,,,1,6,11,,4,13,10,5,12,7,4,,5,12,5,16,7,6,5\n", | ||
" Mme Lines,Me 17-18,H105,,,,,11,4,9,,8,11,4,15,4,11,6,,15,6,9,4,15,8,9\n", | ||
" M. Trollet,Me 18-19,H105,,,,,7,2,7,,14,5,12,11,16,13,16,,1,16,15,6,5,10,3\n", | ||
" M Fayolle,Ve 12-13,E102,,,,,3,12,5,,12,7,6,13,8,3,2,,13,2,1,8,1,4,7\n", | ||
" M Fanjeaux,Ve 12-13,H113,,,,,5,10,3,,2,9,8,1,10,9,12,,11,8,13,12,3,2,11\n", | ||
" ''')\n", | ||
" # Enregistrer le calendrier complet dans un fichier .ics (opération de sommation)\n", | ||
" with open(nomfichier, 'ab') as f:\n", | ||
" f.write(jeu1)\n", | ||
" f.write(jeu2)\n", | ||
" f.write(jeu3)\n", | ||
" f.write(jeu4)\n", | ||
" cleaner(nomfichier)\n", | ||
"\n", | ||
"def cleaner(nomfichier):\n", | ||
" \"\"\"\n", | ||
" In : Fichier Ical Global après sommation\n", | ||
" Out : Fichier Ical fonctionnel et prêt\n", | ||
" \"\"\"\n", | ||
" # Read the file and filter lines\n", | ||
" with open(nomfichier, 'r') as f:\n", | ||
" lines = f.readlines()\n", | ||
"\n", | ||
" # Remove unwanted lines\n", | ||
" filtered_lines = [line for line in lines if line.strip() not in (\"BEGIN:VCALENDAR\", \"END:VCALENDAR\")]\n", | ||
"\n", | ||
" # Add BEGIN:VCALENDAR and END:VCALENDAR\n", | ||
" filtered_lines.insert(0, \"BEGIN:VCALENDAR\\n\") # Add to the beginning\n", | ||
" filtered_lines.append(\"END:VCALENDAR\\n\") # Add to the end\n", | ||
"\n", | ||
" # Write the modified lines back to the file\n", | ||
" with open(nomfichier, 'w') as f:\n", | ||
" f.writelines(filtered_lines)\n", | ||
"\n", | ||
"def export():\n", | ||
" \"\"\"\n", | ||
" In : none\n", | ||
" Out : none, envoi les fichiers vers le bon répertoire, et séparément\n", | ||
" \"\"\"\n", | ||
" global group\n", | ||
" group = 1\n", | ||
" for i in range(1,17):\n", | ||
" group = i\n", | ||
" savefile(f\"../Documents/Cours lycée/Archive/Première 2022:2023/NSI/jeanprt.github.io/colles/Colles groupe {round(group)}.ics\")\n", | ||
" print(\"success\")\n", | ||
"\"\"\"\n", | ||
"def run(groupe):\n", | ||
" global group\n", | ||
" group = groupe\n", | ||
" savefile(f\"Colles/Colles groupe {round(group)}.ics\")\n", | ||
" print(\"success\")\n", | ||
"run(14)\n", | ||
"\"\"\"\n", | ||
"export()" | ||
], | ||
"metadata": { | ||
"colab": { | ||
"base_uri": "https://localhost:8080/", | ||
"height": 401 | ||
}, | ||
"id": "8TRLy8I83Zwy", | ||
"outputId": "5d641f84-c95f-4991-d2dc-047b73b2be34" | ||
}, | ||
"execution_count": null, | ||
"outputs": [ | ||
{ | ||
"output_type": "error", | ||
"ename": "ModuleNotFoundError", | ||
"evalue": "No module named 'icalendar'", | ||
"traceback": [ | ||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | ||
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", | ||
"\u001b[0;32m<ipython-input-1-cde4553cd390>\u001b[0m in \u001b[0;36m<cell line: 3>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# Test 3/12/2024 utiliser seulement une fonction avec le jeu de data en argument\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0micalendar\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mCalendar\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mEvent\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mdatetime\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mio\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | ||
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'icalendar'", | ||
"", | ||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0;32m\nNOTE: If your import is failing due to a missing package, you can\nmanually install dependencies using either !pip or !apt.\n\nTo view examples of installing some common dependencies, click the\n\"Open Examples\" button below.\n\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n" | ||
], | ||
"errorDetails": { | ||
"actions": [ | ||
{ | ||
"action": "open_url", | ||
"actionText": "Open Examples", | ||
"url": "/notebooks/snippets/importing_libraries.ipynb" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"import io\n", | ||
"import pandas as pd\n", | ||
"pd.read_csv(io.StringIO('''\n", | ||
",semaines,1,2,3,4,5,6,7,,8,9,10,11,12,13,14,,15,16,17,18,19,20,21,,22,23,24,25,26,27,,28,29,30,31,32,33,34,35\n", | ||
",horaire,salle,2/9/2024,9/9/2024,16/9/2024,23/9/2024,30/9/2024,7/10/2024,14/10/2024,,4/11/2024,11/11/2024,18/11/2024,25/11/2024,2/12/2024,9/12/2024,16/12/2024,,6/1/2025,13/1/2025,20/1/2025,27/1/2025,3/2/2025,10/2/2025,17/2/2025,,10/3/2025,17/3/2025,24/3/2025,31/3/2025,7/4/2024,14/4/2025,,5/5/2025,12/5/2025,19/5/2025,26/5/2025,2/6/2025,9/6/2025,16/6/2025,23/6/2025\n", | ||
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
"Anglais,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
"Mme Tschudi,Lu 12-13,E02 E04,,,,1,2,3,4,,5,6,7,8,9,14,11,,12,13,14,1,2,3,2,,1,2,3,4,5,6,,7,,9,14,11,12,,\n", | ||
"Mme Mc Grath,Lu 12-13,E20,,,,3,4,13,6,,7,8,9,10,11,12,7,,14,7,16,15,6,1,4,,3,4,13,6,7,,,9,10,11,12,7,14,,\n", | ||
"Mme Mc Grath,Lu 13-14,E20,,,,5,12,1,14,,15,16,11,2,13,10,5,,,1,2,3,4,5,6,,5,,1,14,15,16,,11,2,13,10,5,,,\n", | ||
"Mme Rébillon,Lu 13-14,E08 E10,,,,7,8,9,8,,9,4,3,14,15,16,13,,2,15,4,5,16,11,,,7,12,9,,9,4,,3,14,15,16,13,2,,\n", | ||
"M. Coquilhat,Lu 13-14,K08 K09,,,,9,10,5,12,,13,14,15,16,1,2,3,,16,11,6,7,,9,10,,9,10,5,12,13,14,,15,16,1,2,3,16,,\n", | ||
"Mme Heikka,Lu 18-19,E01 E05,,,,15,14,11,16,,11,10,1,12,3,4,15,,6,3,10,9,10,15,12,,15,14,11,16,11,10,,1,12,3,4,15,6,,\n", | ||
"Mme Otéro,Ma 17-18,B21 B22,,,,13,6,15,10,,1,12,13,6,5,8,1,,4,9,,13,12,7,14,,13,6,15,10,1,12,,13,6,5,,1,4,,\n", | ||
"Mme Otéro,Ma 18-19,B21 B22,,,,11,16,7,2,,3,2,5,4,7,6,9,,10,5,12,11,14,13,16,,11,16,7,2,3,2,,5,4,7,6,9,10,,\n", | ||
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
"Maths,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
"M. Sautonie,Lu 12-13,E01,,,,15,16,7,2,,11,10,5,6,7,4,9,,10,3,12,9,14,15,16,,15,16,7,2,11,10,,5,6,7,4,9,,,\n", | ||
"M. Falconnet,Lu 13-14,F106,,,,5,14,11,16,,1,2,1,12,5,6,15,,6,5,10,11,12,13,14,,5,14,11,16,1,2,,1,12,5,6,15,,,\n", | ||
"Mme Plà,Ma 12-13,E01,,,,11,8,1,14,,9,16,7,2,3,12,5,,14,7,,13,4,3,12,,11,,1,14,9,16,,7,2,3,12,5,,,\n", | ||
"Mme Plà,Ma 13-14,E01,,,,9,10,15,12,,5,14,15,10,1,8,3,,4,9,6,1,,9,10,,9,10,15,12,5,14,,15,10,1,,3,,,\n", | ||
"M. Magniez,Ma 13-14,F103,,,,7,6,5,10,,3,12,13,8,15,16,1,,2,11,4,5,16,1,2,,7,6,5,10,3,12,,13,,15,16,1,,,\n", | ||
"M. Sageaux,Ma 17-18,F205,,,,13,4,13,8,,7,4,11,4,13,10,7,,16,13,2,15,10,5,4,,13,4,13,,7,4,,11,4,13,10,7,,,\n", | ||
"M. Raymond,Ma 18-19,E04,,,,3,12,9,6,,15,8,9,16,11,14,13,,12,15,16,7,2,11,6,,3,12,9,6,15,,,9,16,11,14,13,,,\n", | ||
"Mme Deville,Je 17-18,B21,,,,1,2,3,4,,13,6,3,14,9,2,11,,,1,14,3,6,7,,,1,2,3,4,13,6,,3,14,9,2,11,,,\n", | ||
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
"SI,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
"Mme Pradier,Lu 12-13,B21,,,,2,11,4,3,,2,5,8,1,10,9,12,,11,,13,16,15,2,11,,2,11,4,3,2,5,,,1,10,9,12,11,,\n", | ||
"M. Lisle,Lu 12-13,Labo PT,,,,4,3,6,5,,8,7,10,15,8,11,6,,13,16,15,,1,4,3,,4,3,6,5,,7,,10,15,,11,6,13,,\n", | ||
"Mme Pradier,Lu 13-14,B21,,,,6,5,2,7,,14,9,12,11,4,13,16,,15,2,1,12,3,6,5,,,5,2,7,14,9,,12,11,4,13,16,15,,\n", | ||
"M. Boyer,Lu 13-14,Labo PT,,,,8,7,10,9,,12,11,4,13,16,7,2,,1,6,9,6,5,,7,,6,7,10,9,12,11,,4,13,16,7,2,1,,\n", | ||
"M. Lisle,Ma 12-13,Labo PT,,,,16,9,12,11,,10,3,16,9,2,15,10,,3,14,5,4,7,10,15,,16,9,12,11,10,3,,16,9,2,15,10,3,,\n", | ||
"M. Deluche,Ma 18-19,Labo PT,,,,12,15,14,13,,16,15,6,7,14,3,14,,5,4,7,2,13,16,1,,12,15,14,13,16,15,,6,7,14,3,14,5,,\n", | ||
"M. Vallenet,Je 17-18,Labo PT,,,,14,13,16,15,,6,1,14,3,6,5,8,,7,12,11,14,11,14,13,,14,13,16,15,6,1,,14,3,6,5,,7,,\n", | ||
"M. Deluche,Ve 13-14,Labo PT,,,,10,1,8,1,,4,13,2,5,12,1,4,,9,10,3,10,9,12,9,,10,1,,1,4,13,,2,5,12,1,4,9,,\n", | ||
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
"Physique,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,\n", | ||
"Mme Lefort,Lu 12-13,H105,,,,16,15,8,1,,10,3,16,9,2,1,10,,9,4,11,14,13,16,1,,14,15,,1,16,3,,14,9,2,1,10,9,,\n", | ||
"M. Raimi,Lu 12-13,H108,,,,14,13,16,15,,6,1,14,3,6,5,8,,7,10,3,2,11,14,15,,12,13,16,15,6,1,,16,3,14,5,,7,,\n", | ||
"M. Qadri,Lu 12-13,B23,,,,12,9,14,13,,16,15,2,7,14,15,14,,3,14,7,10,9,12,13,,16,9,14,13,10,15,,2,7,6,15,14,3,,\n", | ||
"M. Scotto,Ma 17-18,H111,,,,10,1,6,11,,4,13,10,5,12,7,4,,5,12,5,16,7,6,5,,10,1,4,11,4,13,,10,5,12,7,4,5,,\n", | ||
"Mme Lines,Me 17-18,H105,,,,8,11,4,9,,8,11,4,15,4,11,6,,15,6,9,4,15,,9,,6,11,6,9,,11,,4,15,4,11,6,15,,\n", | ||
"M. Trollet,Me 18-19,H105,,,,6,7,2,7,,14,5,12,11,16,13,16,,1,16,15,6,5,10,3,,,7,2,5,14,5,,12,11,16,13,16,1,,\n", | ||
"M Fayolle,Ve 12-13,E102,,,,4,3,12,5,,12,7,6,13,8,3,2,,13,2,1,,1,4,7,,2,3,12,7,12,7,,6,13,,3,2,13,,\n", | ||
"M Fanjeaux,Ve 12-13,H113,,,,2,5,10,3,,2,9,8,1,10,9,12,,11,,13,12,3,2,11,,4,5,10,3,2,9,,,1,10,9,12,11,,\n", | ||
",,,,,,,,,,,,,,\n", | ||
"\n", | ||
"'''" | ||
], | ||
"metadata": { | ||
"id": "BGd3lpQXBIHC" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"import io\n", | ||
"import pandas as pd\n", | ||
"pd.read_csv(io.StringIO('''\n", | ||
"semaines,1,2,3,4,5,6,7,,8,9,10,11,12,13,14,,15,16,17\n", | ||
"horaire,salle,2/9/2024,9/9/2024,16/9/2024,23/9/2024,30/9/2024,7/10/2024,14/10/2024,,4/11/2024,11/11/2024,18/11/2024,25/11/2024,2/12/2024,9/12/2024,16/12/2024,,6/1/2025,13/1/2025,20/1/2025\n", | ||
"'''), header=None)\n" | ||
], | ||
"metadata": { | ||
"id": "fomwhHdlCkUA" | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
} | ||
] | ||
} |