{
"cells": [
{
"cell_type": "code",
"execution_count": 52,
"id": "0183d26b",
"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 = 'P26/preSession_data (8).xlsx'\n",
"\n",
"# Load the Excel file into a DataFrame\n",
"try:\n",
" # Reading the Excel file\n",
" pre_p26 = 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": 56,
"id": "0685a59a",
"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 = 'P30/postSession_data (2).xlsx'\n",
"\n",
"# Load the Excel file into a DataFrame\n",
"try:\n",
" # Reading the Excel file\n",
" post_p30 = 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": 8,
"id": "eb82b9f4",
"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",
" p2 | \n",
" coA | \n",
" \"p2_1734382472590\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi what is your name... | \n",
" {} | \n",
" [\"request_chitchat_greeting\",\"request_bullying... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p2 coA \"p2_1734382472590\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi what is your name... {} \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_bullying... "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p2"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "7e1d060a",
"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",
" p2 | \n",
" \"p2_1734383967374\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi what is your name... | \n",
" 0.27941176470588236 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" p2 | \n",
" \"p2_1734383967374\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi what is your name... | \n",
" 0.5588235294117647 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 2 | \n",
" p2 | \n",
" \"p2_1734383967374\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi what is your name... | \n",
" 0.8382352941176471 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 3 | \n",
" p2 | \n",
" \"p2_1734384186341\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi what is your name... | \n",
" {} | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p2 \"p2_1734383967374\" \n",
"1 p2 \"p2_1734383967374\" \n",
"2 p2 \"p2_1734383967374\" \n",
"3 p2 \"p2_1734384186341\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi what is your name... 0.27941176470588236 \n",
"1 [{\"sender\":\"user\",\"text\":\"hi what is your name... 0.5588235294117647 \n",
"2 [{\"sender\":\"user\",\"text\":\"hi what is your name... 0.8382352941176471 \n",
"3 [{\"sender\":\"user\",\"text\":\"hi what is your name... {} \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... "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p2"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "34ed83f8",
"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",
" P4 | \n",
" coA | \n",
" \"P4_1734466399932\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... | \n",
" 0.235294 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P4 coA \"P4_1734466399932\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... 0.235294 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p4"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "7a7855a3",
"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",
" P4 | \n",
" \"P4_1734468226127\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... | \n",
" 0.220588 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P4 \"P4_1734468226127\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... 0.220588 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p4"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "3c918a35",
"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",
" P6 | \n",
" coA | \n",
" \"P6_1734540897545\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello there \"},{\"sen... | \n",
" 0.102941 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P6 coA \"P6_1734540897545\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello there \"},{\"sen... 0.102941 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p6"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "84e71564",
"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",
" P6 | \n",
" \"P6_1734543221172\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello there\"},{\"send... | \n",
" 0.323529 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" P6 | \n",
" \"P6_1734543506394\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi there\"},{\"sender\"... | \n",
" 0.647059 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P6 \"P6_1734543221172\" \n",
"1 P6 \"P6_1734543506394\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hello there\"},{\"send... 0.323529 \n",
"1 [{\"sender\":\"user\",\"text\":\"hi there\"},{\"sender\"... 0.647059 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p6"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "1b069952",
"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",
" 8 | \n",
" coA | \n",
" \"8_1734650445693\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi, How are you ?\"},... | \n",
" 0.102941 | \n",
" [\"request_chitchat_faring\",\"ack_unknown_empath... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 8 coA \"8_1734650445693\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hi, How are you ?\"},... 0.102941 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"ack_unknown_empath... "
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p8"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "866b0485",
"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",
" 8 | \n",
" \"8_1734651974502\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello, How are you ?... | \n",
" 0.161765 | \n",
" [\"request_chitchat_faring\",\"trigger_unknown_wh... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 8 \"8_1734651974502\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello, How are you ?... 0.161765 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"trigger_unknown_wh... "
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p8"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "d8ad2011",
"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",
" p14 | \n",
" coA | \n",
" \"p14_1734628763975\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... | \n",
" 0.102941 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p14 coA \"p14_1734628763975\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... 0.102941 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p14"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "2a0fe0d3",
"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",
" p14 | \n",
" \"p14_1734630248432\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... | \n",
" 0.308824 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p14 \"p14_1734630248432\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... 0.308824 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p14"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "d07db967",
"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",
" p16 | \n",
" | \n",
" \"p16_1734640452589\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... | \n",
" 0.176471 | \n",
" [\"request_chitchat_greeting\",\"request_goal_wha... | \n",
"
\n",
" \n",
" 1 | \n",
" p16 | \n",
" coA | \n",
" \"p16_1734640452589\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... | \n",
" 0.352941 | \n",
" [\"request_chitchat_greeting\",\"request_goal_wha... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p16 \"p16_1734640452589\" \n",
"1 p16 coA \"p16_1734640452589\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... 0.176471 \n",
"1 [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... 0.352941 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_goal_wha... \n",
"1 [\"request_chitchat_greeting\",\"request_goal_wha... "
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p16"
]
},
{
"cell_type": "code",
"execution_count": 33,
"id": "11ab8c74",
"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",
" p16 | \n",
" \"p16_1734641930418\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" p16 | \n",
" \"p16_1734641930418\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... | \n",
" 0.323529 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p16 \"p16_1734641930418\" \n",
"1 p16 \"p16_1734641930418\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... 0.161765 \n",
"1 [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... 0.323529 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p16"
]
},
{
"cell_type": "code",
"execution_count": 38,
"id": "33d6d635",
"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",
" p18 | \n",
" | \n",
" \"p18_1734703588975\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey\"},{\"sender\":\"bot... | \n",
" 0.117647 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" p18 | \n",
" coA | \n",
" \"p18_1734703588975\" | \n",
" [{\"sender\":\"user\",\"text\":\"hey\"},{\"sender\":\"bot... | \n",
" 0.235294 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p18 \"p18_1734703588975\" \n",
"1 p18 coA \"p18_1734703588975\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hey\"},{\"sender\":\"bot... 0.117647 \n",
"1 [{\"sender\":\"user\",\"text\":\"hey\"},{\"sender\":\"bot... 0.235294 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p18"
]
},
{
"cell_type": "code",
"execution_count": 39,
"id": "c5a5e8db",
"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",
" p18 | \n",
" \"p18_1734704094439\" | \n",
" [{\"sender\":\"system\",\"text\":\"\\\"Welcome to the C... | \n",
" 0.125937 | \n",
" [\"ack_bullying_empathize\",\"request_chitchat_fa... | \n",
"
\n",
" \n",
" 1 | \n",
" p18 | \n",
" \"p18_1734704094439\" | \n",
" [{\"sender\":\"system\",\"text\":\"\\\"Welcome to the C... | \n",
" 0.125937 | \n",
" [\"ack_bullying_empathize\",\"request_chitchat_fa... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p18 \"p18_1734704094439\" \n",
"1 p18 \"p18_1734704094439\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"system\",\"text\":\"\\\"Welcome to the C... 0.125937 \n",
"1 [{\"sender\":\"system\",\"text\":\"\\\"Welcome to the C... 0.125937 \n",
"\n",
" Used Intents \n",
"0 [\"ack_bullying_empathize\",\"request_chitchat_fa... \n",
"1 [\"ack_bullying_empathize\",\"request_chitchat_fa... "
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p18"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "8ba52341",
"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",
" p20 | \n",
" | \n",
" \"p20_1734784086587\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... | \n",
" 0.220588 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" p20 | \n",
" coA | \n",
" \"p20_1734784086587\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... | \n",
" 0.441176 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p20 \"p20_1734784086587\" \n",
"1 p20 coA \"p20_1734784086587\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... 0.220588 \n",
"1 [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... 0.441176 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p20"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "7719af89",
"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",
" p20 | \n",
" \"p20_1734785592223\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi how are you?\"},{\"... | \n",
" 0.250000 | \n",
" [\"request_chitchat_faring\",\"ack_bullying_empat... | \n",
"
\n",
" \n",
" 1 | \n",
" p20 | \n",
" \"p20_1734785889456\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... | \n",
" 0.529412 | \n",
" [\"request_chitchat_faring\",\"ack_bullying_empat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p20 \"p20_1734785592223\" \n",
"1 p20 \"p20_1734785889456\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi how are you?\"},{\"... 0.250000 \n",
"1 [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... 0.529412 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"ack_bullying_empat... \n",
"1 [\"request_chitchat_faring\",\"ack_bullying_empat... "
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p20"
]
},
{
"cell_type": "code",
"execution_count": 46,
"id": "525f635b",
"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",
" P22 | \n",
" coA | \n",
" \"P22_1734639099236\" | \n",
" [{\"sender\":\"user\",\"text\":\"Can i help you?\"},{\"... | \n",
" 0.132353 | \n",
" [\"inform_goal_help\",\"request_bullying_details\"... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 P22 coA \"P22_1734639099236\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Can i help you?\"},{\"... 0.132353 \n",
"\n",
" Used Intents \n",
"0 [\"inform_goal_help\",\"request_bullying_details\"... "
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p22"
]
},
{
"cell_type": "code",
"execution_count": 47,
"id": "a8320696",
"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",
" P22 | \n",
" \"P22_1734640831466\" | \n",
" [{\"sender\":\"user\",\"text\":\"Welcome, I'm Mylene\"... | \n",
" 0.205882 | \n",
" [\"request_chitchat_greeting\",\"request_unknown_... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P22 \"P22_1734640831466\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Welcome, I'm Mylene\"... 0.205882 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_unknown_... "
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p22"
]
},
{
"cell_type": "code",
"execution_count": 50,
"id": "bab36d6d",
"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",
" p26 | \n",
" coA | \n",
" \"p26_1734727458119\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.132353 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p26 coA \"p26_1734727458119\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.132353 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 50,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p26"
]
},
{
"cell_type": "code",
"execution_count": 51,
"id": "e48be86f",
"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",
" p26 | \n",
" \"p26_1734729050157\" | \n",
" [{\"sender\":\"user\",\"text\":\"how are you?\"},{\"sen... | \n",
" 0.191176 | \n",
" [\"request_chitchat_faring\",\"trigger_unknown_wh... | \n",
"
\n",
" \n",
" 1 | \n",
" p26 | \n",
" \"p26_1734729050157\" | \n",
" [{\"sender\":\"user\",\"text\":\"how are you?\"},{\"sen... | \n",
" 0.382353 | \n",
" [\"request_chitchat_faring\",\"trigger_unknown_wh... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p26 \"p26_1734729050157\" \n",
"1 p26 \"p26_1734729050157\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"how are you?\"},{\"sen... 0.191176 \n",
"1 [{\"sender\":\"user\",\"text\":\"how are you?\"},{\"sen... 0.382353 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_faring\",\"trigger_unknown_wh... \n",
"1 [\"request_chitchat_faring\",\"trigger_unknown_wh... "
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p26"
]
},
{
"cell_type": "code",
"execution_count": 54,
"id": "7d0857ab",
"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",
" p30 | \n",
" | \n",
" \"p30_1734785652456\" | \n",
" [{\"sender\":\"user\",\"text\":\"hoi \"},{\"sender\":\"bo... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"ack_unknown_empa... | \n",
"
\n",
" \n",
" 1 | \n",
" p30 | \n",
" coA | \n",
" \"p30_1734785652456\" | \n",
" [{\"sender\":\"user\",\"text\":\"hoi \"},{\"sender\":\"bo... | \n",
" 0.323529 | \n",
" [\"request_chitchat_greeting\",\"ack_unknown_empa... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p30 \"p30_1734785652456\" \n",
"1 p30 coA \"p30_1734785652456\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hoi \"},{\"sender\":\"bo... 0.161765 \n",
"1 [{\"sender\":\"user\",\"text\":\"hoi \"},{\"sender\":\"bo... 0.323529 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"ack_unknown_empa... \n",
"1 [\"request_chitchat_greeting\",\"ack_unknown_empa... "
]
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pre_p30"
]
},
{
"cell_type": "code",
"execution_count": 57,
"id": "27ccf486",
"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",
" p30 | \n",
" \"p30_1734787099228\" | \n",
" [] | \n",
" 0.000000 | \n",
" [] | \n",
"
\n",
" \n",
" 1 | \n",
" p30 | \n",
" \"p30_1734787099228\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... | \n",
" 0.161765 | \n",
" [\"request_chitchat_greeting\",\"inform_goal_help... | \n",
"
\n",
" \n",
" 2 | \n",
" p30 | \n",
" \"p30_1734787099228\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... | \n",
" 0.323529 | \n",
" [\"request_chitchat_greeting\",\"inform_goal_help... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 p30 \"p30_1734787099228\" \n",
"1 p30 \"p30_1734787099228\" \n",
"2 p30 \"p30_1734787099228\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [] 0.000000 \n",
"1 [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... 0.161765 \n",
"2 [{\"sender\":\"user\",\"text\":\"hi\"},{\"sender\":\"bot\"... 0.323529 \n",
"\n",
" Used Intents \n",
"0 [] \n",
"1 [\"request_chitchat_greeting\",\"inform_goal_help... \n",
"2 [\"request_chitchat_greeting\",\"inform_goal_help... "
]
},
"execution_count": 57,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"post_p30"
]
},
{
"cell_type": "code",
"execution_count": 70,
"id": "67eddf23",
"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",
" p2 | \n",
" coA | \n",
" \"p2_1734382472590\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi what is your name... | \n",
" {} | \n",
" [\"request_chitchat_greeting\",\"request_bullying... | \n",
"
\n",
" \n",
" 1 | \n",
" P4 | \n",
" coA | \n",
" \"P4_1734466399932\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... | \n",
" 0.235294 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 2 | \n",
" P6 | \n",
" coA | \n",
" \"P6_1734540897545\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello there \"},{\"sen... | \n",
" 0.102941 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 3 | \n",
" 8 | \n",
" coA | \n",
" \"8_1734650445693\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi, How are you ?\"},... | \n",
" 0.102941 | \n",
" [\"request_chitchat_faring\",\"ack_unknown_empath... | \n",
"
\n",
" \n",
" 4 | \n",
" p14 | \n",
" coA | \n",
" \"p14_1734628763975\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... | \n",
" 0.102941 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 5 | \n",
" P22 | \n",
" coA | \n",
" \"P22_1734639099236\" | \n",
" [{\"sender\":\"user\",\"text\":\"Can i help you?\"},{\"... | \n",
" 0.132353 | \n",
" [\"inform_goal_help\",\"request_bullying_details\"... | \n",
"
\n",
" \n",
" 6 | \n",
" p26 | \n",
" coA | \n",
" \"p26_1734727458119\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.132353 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p2 coA \"p2_1734382472590\" \n",
"1 P4 coA \"P4_1734466399932\" \n",
"2 P6 coA \"P6_1734540897545\" \n",
"3 8 coA \"8_1734650445693\" \n",
"4 p14 coA \"p14_1734628763975\" \n",
"5 P22 coA \"P22_1734639099236\" \n",
"6 p26 coA \"p26_1734727458119\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi what is your name... {} \n",
"1 [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... 0.235294 \n",
"2 [{\"sender\":\"user\",\"text\":\"Hello there \"},{\"sen... 0.102941 \n",
"3 [{\"sender\":\"user\",\"text\":\"Hi, How are you ?\"},... 0.102941 \n",
"4 [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... 0.102941 \n",
"5 [{\"sender\":\"user\",\"text\":\"Can i help you?\"},{\"... 0.132353 \n",
"6 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.132353 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_bullying... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"2 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"3 [\"request_chitchat_faring\",\"ack_unknown_empath... \n",
"4 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"5 [\"inform_goal_help\",\"request_bullying_details\"... \n",
"6 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 70,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Example: Datasets to merge\n",
"datasets = [pre_p2, pre_p4, pre_p6, pre_p8, pre_p14, pre_p22, pre_p26]\n",
"\n",
"# Merge datasets vertically\n",
"merged_data = pd.concat(datasets, axis=0, ignore_index=True)\n",
"merged_data"
]
},
{
"cell_type": "code",
"execution_count": 63,
"id": "b31ef30e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.1764705882352941"
]
},
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per18 = pre_p18[\"Performance Data\"].mean()\n",
"average_per18"
]
},
{
"cell_type": "code",
"execution_count": 62,
"id": "1b33bc35",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.2647058823529411"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per16 = pre_p16[\"Performance Data\"].mean()\n",
"average_per16"
]
},
{
"cell_type": "code",
"execution_count": 64,
"id": "c1278004",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.33088235294117646"
]
},
"execution_count": 64,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per20 = pre_p20[\"Performance Data\"].mean()\n",
"average_per20"
]
},
{
"cell_type": "code",
"execution_count": 65,
"id": "f1cea3d7",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.24264705882352938"
]
},
"execution_count": 65,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per30 = pre_p30[\"Performance Data\"].mean()\n",
"average_per30"
]
},
{
"cell_type": "code",
"execution_count": 71,
"id": "5ba743d2",
"metadata": {},
"outputs": [],
"source": [
"merged_data.loc[0, \"Performance Data\"] = 0"
]
},
{
"cell_type": "code",
"execution_count": 72,
"id": "8c5bd10e",
"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",
" p2 | \n",
" coA | \n",
" \"p2_1734382472590\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi what is your name... | \n",
" 0 | \n",
" [\"request_chitchat_greeting\",\"request_bullying... | \n",
"
\n",
" \n",
" 1 | \n",
" P4 | \n",
" coA | \n",
" \"P4_1734466399932\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... | \n",
" 0.235294 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 2 | \n",
" P6 | \n",
" coA | \n",
" \"P6_1734540897545\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello there \"},{\"sen... | \n",
" 0.102941 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 3 | \n",
" 8 | \n",
" coA | \n",
" \"8_1734650445693\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi, How are you ?\"},... | \n",
" 0.102941 | \n",
" [\"request_chitchat_faring\",\"ack_unknown_empath... | \n",
"
\n",
" \n",
" 4 | \n",
" p14 | \n",
" coA | \n",
" \"p14_1734628763975\" | \n",
" [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... | \n",
" 0.102941 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 5 | \n",
" P22 | \n",
" coA | \n",
" \"P22_1734639099236\" | \n",
" [{\"sender\":\"user\",\"text\":\"Can i help you?\"},{\"... | \n",
" 0.132353 | \n",
" [\"inform_goal_help\",\"request_bullying_details\"... | \n",
"
\n",
" \n",
" 6 | \n",
" p26 | \n",
" coA | \n",
" \"p26_1734727458119\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... | \n",
" 0.132353 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Condition Conversation ID \\\n",
"0 p2 coA \"p2_1734382472590\" \n",
"1 P4 coA \"P4_1734466399932\" \n",
"2 P6 coA \"P6_1734540897545\" \n",
"3 8 coA \"8_1734650445693\" \n",
"4 p14 coA \"p14_1734628763975\" \n",
"5 P22 coA \"P22_1734639099236\" \n",
"6 p26 coA \"p26_1734727458119\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hi what is your name... 0 \n",
"1 [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... 0.235294 \n",
"2 [{\"sender\":\"user\",\"text\":\"Hello there \"},{\"sen... 0.102941 \n",
"3 [{\"sender\":\"user\",\"text\":\"Hi, How are you ?\"},... 0.102941 \n",
"4 [{\"sender\":\"user\",\"text\":\"hi \"},{\"sender\":\"bot... 0.102941 \n",
"5 [{\"sender\":\"user\",\"text\":\"Can i help you?\"},{\"... 0.132353 \n",
"6 [{\"sender\":\"user\",\"text\":\"Hello\"},{\"sender\":\"b... 0.132353 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_bullying... \n",
"1 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"2 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"3 [\"request_chitchat_faring\",\"ack_unknown_empath... \n",
"4 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"5 [\"inform_goal_help\",\"request_bullying_details\"... \n",
"6 [\"request_chitchat_greeting\",\"request_chitchat... "
]
},
"execution_count": 72,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"merged_data"
]
},
{
"cell_type": "code",
"execution_count": 80,
"id": "a6cb21e5",
"metadata": {},
"outputs": [],
"source": [
"performance_data_intervention = merged_data[[\"Performance Data\"]]"
]
},
{
"cell_type": "code",
"execution_count": 81,
"id": "30c69b1d",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.235294 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.102941 | \n",
"
\n",
" \n",
" 3 | \n",
" 0.102941 | \n",
"
\n",
" \n",
" 4 | \n",
" 0.102941 | \n",
"
\n",
" \n",
" 5 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 6 | \n",
" 0.132353 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0\n",
"1 0.235294\n",
"2 0.102941\n",
"3 0.102941\n",
"4 0.102941\n",
"5 0.132353\n",
"6 0.132353"
]
},
"execution_count": 81,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"performance_data_intervention"
]
},
{
"cell_type": "code",
"execution_count": 82,
"id": "20fa5624",
"metadata": {},
"outputs": [],
"source": [
"new_rows = pd.DataFrame({\"Performance Data\": [average_per18, average_per16, average_per20, average_per30 ]})"
]
},
{
"cell_type": "code",
"execution_count": 101,
"id": "cf7891ec",
"metadata": {},
"outputs": [],
"source": [
"performance_data_intervention_pre = pd.concat([performance_data_intervention, new_rows], ignore_index=True)"
]
},
{
"cell_type": "code",
"execution_count": 102,
"id": "b529ca49",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.235294 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.102941 | \n",
"
\n",
" \n",
" 3 | \n",
" 0.102941 | \n",
"
\n",
" \n",
" 4 | \n",
" 0.102941 | \n",
"
\n",
" \n",
" 5 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 6 | \n",
" 0.132353 | \n",
"
\n",
" \n",
" 7 | \n",
" 0.176471 | \n",
"
\n",
" \n",
" 8 | \n",
" 0.264706 | \n",
"
\n",
" \n",
" 9 | \n",
" 0.330882 | \n",
"
\n",
" \n",
" 10 | \n",
" 0.242647 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0\n",
"1 0.235294\n",
"2 0.102941\n",
"3 0.102941\n",
"4 0.102941\n",
"5 0.132353\n",
"6 0.132353\n",
"7 0.176471\n",
"8 0.264706\n",
"9 0.330882\n",
"10 0.242647"
]
},
"execution_count": 102,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"performance_data_intervention_pre"
]
},
{
"cell_type": "code",
"execution_count": 99,
"id": "1b5a1328",
"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",
" P4 | \n",
" \"P4_1734468226127\" | \n",
" [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... | \n",
" 0.220588 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 1 | \n",
" 8 | \n",
" \"8_1734651974502\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hello, How are you ?... | \n",
" 0.161765 | \n",
" [\"request_chitchat_faring\",\"trigger_unknown_wh... | \n",
"
\n",
" \n",
" 2 | \n",
" p14 | \n",
" \"p14_1734630248432\" | \n",
" [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... | \n",
" 0.308824 | \n",
" [\"request_chitchat_greeting\",\"request_chitchat... | \n",
"
\n",
" \n",
" 3 | \n",
" P22 | \n",
" \"P22_1734640831466\" | \n",
" [{\"sender\":\"user\",\"text\":\"Welcome, I'm Mylene\"... | \n",
" 0.205882 | \n",
" [\"request_chitchat_greeting\",\"request_unknown_... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Username Conversation ID \\\n",
"0 P4 \"P4_1734468226127\" \n",
"1 8 \"8_1734651974502\" \n",
"2 p14 \"p14_1734630248432\" \n",
"3 P22 \"P22_1734640831466\" \n",
"\n",
" Conversation Data Performance Data \\\n",
"0 [{\"sender\":\"user\",\"text\":\"hello\"},{\"sender\":\"b... 0.220588 \n",
"1 [{\"sender\":\"user\",\"text\":\"Hello, How are you ?... 0.161765 \n",
"2 [{\"sender\":\"user\",\"text\":\"Hi\"},{\"sender\":\"bot\"... 0.308824 \n",
"3 [{\"sender\":\"user\",\"text\":\"Welcome, I'm Mylene\"... 0.205882 \n",
"\n",
" Used Intents \n",
"0 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"1 [\"request_chitchat_faring\",\"trigger_unknown_wh... \n",
"2 [\"request_chitchat_greeting\",\"request_chitchat... \n",
"3 [\"request_chitchat_greeting\",\"request_unknown_... "
]
},
"execution_count": 99,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Example: Datasets to merge\n",
"datasets = [post_p4, post_p8, post_p14, post_p22 ]\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": 92,
"id": "b031e75f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.5588235294117646"
]
},
"execution_count": 92,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Convert the \"Performance Data\" column to numeric\n",
"post_p2[\"Performance Data\"] = pd.to_numeric(post_p2[\"Performance Data\"], errors=\"coerce\")\n",
"\n",
"# Calculate the average of the first three rows\n",
"average_per2_post = post_p2[\"Performance Data\"][:3].mean()\n",
"average_per2_post"
]
},