{ "cells": [ { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "There are 0 duplicated abbreviations.\n" ] }, { "data": { "text/plain": [ "'CSV and Excel files saved at felix_playground_SQA_Training/MS_IS_all_modules_cleaned.csv and felix_playground_SQA_Training/MS_IS_all_modules_cleaned.xlsx respectively.'" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "\n", "def clean_and_save(file_path):\n", " df = pd.read_excel(file_path)\n", " df = df.astype(str)\n", " df = df.replace('\\n', '', regex=True)\n", " df = df.replace(\"'\", '\"')\n", " df = df.replace(\"'\", \"\", regex=True)\n", " df = df.apply(lambda x: x.str.strip() if x.dtype == \"object\" else x)\n", " df = df.drop_duplicates()\n", " csv_file_path = file_path.replace(\".xlsx\", \"_cleaned.csv\")\n", " df.to_csv(csv_file_path, index=False)\n", " excel_file_path = file_path.replace(\".xlsx\", \"_cleaned.xlsx\")\n", " print(f\"There are {df.duplicated(subset=['Abbreviation']).sum()} duplicated abbreviations.\")\n", " df = df.drop_duplicates(subset=['Abbreviation'], keep='first')\n", " df.to_excel(excel_file_path, index=False)\n", " return f\"CSV and Excel files saved at {csv_file_path} and {excel_file_path} respectively.\"\n", "\n", "clean_and_save(\"felix_playground_SQA_Training/MS_IS_all_modules.xlsx\")" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "ename": "NameError", "evalue": "name 'pd' is not defined", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", "Cell \u001b[1;32mIn[1], line 29\u001b[0m\n\u001b[0;32m 25\u001b[0m training_data\u001b[39m.\u001b[39mto_excel(\u001b[39m'\u001b[39m\u001b[39mfelix_playground_SQA_Training/module_guide_sq_abbreviation.xlsx\u001b[39m\u001b[39m'\u001b[39m, index\u001b[39m=\u001b[39m\u001b[39mFalse\u001b[39;00m)\n\u001b[0;32m 27\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39m\"\u001b[39m\u001b[39mTraining data created and saved as \u001b[39m\u001b[39m'\u001b[39m\u001b[39mtraining_data.xlsx\u001b[39m\u001b[39m'\u001b[39m\u001b[39m.\u001b[39m\u001b[39m\"\u001b[39m\n\u001b[1;32m---> 29\u001b[0m create_training_data_abbreviation(\u001b[39m\"\u001b[39;49m\u001b[39mfelix_playground_SQA_Training/MS_IS_all_modules_cleaned.xlsx\u001b[39;49m\u001b[39m\"\u001b[39;49m)\n", "Cell \u001b[1;32mIn[1], line 5\u001b[0m, in \u001b[0;36mcreate_training_data_abbreviation\u001b[1;34m(file_path)\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mcreate_training_data_abbreviation\u001b[39m(file_path):\n\u001b[0;32m 4\u001b[0m \u001b[39m# Read the cleaned excel file\u001b[39;00m\n\u001b[1;32m----> 5\u001b[0m df \u001b[39m=\u001b[39m pd\u001b[39m.\u001b[39mread_excel(file_path)\n\u001b[0;32m 7\u001b[0m \u001b[39m# Create a new dataframe for training data\u001b[39;00m\n\u001b[0;32m 8\u001b[0m training_data \u001b[39m=\u001b[39m pd\u001b[39m.\u001b[39mDataFrame(columns\u001b[39m=\u001b[39m[\u001b[39m'\u001b[39m\u001b[39mid\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mannotator\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mposition\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mquestion\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mtable_file\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39manswer_coordinates\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m'\u001b[39m\u001b[39manswer_text\u001b[39m\u001b[39m'\u001b[39m])\n", "\u001b[1;31mNameError\u001b[0m: name 'pd' is not defined" ] } ], "source": [ "import random\n", "\n", "def create_training_data_abbreviation(file_path):\n", " # Read the cleaned excel file\n", " df = pd.read_excel(file_path)\n", " \n", " # Create a new dataframe for training data\n", " training_data = pd.DataFrame(columns=['id', 'annotator', 'position', 'question', 'table_file', 'answer_coordinates', 'answer_text'])\n", " \n", " # Define a list of possible question formulations\n", " \n", " \n", " for i, row in df.iterrows():\n", " new_row = {'id': f'ms-is-01', 'annotator': 0, 'position': 0, 'question': '', 'table_file': '', 'answer_coordinates': '', 'answer_text': ''}\n", " question_formulations = [ f\"What is the abbreviation of {row['Module title']}?\",f\"What is the code for {row['Module title']}?\",f\"What is the ID of {row['Module title']}?\",f\"What is the abbreviation of the module {row['Module title']}?\"]\n", " question = random.choice(question_formulations).format(row=row)\n", " new_row['question'] = question\n", " table_file = f\"felix_playground_SQA_Training/MS_IS_all_modules_cleaned.csv\"\n", " new_row['table_file'] = table_file\n", " answer_coordinates = f\"['({i}, {df.columns.get_loc('Abbreviation')})']\"\n", " new_row['answer_coordinates'] = answer_coordinates\n", " answer_text = f\"['{row['Abbreviation']}']\"\n", " new_row['answer_text'] = answer_text\n", " training_data = training_data.append(new_row, ignore_index=True)\n", " training_data.to_excel('felix_playground_SQA_Training/module_guide_sq_abbreviation.xlsx', index=False)\n", " \n", " return \"Training data created and saved as 'training_data.xlsx'.\"\n", "\n", "create_training_data_abbreviation(\"felix_playground_SQA_Training/MS_IS_all_modules_cleaned.xlsx\")\n" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\1598320022.py:55: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n" ] }, { "data": { "text/plain": [ "\"Training data created and saved as 'questions_content.xlsx'.\"" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def create_training_data_content(file_path):\n", " # Read the cleaned excel file\n", " df = pd.read_excel(file_path)\n", "\n", " # Create a new dataframe for training data\n", " training_data = pd.DataFrame(\n", " columns=[\n", " \"id\",\n", " \"annotator\",\n", " \"position\",\n", " \"question\",\n", " \"table_file\",\n", " \"answer_coordinates\",\n", " \"answer_text\",\n", " ]\n", " )\n", "\n", " # Define a list of possible question formulations\n", " for i, row in df.iterrows():\n", " # Create a new row for the training data\n", " new_row = {\n", " \"id\": f\"ms-is-01\",\n", " \"annotator\": 0,\n", " \"position\": 0,\n", " \"question\": \"\",\n", " \"table_file\": \"\",\n", " \"answer_coordinates\": \"\",\n", " \"answer_text\": \"\",\n", " }\n", "\n", " question_formulations = [\n", " f\"What is the content of {row['Module title']}?\",\n", " f\"What is the description of {row['Module title']}?\",\n", " f\"What is {row['Module title']} about?\",\n", " f\"Give me the content of {row['Module title']}?\",\n", " f\"Give me the content of the module {row['Module title']}? \",\n", " ]\n", "\n", " question = random.choice(question_formulations).format(row=row)\n", " new_row[\"question\"] = question\n", "\n", " # Set the table file\n", " table_file = f\"felix_playground_SQA_Training/MS_IS_all_modules_cleaned.csv\"\n", " new_row[\"table_file\"] = table_file\n", "\n", " # Set the answer coordinates\n", " answer_coordinates = f\"['({i}, {df.columns.get_loc('Contents')})']\"\n", " new_row[\"answer_coordinates\"] = answer_coordinates\n", "\n", " # Set the answer text\n", " answer_text = f\"['{row['Contents']}']\"\n", " new_row[\"answer_text\"] = answer_text\n", "\n", " # Append the new row to the training data\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "\n", " # Save the training data as an excel file\n", " training_data.to_excel(\"felix_playground_SQA_Training/module_guide_sqa_contents.xlsx\", index=False)\n", "\n", " return \"Training data created and saved as 'questions_content.xlsx'.\"\n", "\n", "create_training_data_content(\"felix_playground_SQA_Training/MS_IS_all_modules_cleaned.xlsx\")" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "C:\\Users\\FelixNeubauer\\AppData\\Local\\Temp\\ipykernel_19396\\3422203238.py:58: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", " training_data = training_data.append(new_row, ignore_index=True)\n" ] }, { "data": { "text/plain": [ "\"Training data created and saved as 'questions_ETCS.xlsx'.\"" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def create_training_data_ETCS(file_path):\n", " # Read the cleaned excel file\n", " df = pd.read_excel(file_path)\n", "\n", " # Create a new dataframe for training data\n", " training_data = pd.DataFrame(\n", " columns=[\n", " \"id\",\n", " \"annotator\",\n", " \"position\",\n", " \"question\",\n", " \"table_file\",\n", " \"answer_coordinates\",\n", " \"answer_text\",\n", " ]\n", " )\n", "\n", " # Define a list of possible question formulations\n", " for i, row in df.iterrows():\n", " # Create a new row for the training data\n", " new_row = {\n", " \"id\": f\"ms-is-01\",\n", " \"annotator\": 0,\n", " \"position\": 0,\n", " \"question\": \"\",\n", " \"table_file\": \"\",\n", " \"answer_coordinates\": \"\",\n", " \"answer_text\": \"\",\n", " }\n", " \n", " question_formulations = [\n", " f\"How many credits does {row['Module title']} have?\",\n", " f\"What is the credit value of {row['Module title']}?\",\n", " f\"how many credits do I get for {row['Module title']}?\",\n", " f\"How many etcs has {row['Module title']}?\",\n", " f\"how many credits has {row['Module title']} have?\",\n", " f\"hw many etcs does {row['Module title']} have?\",\n", " f\"Give me the amount of ects for {row['Module title']}?\",\n", " f\"give me the ects points of module {row['Module title']}? \",\n", " ]\n", "\n", " question = random.choice(question_formulations).format(row=row)\n", " new_row[\"question\"] = question\n", "\n", " # Set the table file\n", " table_file = f\"felix_playground_SQA_Training/MS_IS_all_modules_cleaned.csv\"\n", " new_row[\"table_file\"] = table_file\n", "\n", " # Set the answer coordinates\n", " answer_coordinates = f\"['({i}, {df.columns.get_loc('ETCS')})']\"\n", " new_row[\"answer_coordinates\"] = answer_coordinates\n", "\n", " # Set the answer text\n", " answer_text = f\"['{row['ETCS']}']\"\n", " new_row[\"answer_text\"] = answer_text\n", "\n", " # Append the new row to the training data\n", " training_data = training_data.append(new_row, ignore_index=True)\n", "\n", " # Save the training data as an excel file\n", " training_data.to_excel(\"felix_playground_SQA_Training/module_guide_sqa_etcs.xlsx\", index=False)\n", "\n", " return \"Training data created and saved as 'questions_ETCS.xlsx'.\"\n", "\n", "\n", "create_training_data_ETCS(\"felix_playground_SQA_Training/MS_IS_all_modules_cleaned.xlsx\")\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "enterpriseai2", "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.8.16" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }