{
"cells": [
{
"cell_type": "code",
"execution_count": 44,
"id": "218a9395",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Excel file loaded successfully!\n"
]
}
],
"source": [
"import pandas as pd\n",
"\n",
"# Define the file path\n",
"file_path = 'P29/preSession_data (8).xlsx'\n",
"\n",
"# Load the Excel file into a DataFrame\n",
"try:\n",
" # Reading the Excel file\n",
" pre_p29 = pd.read_excel(file_path)\n",
" print(\"Excel file loaded successfully!\")\n",
" \n",
"except FileNotFoundError:\n",
" print(\"Error: File not found. Please check the file path.\")\n",
"except Exception as e:\n",
" print(f\"An error occurred: {e}\")\n"
]
},
{
"cell_type": "code",
"execution_count": 45,
"id": "c9fe2891",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Excel file loaded successfully!\n"
]
}
],
"source": [
"import pandas as pd\n",
"\n",
"# Define the file path\n",
"file_path = 'P29/postSession_data (2).xlsx'\n",
"\n",
"# Load the Excel file into a DataFrame\n",
"try:\n",
" # Reading the Excel file\n",
" post_p29 = pd.read_excel(file_path)\n",
" print(\"Excel file loaded successfully!\")\n",
" \n",
"except FileNotFoundError:\n",
" print(\"Error: File not found. Please check the file path.\")\n",
"except Exception as e:\n",
" print(f\"An error occurred: {e}\")\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "2570751d",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p1 | \n",
" | \n",
" \"p1_1734385793170\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi, How are you doin... | \n",
" 0.161765 | \n",
" [\"request_chitchat_faring\",\"ack_unknown_empath... | \n",
"
\n",
" \n",
" 1 | \n",
" p1 | \n",
" coB | \n",
" \"p1_1734385793170\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi, How are you doin... | \n",
" 0.161765 | \n",
" [\"request_chitchat_faring\",\"ack_unknown_empath... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p1 \"p1_1734385793170\" \n",
"1 p1 coB \"p1_1734385793170\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hi, How are you doin... 0.161765 \n",
"1 [{\"sender\":\"user\",\"text\":\"Hi, How are you doin... 0.161765 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"ack_unknown_empath... \n",
"1 [\"request_chitchat_faring\",\"ack_unknown_empath... "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p1"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "8a4617e7",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p1 | \n",
" \"p1_1734386397538\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi dear how are you ... | \n",
" {} | \n",
" [\"request_chitchat_faring\",\"request_chitchat_g... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p1 \"p1_1734386397538\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hi dear how are you ... {} \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"request_chitchat_g... "
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p1"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "761ce08d",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P3 | \n",
" coB | \n",
" \"P3_1734675286807\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello!\"},{\"sender\":\"... | \n",
" 0.102941 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P3 coB \"P3_1734675286807\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello!\"},{\"sender\":\"... 0.102941 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p3"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "9091a962",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P3 | \n",
" \"P3_1734676788189\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... | \n",
" 0.132353 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P3 \"P3_1734676788189\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... 0.132353 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p3"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "f9fd8620",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P5 | \n",
" coB | \n",
" \"P5_1734620986362\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello, what can I do... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P5 coB \"P5_1734620986362\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello, what can I do... 0.161765 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p5"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "6b722123",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P5 | \n",
" \"P5_1734622482820\" | \n",
" [{\"sender\":\"user\",\"text\":\"How do you feel afte... | \n",
" 0.117647 | \n",
" [\"request_chitchat_faring\",\"request_goal_howkt... | \n",
"
\n",
" \n",
" 1 | \n",
" P5 | \n",
" \"P5_1734622710507\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello whats your nam... | \n",
" 0.338235 | \n",
" [\"request_chitchat_faring\",\"request_goal_howkt... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P5 \"P5_1734622482820\" \n",
"1 P5 \"P5_1734622710507\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"How do you feel afte... 0.117647 \n",
"1 [{\"sender\":\"user\",\"text\":\"Hello whats your nam... 0.338235 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"request_goal_howkt... \n",
"1 [\"request_chitchat_faring\",\"request_goal_howkt... "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p5"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "252f2dc2",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P9 | \n",
" coB | \n",
" \"P9_1734478581870\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello \"},{\"sender\":\"... | \n",
" 0.205882 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P9 coB \"P9_1734478581870\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello \"},{\"sender\":\"... 0.205882 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p9"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "ae302c10",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P9 | \n",
" \"P9_1734480595276\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.235294 | \n",
" [\"request_chitchat_greeting\",\"request_goal_wha... | \n",
"
\n",
" \n",
" 1 | \n",
" P9 | \n",
" \"P9_1734480767822\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.470588 | \n",
" [\"request_chitchat_greeting\",\"request_goal_wha... | \n",
"
\n",
" \n",
" 2 | \n",
" P9 | \n",
" \"P9_1734480767822\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.705882 | \n",
" [\"request_chitchat_greeting\",\"request_goal_wha... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P9 \"P9_1734480595276\" \n",
"1 P9 \"P9_1734480767822\" \n",
"2 P9 \"P9_1734480767822\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.235294 \n",
"1 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.470588 \n",
"2 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.705882 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_goal_wha... \n",
"1 [\"request_chitchat_greeting\",\"request_goal_wha... \n",
"2 [\"request_chitchat_greeting\",\"request_goal_wha... "
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p9"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "54443b7f",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p11 | \n",
" coB | \n",
" \"p11_1734598722506\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi Lilobot\"},{\"sende... | \n",
" 0.132353 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p11 coB \"p11_1734598722506\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hi Lilobot\"},{\"sende... 0.132353 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p11"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "39929311",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p11 | \n",
" \"p11_1734600413293\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p11 \"p11_1734600413293\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.161765 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p11"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "fa8b4ae8",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P13 | \n",
" coB | \n",
" \"P13_1734601382284\" | \n",
" [{\"sender\":\"user\",\"text\":\"Goodmorning\"},{\"send... | \n",
" 0.132353 | \n",
" [\"request_chitchat_faring\",\"confirm_chitchat_q... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P13 coB \"P13_1734601382284\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Goodmorning\"},{\"send... 0.132353 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"confirm_chitchat_q... "
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p13"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "7f9bc166",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P13 | \n",
" \"P13_1734603079846\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.220588 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" P13 | \n",
" \"P13_1734603329018\" | \n",
" [{\"sender\":\"user\",\"text\":\"Goodmorning\"},{\"send... | \n",
" 0.441176 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P13 \"P13_1734603079846\" \n",
"1 P13 \"P13_1734603329018\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.220588 \n",
"1 [{\"sender\":\"user\",\"text\":\"Goodmorning\"},{\"send... 0.441176 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p13"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "e9d58f4b",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P15 | \n",
" | \n",
" \"P15_1734633656351\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... | \n",
" 0.191176 | \n",
" [\"request_chitchat_greeting\",\"trigger_unknown_... | \n",
"
\n",
" \n",
" 1 | \n",
" P15 | \n",
" | \n",
" \"P15_1734633656351\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... | \n",
" 0.382353 | \n",
" [\"request_chitchat_greeting\",\"trigger_unknown_... | \n",
"
\n",
" \n",
" 2 | \n",
" P15 | \n",
" | \n",
" \"P15_1734633656351\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... | \n",
" 0.573529 | \n",
" [\"request_chitchat_greeting\",\"trigger_unknown_... | \n",
"
\n",
" \n",
" 3 | \n",
" P15 | \n",
" | \n",
" \"P15_1734633656351\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... | \n",
" 0.764706 | \n",
" [\"request_chitchat_greeting\",\"trigger_unknown_... | \n",
"
\n",
" \n",
" 4 | \n",
" P15 | \n",
" | \n",
" \"P15_1734633656351\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... | \n",
" 0.955882 | \n",
" [\"request_chitchat_greeting\",\"trigger_unknown_... | \n",
"
\n",
" \n",
" 5 | \n",
" P15 | \n",
" coB | \n",
" \"P15_1734633656351\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... | \n",
" 1.147059 | \n",
" [\"request_chitchat_greeting\",\"trigger_unknown_... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P15 \"P15_1734633656351\" \n",
"1 P15 \"P15_1734633656351\" \n",
"2 P15 \"P15_1734633656351\" \n",
"3 P15 \"P15_1734633656351\" \n",
"4 P15 \"P15_1734633656351\" \n",
"5 P15 coB \"P15_1734633656351\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... 0.191176 \n",
"1 [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... 0.382353 \n",
"2 [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... 0.573529 \n",
"3 [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... 0.764706 \n",
"4 [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... 0.955882 \n",
"5 [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... 1.147059 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"trigger_unknown_... \n",
"1 [\"request_chitchat_greeting\",\"trigger_unknown_... \n",
"2 [\"request_chitchat_greeting\",\"trigger_unknown_... \n",
"3 [\"request_chitchat_greeting\",\"trigger_unknown_... \n",
"4 [\"request_chitchat_greeting\",\"trigger_unknown_... \n",
"5 [\"request_chitchat_greeting\",\"trigger_unknown_... "
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p15"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "9dd06cfe",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P15 | \n",
" \"P15_1734635243737\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... | \n",
" 0.25 | \n",
" [\"request_chitchat_greeting\",\"trigger_unknown_... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P15 \"P15_1734635243737\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... 0.25 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"trigger_unknown_... "
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p15"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "d601fced",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p23 | \n",
" | \n",
" \"p23_1734790447574\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi, what happened? \"... | \n",
" 0.161765 | \n",
" [\"trigger_unknown_what\",\"request_unknown_detai... | \n",
"
\n",
" \n",
" 1 | \n",
" p23 | \n",
" coB | \n",
" \"p23_1734790447574\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi, what happened? \"... | \n",
" 0.323529 | \n",
" [\"trigger_unknown_what\",\"request_unknown_detai... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p23 \"p23_1734790447574\" \n",
"1 p23 coB \"p23_1734790447574\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hi, what happened? \"... 0.161765 \n",
"1 [{\"sender\":\"user\",\"text\":\"Hi, what happened? \"... 0.323529 \n",
"\n",
" Used Intents \n",
"0 [\"trigger_unknown_what\",\"request_unknown_detai... \n",
"1 [\"trigger_unknown_what\",\"request_unknown_detai... "
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p23"
]
},
{
"cell_type": "code",
"execution_count": 33,
"id": "770eb6f3",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p23 | \n",
" \"p23_1734791927674\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi, how are you?\"},{... | \n",
" 0.132353 | \n",
" [\"request_chitchat_faring\",\"trigger_unknown_wh... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p23 \"p23_1734791927674\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi, how are you?\"},{... 0.132353 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"trigger_unknown_wh... "
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p23"
]
},
{
"cell_type": "code",
"execution_count": 36,
"id": "47122789",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p25 | \n",
" coB | \n",
" \"p25_1734423417519\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... | \n",
" {} | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p25 coB \"p25_1734423417519\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... {} \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p25"
]
},
{
"cell_type": "code",
"execution_count": 37,
"id": "ca571dd6",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p25 | \n",
" \"p25_1734423937777\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hallo\"},{\"sender\":\"b... | \n",
" {} | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p25 \"p25_1734423937777\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hallo\"},{\"sender\":\"b... {} \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p25"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "deb0e810",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p12 | \n",
" \"p12_1734549202097\" | \n",
" [{\"sender\":\"user\",\"text\":\"hI\"},{\"sender\":\"bot\"... | \n",
" {} | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p12 \"p12_1734549202097\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hI\"},{\"sender\":\"bot\"... {} \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p27"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "d774ab72",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p12 | \n",
" \"p12_1734550336693\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... | \n",
" 0.220588 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p12 \"p12_1734550336693\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... 0.220588 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p27"
]
},
{
"cell_type": "code",
"execution_count": 46,
"id": "461060e3",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p39 | \n",
" coB | \n",
" \"p39_1734682181767\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... | \n",
" 0.191176 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p39 coB \"p39_1734682181767\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... 0.191176 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p29"
]
},
{
"cell_type": "code",
"execution_count": 47,
"id": "10196d51",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p39 | \n",
" \"p39_1734684519962\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey good morning tim... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p39 \"p39_1734684519962\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hey good morning tim... 0.161765 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p29"
]
},
{
"cell_type": "code",
"execution_count": 48,
"id": "cf95c55c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.1617647058823529"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per1 = pre_p1[\"Performance Data\"].mean()\n",
"average_per1"
]
},
{
"cell_type": "code",
"execution_count": 49,
"id": "618c5dc3",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.6691176470588234"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per15 = pre_p15[\"Performance Data\"].mean()\n",
"average_per15"
]
},
{
"cell_type": "code",
"execution_count": 50,
"id": "dd2882c3",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.24264705882352938"
]
},
"execution_count": 50,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per23 = pre_p23[\"Performance Data\"].mean()\n",
"average_per23"
]
},
{
"cell_type": "code",
"execution_count": 51,
"id": "29208856",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P3 | \n",
" coB | \n",
" \"P3_1734675286807\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello!\"},{\"sender\":\"... | \n",
" 0.102941 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" P5 | \n",
" coB | \n",
" \"P5_1734620986362\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello, what can I do... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 2 | \n",
" P9 | \n",
" coB | \n",
" \"P9_1734478581870\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello \"},{\"sender\":\"... | \n",
" 0.205882 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 3 | \n",
" p11 | \n",
" coB | \n",
" \"p11_1734598722506\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi Lilobot\"},{\"sende... | \n",
" 0.132353 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 4 | \n",
" P13 | \n",
" coB | \n",
" \"P13_1734601382284\" | \n",
" [{\"sender\":\"user\",\"text\":\"Goodmorning\"},{\"send... | \n",
" 0.132353 | \n",
" [\"request_chitchat_faring\",\"confirm_chitchat_q... | \n",
"
\n",
" \n",
" 5 | \n",
" p25 | \n",
" coB | \n",
" \"p25_1734423417519\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... | \n",
" {} | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 6 | \n",
" p12 | \n",
" NaN | \n",
" \"p12_1734549202097\" | \n",
" [{\"sender\":\"user\",\"text\":\"hI\"},{\"sender\":\"bot\"... | \n",
" {} | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 7 | \n",
" p39 | \n",
" coB | \n",
" \"p39_1734682181767\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... | \n",
" 0.191176 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P3 coB \"P3_1734675286807\" \n",
"1 P5 coB \"P5_1734620986362\" \n",
"2 P9 coB \"P9_1734478581870\" \n",
"3 p11 coB \"p11_1734598722506\" \n",
"4 P13 coB \"P13_1734601382284\" \n",
"5 p25 coB \"p25_1734423417519\" \n",
"6 p12 NaN \"p12_1734549202097\" \n",
"7 p39 coB \"p39_1734682181767\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello!\"},{\"sender\":\"... 0.102941 \n",
"1 [{\"sender\":\"user\",\"text\":\"Hello, what can I do... 0.161765 \n",
"2 [{\"sender\":\"user\",\"text\":\"Hello \"},{\"sender\":\"... 0.205882 \n",
"3 [{\"sender\":\"user\",\"text\":\"Hi Lilobot\"},{\"sende... 0.132353 \n",
"4 [{\"sender\":\"user\",\"text\":\"Goodmorning\"},{\"send... 0.132353 \n",
"5 [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... {} \n",
"6 [{\"sender\":\"user\",\"text\":\"hI\"},{\"sender\":\"bot\"... {} \n",
"7 [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... 0.191176 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"2 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"3 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"4 [\"request_chitchat_faring\",\"confirm_chitchat_q... \n",
"5 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"6 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"7 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Example: Datasets to merge\n",
"datasets = [pre_p3, pre_p5, pre_p9, pre_p11, pre_p13, pre_p25, pre_p27, pre_p29 ]\n",
"\n",
"# Merge datasets vertically\n",
"merged_data = pd.concat(datasets, axis=0, ignore_index=True)\n",
"merged_data"
]
},
{
"cell_type": "code",
"execution_count": 52,
"id": "0b0b41a9",
"metadata": {},
"outputs": [],
"source": [
"merged_data.loc[5, \"Performance Data\"] = 0"
]
},
{
"cell_type": "code",
"execution_count": 53,
"id": "f83e8823",
"metadata": {},
"outputs": [],
"source": [
"merged_data.loc[6, \"Performance Data\"] = 0"
]
},
{
"cell_type": "code",
"execution_count": 54,
"id": "605039f4",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Condition | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P3 | \n",
" coB | \n",
" \"P3_1734675286807\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello!\"},{\"sender\":\"... | \n",
" 0.102941 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" P5 | \n",
" coB | \n",
" \"P5_1734620986362\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello, what can I do... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 2 | \n",
" P9 | \n",
" coB | \n",
" \"P9_1734478581870\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello \"},{\"sender\":\"... | \n",
" 0.205882 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 3 | \n",
" p11 | \n",
" coB | \n",
" \"p11_1734598722506\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi Lilobot\"},{\"sende... | \n",
" 0.132353 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 4 | \n",
" P13 | \n",
" coB | \n",
" \"P13_1734601382284\" | \n",
" [{\"sender\":\"user\",\"text\":\"Goodmorning\"},{\"send... | \n",
" 0.132353 | \n",
" [\"request_chitchat_faring\",\"confirm_chitchat_q... | \n",
"
\n",
" \n",
" 5 | \n",
" p25 | \n",
" coB | \n",
" \"p25_1734423417519\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... | \n",
" 0 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 6 | \n",
" p12 | \n",
" NaN | \n",
" \"p12_1734549202097\" | \n",
" [{\"sender\":\"user\",\"text\":\"hI\"},{\"sender\":\"bot\"... | \n",
" 0 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 7 | \n",
" p39 | \n",
" coB | \n",
" \"p39_1734682181767\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... | \n",
" 0.191176 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P3 coB \"P3_1734675286807\" \n",
"1 P5 coB \"P5_1734620986362\" \n",
"2 P9 coB \"P9_1734478581870\" \n",
"3 p11 coB \"p11_1734598722506\" \n",
"4 P13 coB \"P13_1734601382284\" \n",
"5 p25 coB \"p25_1734423417519\" \n",
"6 p12 NaN \"p12_1734549202097\" \n",
"7 p39 coB \"p39_1734682181767\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello!\"},{\"sender\":\"... 0.102941 \n",
"1 [{\"sender\":\"user\",\"text\":\"Hello, what can I do... 0.161765 \n",
"2 [{\"sender\":\"user\",\"text\":\"Hello \"},{\"sender\":\"... 0.205882 \n",
"3 [{\"sender\":\"user\",\"text\":\"Hi Lilobot\"},{\"sende... 0.132353 \n",
"4 [{\"sender\":\"user\",\"text\":\"Goodmorning\"},{\"send... 0.132353 \n",
"5 [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... 0 \n",
"6 [{\"sender\":\"user\",\"text\":\"hI\"},{\"sender\":\"bot\"... 0 \n",
"7 [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... 0.191176 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"2 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"3 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"4 [\"request_chitchat_faring\",\"confirm_chitchat_q... \n",
"5 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"6 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"7 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"merged_data"
]
},
{
"cell_type": "code",
"execution_count": 55,
"id": "f599b3ba",
"metadata": {},
"outputs": [],
"source": [
"performance_data_control_pre = merged_data[[\"Performance Data\"]]"
]
},
{
"cell_type": "code",
"execution_count": 56,
"id": "e313d8f6",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.102941 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.161765 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.205882 | \n",
"
\n",
" \n",
" 3 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 4 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 5 | \n",
" 0 | \n",
"
\n",
" \n",
" 6 | \n",
" 0 | \n",
"
\n",
" \n",
" 7 | \n",
" 0.191176 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0.102941\n",
"1 0.161765\n",
"2 0.205882\n",
"3 0.132353\n",
"4 0.132353\n",
"5 0\n",
"6 0\n",
"7 0.191176"
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"performance_data_control_pre"
]
},
{
"cell_type": "code",
"execution_count": 57,
"id": "486712ab",
"metadata": {},
"outputs": [],
"source": [
"new_rows = pd.DataFrame({\"Performance Data\": [average_per1, average_per15, average_per23]})"
]
},
{
"cell_type": "code",
"execution_count": 58,
"id": "67c9a6c5",
"metadata": {},
"outputs": [],
"source": [
"performance_data_control_pre = pd.concat([performance_data_control_pre, new_rows], ignore_index=True)"
]
},
{
"cell_type": "code",
"execution_count": 59,
"id": "a27c2932",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.102941 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.161765 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.205882 | \n",
"
\n",
" \n",
" 3 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 4 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 5 | \n",
" 0 | \n",
"
\n",
" \n",
" 6 | \n",
" 0 | \n",
"
\n",
" \n",
" 7 | \n",
" 0.191176 | \n",
"
\n",
" \n",
" 8 | \n",
" 0.161765 | \n",
"
\n",
" \n",
" 9 | \n",
" 0.669118 | \n",
"
\n",
" \n",
" 10 | \n",
" 0.242647 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0.102941\n",
"1 0.161765\n",
"2 0.205882\n",
"3 0.132353\n",
"4 0.132353\n",
"5 0\n",
"6 0\n",
"7 0.191176\n",
"8 0.161765\n",
"9 0.669118\n",
"10 0.242647"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"performance_data_control_pre"
]
},
{
"cell_type": "code",
"execution_count": 60,
"id": "ae99e3b3",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.22794117647058823"
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per5_post = post_p5[\"Performance Data\"].mean()\n",
"average_per5_post"
]
},
{
"cell_type": "code",
"execution_count": 61,
"id": "de30262e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.4705882352941176"
]
},
"execution_count": 61,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per9_post = post_p9[\"Performance Data\"].mean()\n",
"average_per9_post"
]
},
{
"cell_type": "code",
"execution_count": 62,
"id": "d9a77445",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.33088235294117646"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per13_post = post_p13[\"Performance Data\"].mean()\n",
"average_per13_post"
]
},
{
"cell_type": "code",
"execution_count": 103,
"id": "8f5d1649",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" p1 | \n",
" \"p1_1734386397538\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi dear how are you ... | \n",
" {} | \n",
" [\"request_chitchat_faring\",\"request_chitchat_g... | \n",
"
\n",
" \n",
" 1 | \n",
" P3 | \n",
" \"P3_1734676788189\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... | \n",
" 0.132353 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 2 | \n",
" p11 | \n",
" \"p11_1734600413293\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 3 | \n",
" P15 | \n",
" \"P15_1734635243737\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... | \n",
" 0.25 | \n",
" [\"request_chitchat_greeting\",\"trigger_unknown_... | \n",
"
\n",
" \n",
" 4 | \n",
" p23 | \n",
" \"p23_1734791927674\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi, how are you?\"},{... | \n",
" 0.132353 | \n",
" [\"request_chitchat_faring\",\"trigger_unknown_wh... | \n",
"
\n",
" \n",
" 5 | \n",
" p25 | \n",
" \"p25_1734423937777\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hallo\"},{\"sender\":\"b... | \n",
" {} | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 6 | \n",
" p12 | \n",
" \"p12_1734550336693\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... | \n",
" 0.220588 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 7 | \n",
" p39 | \n",
" \"p39_1734684519962\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey good morning tim... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p1 \"p1_1734386397538\" \n",
"1 P3 \"P3_1734676788189\" \n",
"2 p11 \"p11_1734600413293\" \n",
"3 P15 \"P15_1734635243737\" \n",
"4 p23 \"p23_1734791927674\" \n",
"5 p25 \"p25_1734423937777\" \n",
"6 p12 \"p12_1734550336693\" \n",
"7 p39 \"p39_1734684519962\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hi dear how are you ... {} \n",
"1 [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... 0.132353 \n",
"2 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.161765 \n",
"3 [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... 0.25 \n",
"4 [{\"sender\":\"user\",\"text\":\"hi, how are you?\"},{... 0.132353 \n",
"5 [{\"sender\":\"user\",\"text\":\"Hallo\"},{\"sender\":\"b... {} \n",
"6 [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... 0.220588 \n",
"7 [{\"sender\":\"user\",\"text\":\"hey good morning tim... 0.161765 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"request_chitchat_g... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"2 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"3 [\"request_chitchat_greeting\",\"trigger_unknown_... \n",
"4 [\"request_chitchat_faring\",\"trigger_unknown_wh... \n",
"5 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"6 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"7 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 103,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Example: Datasets to merge\n",
"datasets = [post_p1, post_p3, post_p11, post_p15, post_p23, post_p25, post_p27, post_p29 ]\n",
"\n",
"# Merge datasets vertically\n",
"merged_data_post = pd.concat(datasets, axis=0, ignore_index=True)\n",
"merged_data_post"
]
},
{
"cell_type": "code",
"execution_count": 104,
"id": "c1fbbdf8",
"metadata": {},
"outputs": [],
"source": [
"merged_data_post.loc[0, \"Performance Data\"] = 0"
]
},
{
"cell_type": "code",
"execution_count": 105,
"id": "69a74d50",
"metadata": {},
"outputs": [],
"source": [
"merged_data_post.loc[5, \"Performance Data\"] = 0"
]
},