
{
"cell_type": "code",
"execution_count": 93,
"id": "2b958393",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.4852941176470589"
]
},
"execution_count": 93,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Calculate the average of the first three rows\n",
"average_per6_post = post_p6[\"Performance Data\"].mean()\n",
"average_per6_post"
]
},
{
"cell_type": "code",
"execution_count": 94,
"id": "13e82490",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.24264705882352938"
]
},
"execution_count": 94,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Calculate the average of the first three rows\n",
"average_per16_post = post_p16[\"Performance Data\"].mean()\n",
"average_per16_post"
]
},
{
"cell_type": "code",
"execution_count": 95,
"id": "726d0987",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.1259370314842578"
]
},
"execution_count": 95,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Calculate the average of the first three rows\n",
"average_per18_post = post_p18[\"Performance Data\"].mean()\n",
"average_per18_post"
]
},
{
"cell_type": "code",
"execution_count": 96,
"id": "399aff84",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.3897058823529412"
]
},
"execution_count": 96,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Calculate the average of the first three rows\n",
"average_per20_post = post_p20[\"Performance Data\"].mean()\n",
"average_per20_post"
]
},
{
"cell_type": "code",
"execution_count": 97,
"id": "1a5cc764",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.28676470588235287"
]
},
"execution_count": 97,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Calculate the average of the first three rows\n",
"average_per26_post = post_p26[\"Performance Data\"].mean()\n",
"average_per26_post"
]
},
{
"cell_type": "code",
"execution_count": 98,
"id": "a393fb6b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.24264705882352938"
]
},
"execution_count": 98,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Calculate the average of the first three rows\n",
"average_per30_post = post_p30[\"Performance Data\"][-2:].mean()\n",
"average_per30_post"
]
},
{
"cell_type": "code",
"execution_count": 111,
"id": "ca2b780d",
"metadata": {},
"outputs": [],
"source": [
"performance_data_intervention_post = merged_data_post[[\"Performance Data\"]]"
]
},
{
"cell_type": "code",
"execution_count": 123,
"id": "08dff3ba",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.558824 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.220588 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.485294 | \n",
"
\n",
" \n",
" 3 | \n",
" 0.161765 | \n",
"
\n",
" \n",
" 4 | \n",
" 0.308824 | \n",
"
\n",
" \n",
" 5 | \n",
" 0.205882 | \n",
"
\n",
" \n",
" 6 | \n",
" 0.286765 | \n",
"
\n",
" \n",
" 7 | \n",
" 0.125937 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0.558824\n",
"1 0.220588\n",
"2 0.485294\n",
"3 0.161765\n",
"4 0.308824\n",
"5 0.205882\n",
"6 0.286765\n",
"7 0.125937"
]
},
"execution_count": 123,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"performance_data_intervention_post"
]
},
{
"cell_type": "code",
"execution_count": 114,
"id": "9c7a1add",
"metadata": {},
"outputs": [],
"source": [
"# Create a new row as a DataFrame\n",
"add_row = pd.DataFrame({\"Performance Data\": [average_per2_post]})\n",
"\n",
"# Concatenate the new row with the original DataFrame\n",
"performance_data_intervention_post = pd.concat([add_row, performance_data_intervention_post], ignore_index=True)"
]
},