
{
"cell_type": "code",
"execution_count": 108,
"id": "019e04b2",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Username | \n",
" Conversation ID | \n",
" Conversation Data | \n",
" Performance Data | \n",
" Used Intents | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" P3 | \n",
" \"P3_1734676788189\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... | \n",
" 0.132353 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" p11 | \n",
" \"p11_1734600413293\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 2 | \n",
" P15 | \n",
" \"P15_1734635243737\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... | \n",
" 0.25 | \n",
" [\"request_chitchat_greeting\",\"trigger_unknown_... | \n",
"
\n",
" \n",
" 3 | \n",
" p23 | \n",
" \"p23_1734791927674\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi, how are you?\"},{... | \n",
" 0.132353 | \n",
" [\"request_chitchat_faring\",\"trigger_unknown_wh... | \n",
"
\n",
" \n",
" 4 | \n",
" p25 | \n",
" \"p25_1734423937777\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hallo\"},{\"sender\":\"b... | \n",
" 0 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 5 | \n",
" p12 | \n",
" \"p12_1734550336693\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... | \n",
" 0.220588 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 6 | \n",
" p39 | \n",
" \"p39_1734684519962\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey good morning tim... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 7 | \n",
" p1 | \n",
" \"p1_1734386397538\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi dear how are you ... | \n",
" 0 | \n",
" [\"request_chitchat_faring\",\"request_chitchat_g... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P3 \"P3_1734676788189\" \n",
"1 p11 \"p11_1734600413293\" \n",
"2 P15 \"P15_1734635243737\" \n",
"3 p23 \"p23_1734791927674\" \n",
"4 p25 \"p25_1734423937777\" \n",
"5 p12 \"p12_1734550336693\" \n",
"6 p39 \"p39_1734684519962\" \n",
"7 p1 \"p1_1734386397538\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... 0.132353 \n",
"1 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.161765 \n",
"2 [{\"sender\":\"user\",\"text\":\"hey kid\"},{\"sender\":... 0.25 \n",
"3 [{\"sender\":\"user\",\"text\":\"hi, how are you?\"},{... 0.132353 \n",
"4 [{\"sender\":\"user\",\"text\":\"Hallo\"},{\"sender\":\"b... 0 \n",
"5 [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... 0.220588 \n",
"6 [{\"sender\":\"user\",\"text\":\"hey good morning tim... 0.161765 \n",
"7 [{\"sender\":\"user\",\"text\":\"Hi dear how are you ... 0 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"2 [\"request_chitchat_greeting\",\"trigger_unknown_... \n",
"3 [\"request_chitchat_faring\",\"trigger_unknown_wh... \n",
"4 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"5 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"6 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"7 [\"request_chitchat_faring\",\"request_chitchat_g... "
]
},
"execution_count": 108,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"merged_data_post"
]
},
{
"cell_type": "code",
"execution_count": 107,
"id": "45a28886",
"metadata": {},
"outputs": [],
"source": [
"merged_data_post = pd.concat([merged_data_post.iloc[1:], merged_data_post.iloc[:1]], ignore_index=True)"
]
},
{
"cell_type": "code",
"execution_count": 109,
"id": "afe02d06",
"metadata": {},
"outputs": [],
"source": [
"performance_data_control_post = merged_data_post[[\"Performance Data\"]]"
]
},
{
"cell_type": "code",
"execution_count": 123,
"id": "a8f6b6ee",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.227941 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.470588 | \n",
"
\n",
" \n",
" 3 | \n",
" 0.161765 | \n",
"
\n",
" \n",
" 4 | \n",
" 0.330882 | \n",
"
\n",
" \n",
" 5 | \n",
" 0 | \n",
"
\n",
" \n",
" 6 | \n",
" 0.220588 | \n",
"
\n",
" \n",
" 7 | \n",
" 0.161765 | \n",
"
\n",
" \n",
" 8 | \n",
" 0 | \n",
"
\n",
" \n",
" 9 | \n",
" 0.25 | \n",
"
\n",
" \n",
" 10 | \n",
" 0.132353 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0.132353\n",
"1 0.227941\n",
"2 0.470588\n",
"3 0.161765\n",
"4 0.330882\n",
"5 0\n",
"6 0.220588\n",
"7 0.161765\n",
"8 0\n",
"9 0.25\n",
"10 0.132353"
]
},
"execution_count": 123,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"performance_data_control_post"
]
},