
{
"cell_type": "code",
"execution_count": 116,
"id": "65522cb1",
"metadata": {},
"outputs": [],
"source": [
"# Create the new row as a DataFrame\n",
"add_row_3 = pd.DataFrame({\"Performance Data\": [average_per6_post]})\n",
"\n",
"# Split and concatenate to insert the new row as the third row (index 2)\n",
"performance_data_intervention_post = pd.concat([\n",
" performance_data_intervention_post.iloc[:2], # Rows before the insertion point\n",
" add_row_3, # The new row\n",
" performance_data_intervention_post.iloc[2:] # Rows after the insertion point\n",
"], ignore_index=True)\n"
]
},
{
"cell_type": "code",
"execution_count": 122,
"id": "744bdeef",
"metadata": {},
"outputs": [],
"source": [
"performance_data_intervention_post = performance_data_intervention_post.append({\"Performance Data\": average_per18_post}, ignore_index=True)\n"
]
},
{
"cell_type": "code",
"execution_count": 124,
"id": "06e05412",
"metadata": {},
"outputs": [],
"source": [
"new_rows_2 = pd.DataFrame({\"Performance Data\": [average_per16_post, average_per20_post, average_per30_post ]})"
]
},
{
"cell_type": "code",
"execution_count": 125,
"id": "fd4fb60f",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.242647 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.389706 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.242647 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0.242647\n",
"1 0.389706\n",
"2 0.242647"
]
},
"execution_count": 125,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"new_rows_2"
]
},
{
"cell_type": "code",
"execution_count": 126,
"id": "7ba40bef",
"metadata": {},
"outputs": [],
"source": [
"performance_data_intervention_post = pd.concat([performance_data_intervention_post, new_rows_2], ignore_index=True)"
]
},
{
"cell_type": "code",
"execution_count": 127,
"id": "daf2e263",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Performance Data | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.558824 | \n",
"
\n",
" \n",
" 1 | \n",
" 0.220588 | \n",
"
\n",
" \n",
" 2 | \n",
" 0.485294 | \n",
"
\n",
" \n",
" 3 | \n",
" 0.161765 | \n",
"
\n",
" \n",
" 4 | \n",
" 0.308824 | \n",
"
\n",
" \n",
" 5 | \n",
" 0.205882 | \n",
"
\n",
" \n",
" 6 | \n",
" 0.286765 | \n",
"
\n",
" \n",
" 7 | \n",
" 0.125937 | \n",
"
\n",
" \n",
" 8 | \n",
" 0.242647 | \n",
"
\n",
" \n",
" 9 | \n",
" 0.389706 | \n",
"
\n",
" \n",
" 10 | \n",
" 0.242647 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Performance Data\n",
"0 0.558824\n",
"1 0.220588\n",
"2 0.485294\n",
"3 0.161765\n",
"4 0.308824\n",
"5 0.205882\n",
"6 0.286765\n",
"7 0.125937\n",
"8 0.242647\n",
"9 0.389706\n",
"10 0.242647"
]
},
"execution_count": 127,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"performance_data_intervention_post"
]
},
{
"cell_type": "code",
"execution_count": 128,
"id": "d6ec0a92",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataFrame saved as 'performance_data_intervention_post.csv'\n"
]
}
],
"source": [
"# Assuming `dataframe` is your DataFrame\n",
"file_name = \"performance_data_intervention_post.csv\" # Desired file name for the CSV\n",
"\n",
"# Save the DataFrame as a CSV file\n",
"performance_data_intervention_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": 129,
"id": "5f47f03f",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DataFrame saved as 'performance_data_intervention_pre.csv'\n"
]
}
],
"source": [
"# Assuming `dataframe` is your DataFrame\n",
"file_name = \"performance_data_intervention_pre.csv\" # Desired file name for the CSV\n",
"\n",
"# Save the DataFrame as a CSV file\n",
"performance_data_intervention_pre.to_csv(file_name, index=False) # Set index=False to exclude the index column\n",
"\n",
"print(f\"DataFrame saved as '{file_name}'\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "977368e6",
"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
}