
{
"cell_type": "code",
"execution_count": 122,
"id": "bc9455e0",
"metadata": {},
"outputs": [],
"source": [
"row_to_move = performance_data_control_post.iloc[5:6] # Select row at index 5\n",
"remaining_rows = performance_data_control_post.drop(index=5) # Drop row at index 5\n",
"performance_data_control_post = pd.concat([remaining_rows, row_to_move], ignore_index=True)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "be260550",
"metadata": {},
"outputs": [],
"source": [
"merged_data_post = pd.concat([merged_data_post.iloc[1:], merged_data_post.iloc[:1]], ignore_index=True)"
]
},
{
"cell_type": "code",
"execution_count": 118,
"id": "db11ce8b",
"metadata": {},
"outputs": [],
"source": [
"# Create the new row as a DataFrame\n",
"add_rows = pd.DataFrame({\"Performance Data\": [average_per13_post]})\n",
"\n",
"# Split and concatenate to insert the new row as the third row (index 2)\n",
"performance_data_control_post = pd.concat([\n",
" performance_data_control_post.iloc[:4], # Rows before the insertion point\n",
" add_rows, # The new row\n",
" performance_data_control_post.iloc[4:] # Rows after the insertion point\n",
"], ignore_index=True)\n"
]
},
{
"cell_type": "code",
"execution_count": 69,
"id": "009a4069",
"metadata": {},
"outputs": [],
"source": [
"new_rows_2 = pd.DataFrame({\"Performance Data\": [average_per5_post, average_per9_post, average_per13_post]})"
]
},
{
"cell_type": "code",
"execution_count": 70,
"id": "ca63cded",
"metadata": {},
"outputs": [],
"source": [
"performance_data_control_post = pd.concat([performance_data_control_post, new_rows_2], ignore_index=True)"
]
},
{
"cell_type": "code",
"execution_count": 71,
"id": "9cb8af78",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.102941 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.161765 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.205882 | \n",
"
\n",
" \n",
" 3 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 4 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 5 | \n",
" 0 | \n",
"
\n",
" \n",
" 6 | \n",
" 0 | \n",
"
\n",
" \n",
" 7 | \n",
" 0.191176 | \n",
"
\n",
" \n",
" 8 | \n",
" 0.227941 | \n",
"
\n",
" \n",
" 9 | \n",
" 0.470588 | \n",
"
\n",
" \n",
" 10 | \n",
" 0.330882 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0.102941\n",
"1 0.161765\n",
"2 0.205882\n",
"3 0.132353\n",
"4 0.132353\n",
"5 0\n",
"6 0\n",
"7 0.191176\n",
"8 0.227941\n",
"9 0.470588\n",
"10 0.330882"
]
},
"execution_count": 71,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"performance_data_control_post"
]
},
{
"cell_type": "code",
"execution_count": 97,
"id": "9d247f0e",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.227941 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.470588 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.330882 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0.227941\n",
"1 0.470588\n",
"2 0.330882"
]
},
"execution_count": 97,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"new_rows_2"
]
},
{
"cell_type": "code",
"execution_count": 124,
"id": "122dc27f",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataFrame saved as 'performance_data_control_post.csv'\n"
]
}
],
"source": [
"# Assuming `dataframe` is your DataFrame\n",
"file_name = \"performance_data_control_post.csv\" # Desired file name for the CSV\n",
"\n",
"# Save the DataFrame as a CSV file\n",
"performance_data_control_post.to_csv(file_name, index=False) # Set index=False to exclude the index column\n",
"\n",
"print(f\"DataFrame saved as '{file_name}'\")\n"
]
},
{
"cell_type": "code",
"execution_count": 125,
"id": "7e5f99ea",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataFrame saved as 'performance_data_control_pre.csv'\n"
]
}
],
"source": [
"# Assuming `dataframe` is your DataFrame\n",
"file_name = \"performance_data_control_pre.csv\" # Desired file name for the CSV\n",
"\n",
"# Save the DataFrame as a CSV file\n",
"performance_data_control_pre.to_csv(file_name, index=False) # Set index=False to exclude the index column\n",
"\n",
"print(f\"DataFrame saved as '{file_name}'\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a2d7abc6",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}