From e05ccce18cc856cefb9752dd934cb90ef42de31e Mon Sep 17 00:00:00 2001 From: leolion023 Date: Tue, 12 Aug 2025 18:27:15 -0400 Subject: [PATCH 1/4] combnine some functions to make them more abstract --- src/notebook/notebook.ipynb | 989 ++++++++++++++++++++++++++++-------- 1 file changed, 780 insertions(+), 209 deletions(-) diff --git a/src/notebook/notebook.ipynb b/src/notebook/notebook.ipynb index 2361ed7..403df05 100644 --- a/src/notebook/notebook.ipynb +++ b/src/notebook/notebook.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 14, + "execution_count": 1, "id": "cc02d731", "metadata": {}, "outputs": [], @@ -13,27 +13,10 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "5987e035", "metadata": {}, - "outputs": [ - { - "ename": "FileNotFoundError", - "evalue": "[Errno 2] No such file or directory: '../../data/Attendance_Template_v3 - Mentors.csv'", - "output_type": "error", - "traceback": [ - "\u001b[31m---------------------------------------------------------------------------\u001b[39m", - "\u001b[31mFileNotFoundError\u001b[39m Traceback (most recent call last)", - "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[5]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m mentor_df = \u001b[43mpd\u001b[49m\u001b[43m.\u001b[49m\u001b[43mread_csv\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43m../../data/Attendance_Template_v3 - Mentors.csv\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[32m 2\u001b[39m staff_df = pd.read_csv(\u001b[33m'\u001b[39m\u001b[33m../../data/Attendance_Template_v3 - Staff.csv\u001b[39m\u001b[33m'\u001b[39m)\n\u001b[32m 3\u001b[39m meeting_1 = pd.read_csv(\u001b[33m'\u001b[39m\u001b[33m../../data/2025-07-29 17_45 wrt-nsga-feo Attendance Report - Attendees.csv\u001b[39m\u001b[33m'\u001b[39m)\n", - "\u001b[36mFile \u001b[39m\u001b[32m~/Desktop/CodeYou_AttendanceTracker/venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py:1026\u001b[39m, in \u001b[36mread_csv\u001b[39m\u001b[34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, date_format, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options, dtype_backend)\u001b[39m\n\u001b[32m 1013\u001b[39m kwds_defaults = _refine_defaults_read(\n\u001b[32m 1014\u001b[39m dialect,\n\u001b[32m 1015\u001b[39m delimiter,\n\u001b[32m (...)\u001b[39m\u001b[32m 1022\u001b[39m dtype_backend=dtype_backend,\n\u001b[32m 1023\u001b[39m )\n\u001b[32m 1024\u001b[39m kwds.update(kwds_defaults)\n\u001b[32m-> \u001b[39m\u001b[32m1026\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_read\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n", - "\u001b[36mFile \u001b[39m\u001b[32m~/Desktop/CodeYou_AttendanceTracker/venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py:620\u001b[39m, in \u001b[36m_read\u001b[39m\u001b[34m(filepath_or_buffer, kwds)\u001b[39m\n\u001b[32m 617\u001b[39m _validate_names(kwds.get(\u001b[33m\"\u001b[39m\u001b[33mnames\u001b[39m\u001b[33m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m))\n\u001b[32m 619\u001b[39m \u001b[38;5;66;03m# Create the parser.\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m620\u001b[39m parser = \u001b[43mTextFileReader\u001b[49m\u001b[43m(\u001b[49m\u001b[43mfilepath_or_buffer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mkwds\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 622\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m chunksize \u001b[38;5;129;01mor\u001b[39;00m iterator:\n\u001b[32m 623\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m parser\n", - "\u001b[36mFile \u001b[39m\u001b[32m~/Desktop/CodeYou_AttendanceTracker/venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py:1620\u001b[39m, in \u001b[36mTextFileReader.__init__\u001b[39m\u001b[34m(self, f, engine, **kwds)\u001b[39m\n\u001b[32m 1617\u001b[39m \u001b[38;5;28mself\u001b[39m.options[\u001b[33m\"\u001b[39m\u001b[33mhas_index_names\u001b[39m\u001b[33m\"\u001b[39m] = kwds[\u001b[33m\"\u001b[39m\u001b[33mhas_index_names\u001b[39m\u001b[33m\"\u001b[39m]\n\u001b[32m 1619\u001b[39m \u001b[38;5;28mself\u001b[39m.handles: IOHandles | \u001b[38;5;28;01mNone\u001b[39;00m = \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[32m-> \u001b[39m\u001b[32m1620\u001b[39m \u001b[38;5;28mself\u001b[39m._engine = \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_make_engine\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mengine\u001b[49m\u001b[43m)\u001b[49m\n", - "\u001b[36mFile \u001b[39m\u001b[32m~/Desktop/CodeYou_AttendanceTracker/venv/lib/python3.12/site-packages/pandas/io/parsers/readers.py:1880\u001b[39m, in \u001b[36mTextFileReader._make_engine\u001b[39m\u001b[34m(self, f, engine)\u001b[39m\n\u001b[32m 1878\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[33m\"\u001b[39m\u001b[33mb\u001b[39m\u001b[33m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m mode:\n\u001b[32m 1879\u001b[39m mode += \u001b[33m\"\u001b[39m\u001b[33mb\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m-> \u001b[39m\u001b[32m1880\u001b[39m \u001b[38;5;28mself\u001b[39m.handles = \u001b[43mget_handle\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 1881\u001b[39m \u001b[43m \u001b[49m\u001b[43mf\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1882\u001b[39m \u001b[43m \u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1883\u001b[39m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mencoding\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1884\u001b[39m \u001b[43m \u001b[49m\u001b[43mcompression\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mcompression\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1885\u001b[39m \u001b[43m \u001b[49m\u001b[43mmemory_map\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmemory_map\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1886\u001b[39m \u001b[43m \u001b[49m\u001b[43mis_text\u001b[49m\u001b[43m=\u001b[49m\u001b[43mis_text\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1887\u001b[39m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mencoding_errors\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mstrict\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1888\u001b[39m \u001b[43m \u001b[49m\u001b[43mstorage_options\u001b[49m\u001b[43m=\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43moptions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mstorage_options\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1889\u001b[39m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 1890\u001b[39m \u001b[38;5;28;01massert\u001b[39;00m \u001b[38;5;28mself\u001b[39m.handles \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[32m 1891\u001b[39m f = \u001b[38;5;28mself\u001b[39m.handles.handle\n", - "\u001b[36mFile \u001b[39m\u001b[32m~/Desktop/CodeYou_AttendanceTracker/venv/lib/python3.12/site-packages/pandas/io/common.py:873\u001b[39m, in \u001b[36mget_handle\u001b[39m\u001b[34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[39m\n\u001b[32m 868\u001b[39m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(handle, \u001b[38;5;28mstr\u001b[39m):\n\u001b[32m 869\u001b[39m \u001b[38;5;66;03m# Check whether the filename is to be opened in binary mode.\u001b[39;00m\n\u001b[32m 870\u001b[39m \u001b[38;5;66;03m# Binary mode does not support 'encoding' and 'newline'.\u001b[39;00m\n\u001b[32m 871\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m ioargs.encoding \u001b[38;5;129;01mand\u001b[39;00m \u001b[33m\"\u001b[39m\u001b[33mb\u001b[39m\u001b[33m\"\u001b[39m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m ioargs.mode:\n\u001b[32m 872\u001b[39m \u001b[38;5;66;03m# Encoding\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m873\u001b[39m handle = \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\n\u001b[32m 874\u001b[39m \u001b[43m \u001b[49m\u001b[43mhandle\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 875\u001b[39m \u001b[43m \u001b[49m\u001b[43mioargs\u001b[49m\u001b[43m.\u001b[49m\u001b[43mmode\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 876\u001b[39m \u001b[43m \u001b[49m\u001b[43mencoding\u001b[49m\u001b[43m=\u001b[49m\u001b[43mioargs\u001b[49m\u001b[43m.\u001b[49m\u001b[43mencoding\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 877\u001b[39m \u001b[43m \u001b[49m\u001b[43merrors\u001b[49m\u001b[43m=\u001b[49m\u001b[43merrors\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 878\u001b[39m \u001b[43m \u001b[49m\u001b[43mnewline\u001b[49m\u001b[43m=\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[32m 879\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 880\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 881\u001b[39m \u001b[38;5;66;03m# Binary mode\u001b[39;00m\n\u001b[32m 882\u001b[39m handle = \u001b[38;5;28mopen\u001b[39m(handle, ioargs.mode)\n", - "\u001b[31mFileNotFoundError\u001b[39m: [Errno 2] No such file or directory: '../../data/Attendance_Template_v3 - Mentors.csv'" - ] - } - ], + "outputs": [], "source": [ "mentor_df = pd.read_csv('../../data/Attendance_Template_v3 - Mentors.csv')\n", "staff_df = pd.read_csv('../../data/Attendance_Template_v3 - Staff.csv')\n", @@ -72,7 +55,7 @@ "type": "unknown" } ], - "ref": "386d8423-da78-44f7-8320-baabcd221172", + "ref": "cf1aa62b-bfc8-4121-9908-273368270ce2", "rows": [ [ "0", @@ -631,7 +614,7 @@ "type": "float" } ], - "ref": "90d01c97-494f-4e03-8fda-1d0fbf437129", + "ref": "db1e5e5f-b294-4c78-8240-f1c54afb2b58", "rows": [ [ "0", @@ -972,35 +955,114 @@ "staff_df" ] }, + { + "cell_type": "code", + "execution_count": 5, + "id": "3df8b097", + "metadata": {}, + "outputs": [], + "source": [ + "def keep_name(df: pd.DataFrame) -> pd.DataFrame:\n", + " \"\"\"\n", + " Titles columns in a DataFrame and drops all other columns that is not the 'First Name' and 'Last Name'.\n", + "\n", + " Args:\n", + " df (pd.DataFrame): A data frame containing at least 'First Name' and 'Last Name' columns.\n", + "\n", + " Returns:\n", + " pd.DataFrame: A Data Frame with only the 'First Name' and 'Last Name' Columns\n", + " \"\"\"\n", + " df.columns = df.columns.str.title()\n", + " col_to_keep = ['First Name', 'Last Name']\n", + " return df[col_to_keep].copy()" + ] + }, { "cell_type": "code", "execution_count": 6, + "id": "a3b7e280", + "metadata": {}, + "outputs": [], + "source": [ + "def process_meeting_times(df: pd.DataFrame) -> pd.DataFrame:\n", + " \"\"\"\n", + " Standardize meeting time columns and calculate duration.\n", + "\n", + " Steps performed:\n", + " 1. Converts 'Time Joined' and 'Time Exited' columns to datetime objects.\n", + " 2. Calculates the meeting duration in minutes and stores it in 'Duration in Minutes'.\n", + "\n", + " Parameters\n", + " ----------\n", + " df : pd.DataFrame\n", + " DataFrame containing meeting data with 'Time Joined' and 'Time Exited' columns.\n", + "\n", + " Returns\n", + " -------\n", + " pd.DataFrame\n", + " Updated DataFrame with time columns as datetime and a duration column.\n", + " \"\"\"\n", + " df.columns = df.columns.str.title()\n", + " df['Time Joined'] = pd.to_datetime(df['Time Joined'], format='%I:%M %p', errors='coerce')\n", + " df['Time Exited'] = pd.to_datetime(df['Time Exited'], format='%I:%M %p', errors='coerce')\n", + " df['Duration In Minutes'] = (\n", + " df['Time Exited'] - df['Time Joined']\n", + " ).dt.total_seconds() / 60\n", + " return df\n", + "\n", + "\n", + "def add_full_name(df: pd.DataFrame) -> pd.DataFrame:\n", + " \"\"\"\n", + " Add a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", + "\n", + " Parameters\n", + " ----------\n", + " df : pd.DataFrame\n", + " DataFrame containing 'First Name' and 'Last Name' columns.\n", + "\n", + " Returns\n", + " -------\n", + " pd.DataFrame\n", + " DataFrame with a new 'Full Name' column.\n", + " \"\"\"\n", + " df['Full Name'] = df['First Name'] + ' ' + df['Last Name']\n", + " return df" + ] + }, + { + "cell_type": "code", + "execution_count": 27, "id": "c3b40f9d", "metadata": {}, "outputs": [], "source": [ - "def clean_staff_df(df: pd.DataFrame) -> pd.DataFrame:\n", + "def clean_name_df(df: pd.DataFrame) -> pd.DataFrame:\n", " \"\"\"\n", - " Clean and standardize a staff DataFrame.\n", + " Clean and standardize names for a DataFrame.\n", "\n", " Steps performed:\n", " 1. Capitalizes column names for consistency.\n", - " 2. Drops unused columns: 'Alternate Name', 'Email', 'Region'.\n", + " 2. Drops all comlumns that are not 'Fist Name' or 'Last Name'\n", + " 3. Fill null values in name columns.\n", " 3. Creates a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", "\n", " Parameters\n", " ----------\n", " df : pd.DataFrame\n", - " Input DataFrame containing staff data.\n", + " Input DataFrame containing name data.\n", "\n", " Returns\n", " -------\n", " pd.DataFrame\n", " A cleaned DataFrame with standardized columns and a 'Full Name' field.\n", " \"\"\"\n", - " df.columns = df.columns.str.title()\n", - " df = df.drop(columns=['Alternate Name', 'Email', 'Region'], errors='ignore')\n", - " df[\"Full Name\"] = df['First Name'] + ' ' + df['Last Name']\n", + " df = keep_name(df)\n", + " if df.isna().any().any() == True:\n", + " for col in df:\n", + " if df[col].isna().any():\n", + " df[col] = df[col].fillna('Unknown')\n", + " print(f\"Missing name in {col} filled with Unknown\")\n", + " df = add_full_name(df)\n", "\n", " return df" ] @@ -1015,7 +1077,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "id": "628949fb", "metadata": {}, "outputs": [ @@ -1023,36 +1085,37 @@ "name": "stdout", "output_type": "stream", "text": [ - "\u001b[31mSignature:\u001b[39m clean_staff_df(df: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame\n", - "\u001b[31mDocstring:\u001b[39m\n", - "Clean and standardize a staff DataFrame.\n", + "\u001b[1;31mSignature:\u001b[0m \u001b[0mclean_name_df\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdf\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mpandas\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mframe\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m->\u001b[0m \u001b[0mpandas\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mframe\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mDocstring:\u001b[0m\n", + "Clean and standardize names for a DataFrame.\n", "\n", "Steps performed:\n", "1. Capitalizes column names for consistency.\n", - "2. Drops unused columns: 'Alternate Name', 'Email', 'Region'.\n", + "2. Drops all comlumns that are not 'Fist Name' or 'Last Name'\n", + "3. Fill null values in name columns.\n", "3. Creates a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", "\n", "Parameters\n", "----------\n", "df : pd.DataFrame\n", - " Input DataFrame containing staff data.\n", + " Input DataFrame containing name data.\n", "\n", "Returns\n", "-------\n", "pd.DataFrame\n", " A cleaned DataFrame with standardized columns and a 'Full Name' field.\n", - "\u001b[31mFile:\u001b[39m /var/folders/2d/yt4_w6zn5pbfjg_jx5sdmm180000gn/T/ipykernel_38707/3720898642.py\n", - "\u001b[31mType:\u001b[39m function" + "\u001b[1;31mFile:\u001b[0m c:\\users\\leolion023\\appdata\\local\\temp\\ipykernel_72684\\4215164641.py\n", + "\u001b[1;31mType:\u001b[0m function" ] } ], "source": [ - "clean_staff_df?" + "clean_name_df?" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 9, "id": "9e6b2ba9", "metadata": {}, "outputs": [ @@ -1081,7 +1144,7 @@ "type": "string" } ], - "ref": "511a1322-e76a-470a-bb55-1fd0d04b55ba", + "ref": "8314011b-fac1-47fa-9974-110a469be71f", "rows": [ [ "0", @@ -1343,23 +1406,35 @@ "16 Tonia Nolden Tonia Nolden" ] }, - "execution_count": 6, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "staff_list = clean_staff_df(staff_df)\n", + "staff_list = clean_name_df(staff_df)\n", "staff_list" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "id": "56dba6e7", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "'\\ndef clean_mentor_df(df: pd.DataFrame) -> pd.DataFrame:\\n \"\"\"\\n Clean and standardize a mentor DataFrame.\\n\\n Steps performed:\\n 1. Fills missing values in the \\'Last Name\\' column with \\'Unknown\\'.\\n 2. Drops the \\'Alternate Name\\' column if it exists.\\n 3. Creates a \\'Full Name\\' column by combining \\'First Name\\' and \\'Last Name\\'.\\n\\n Parameters\\n ----------\\n df : pd.DataFrame\\n Input DataFrame containing mentor data.\\n\\n Returns\\n -------\\n pd.DataFrame\\n A cleaned DataFrame with standardized fields and a \\'Full Name\\' column.\\n \"\"\"\\n \\n df[\\'Last Name\\'] = df[\\'Last Name\\'].fillna(\\'Unknown\\')\\n df = df.drop(columns=\\'Alternate Name\\', errors=\\'ignore\\')\\n df[\\'Full Name\\'] = df[\\'First Name\\'] + \\' \\' + df[\\'Last Name\\']\\n \\n return df\\n'" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ + "'''\n", "def clean_mentor_df(df: pd.DataFrame) -> pd.DataFrame:\n", " \"\"\"\n", " Clean and standardize a mentor DataFrame.\n", @@ -1384,52 +1459,33 @@ " df = df.drop(columns='Alternate Name', errors='ignore')\n", " df['Full Name'] = df['First Name'] + ' ' + df['Last Name']\n", " \n", - " return df" + " return df\n", + "'''" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 11, "id": "6c86df50", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[31mSignature:\u001b[39m clean_mentor_df(df: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame\n", - "\u001b[31mDocstring:\u001b[39m\n", - "Clean and standardize a mentor DataFrame.\n", - "\n", - "Steps performed:\n", - "1. Fills missing values in the 'Last Name' column with 'Unknown'.\n", - "2. Drops the 'Alternate Name' column if it exists.\n", - "3. Creates a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", - "\n", - "Parameters\n", - "----------\n", - "df : pd.DataFrame\n", - " Input DataFrame containing mentor data.\n", - "\n", - "Returns\n", - "-------\n", - "pd.DataFrame\n", - " A cleaned DataFrame with standardized fields and a 'Full Name' column.\n", - "\u001b[31mFile:\u001b[39m /var/folders/2d/yt4_w6zn5pbfjg_jx5sdmm180000gn/T/ipykernel_38707/1949478838.py\n", - "\u001b[31mType:\u001b[39m function" - ] - } - ], + "outputs": [], "source": [ - "clean_mentor_df?" + "##clean_mentor_df?" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 28, "id": "115b41b9", "metadata": {}, "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Missing name in Last Name filled with Unknown\n" + ] + }, { "data": { "application/vnd.microsoft.datawrangler.viewer.v0+json": { @@ -1455,7 +1511,7 @@ "type": "string" } ], - "ref": "e85843c5-f48a-4042-b413-bf0fa35e4f26", + "ref": "e592a15c-e6d0-4e3d-9a8f-7fa61fee0016", "rows": [ [ "0", @@ -1964,19 +2020,19 @@ "35 Sunny Zanchi Sunny Zanchi" ] }, - "execution_count": 8, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "mentor_list = clean_mentor_df(mentor_df)\n", + "mentor_list = clean_name_df(mentor_df)\n", "mentor_list" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 13, "id": "74a3b369", "metadata": {}, "outputs": [ @@ -2020,7 +2076,7 @@ "type": "string" } ], - "ref": "a89cf578-6332-40a2-bbc7-e2ce543ae452", + "ref": "8825687e-6c93-4094-a5ff-afb20d1184b1", "rows": [ [ "0", @@ -2386,7 +2442,7 @@ "15 6:01 PM 8:26 PM " ] }, - "execution_count": 9, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -2397,76 +2453,8 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "125e4482", - "metadata": {}, - "outputs": [], - "source": [ - "def clean_meeting(df: pd.DataFrame) -> pd.DataFrame:\n", - " df.columns = df.columns.str.title() #make column names consistent\n", - " df['Time Joined'] = pd.to_datetime(df['Time Joined'], format='%I:%M %p') #convert time to make it more accessible\n", - " df['Time Exited'] = pd.to_datetime(df['Time Exited'], format='%I:%M %p') #convert time to make it more accessible\n", - " df['Duration in Minutes'] = (df['Time Exited'] - df['Time Joined']).dt.total_seconds() / 60 #calculate numnber of minutes\n", - " df[\"Full Name\"] = df['First Name'] + ' ' + df['Last Name'] #create full name column\n", - " return df" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "64fd8af3", - "metadata": {}, - "outputs": [], - "source": [ - "def process_meeting_times(df: pd.DataFrame) -> pd.DataFrame:\n", - " \"\"\"\n", - " Standardize meeting time columns and calculate duration.\n", - "\n", - " Steps performed:\n", - " 1. Converts 'Time Joined' and 'Time Exited' columns to datetime objects.\n", - " 2. Calculates the meeting duration in minutes and stores it in 'Duration in Minutes'.\n", - "\n", - " Parameters\n", - " ----------\n", - " df : pd.DataFrame\n", - " DataFrame containing meeting data with 'Time Joined' and 'Time Exited' columns.\n", - "\n", - " Returns\n", - " -------\n", - " pd.DataFrame\n", - " Updated DataFrame with time columns as datetime and a duration column.\n", - " \"\"\"\n", - " df.columns = df.columns.str.title()\n", - " df['Time Joined'] = pd.to_datetime(df['Time Joined'], format='%I:%M %p', errors='coerce')\n", - " df['Time Exited'] = pd.to_datetime(df['Time Exited'], format='%I:%M %p', errors='coerce')\n", - " df['Duration In Minutes'] = (\n", - " df['Time Exited'] - df['Time Joined']\n", - " ).dt.total_seconds() / 60\n", - " return df\n", - "\n", - "\n", - "def add_full_name(df: pd.DataFrame) -> pd.DataFrame:\n", - " \"\"\"\n", - " Add a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", - "\n", - " Parameters\n", - " ----------\n", - " df : pd.DataFrame\n", - " DataFrame containing 'First Name' and 'Last Name' columns.\n", - "\n", - " Returns\n", - " -------\n", - " pd.DataFrame\n", - " DataFrame with a new 'Full Name' column.\n", - " \"\"\"\n", - " df['Full Name'] = df['First Name'] + ' ' + df['Last Name']\n", - " return df" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "03fa1b54", + "execution_count": 14, + "id": "00cc7690", "metadata": {}, "outputs": [ { @@ -2509,7 +2497,7 @@ "type": "datetime" }, { - "name": "Duration in Minutes", + "name": "Duration In Minutes", "rawType": "float64", "type": "float" }, @@ -2519,7 +2507,7 @@ "type": "string" } ], - "ref": "478cb0d6-23c0-4a3b-8903-4a493f6302fa", + "ref": "c231e819-ff85-4aee-aa88-b04cda8e956a", "rows": [ [ "0", @@ -2728,7 +2716,7 @@ " Duration\n", " Time Joined\n", " Time Exited\n", - " Duration in Minutes\n", + " Duration In Minutes\n", " Full Name\n", " \n", " \n", @@ -2932,7 +2920,7 @@ "14 Zachary Young zach*************@***.com 2 hr 6 min \n", "15 Zhenzhen Xie xzz.**********@***.com 2 hr 24 min \n", "\n", - " Time Joined Time Exited Duration in Minutes \\\n", + " Time Joined Time Exited Duration In Minutes \\\n", "0 1900-01-01 18:01:00 1900-01-01 20:26:00 145.0 \n", "1 1900-01-01 17:59:00 1900-01-01 20:27:00 148.0 \n", "2 1900-01-01 17:59:00 1900-01-01 20:26:00 147.0 \n", @@ -2969,20 +2957,34 @@ "15 Zhenzhen Xie " ] }, - "execution_count": 11, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "meeting_1_cleaned = clean_meeting(meeting_1)\n", - "meeting_1_cleaned" + "test = process_meeting_times(meeting_1)\n", + "test = add_full_name(test)\n", + "test" ] }, { "cell_type": "code", - "execution_count": null, - "id": "223affd0", + "execution_count": 15, + "id": "838ca4e1", + "metadata": {}, + "outputs": [], + "source": [ + "def clean_meeting(df: pd.DataFrame) -> pd.DataFrame:\n", + " df = process_meeting_times(df)\n", + " df = add_full_name(df)\n", + " return df" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "03fa1b54", "metadata": {}, "outputs": [ { @@ -2995,34 +2997,595 @@ "type": "integer" }, { - "name": "Full Name", + "name": "First Name", + "rawType": "object", + "type": "string" + }, + { + "name": "Last Name", + "rawType": "object", + "type": "string" + }, + { + "name": "Email", + "rawType": "object", + "type": "string" + }, + { + "name": "Duration", "rawType": "object", "type": "string" }, { - "name": "Duration in Minutes", + "name": "Time Joined", + "rawType": "datetime64[ns]", + "type": "datetime" + }, + { + "name": "Time Exited", + "rawType": "datetime64[ns]", + "type": "datetime" + }, + { + "name": "Duration In Minutes", "rawType": "float64", "type": "float" + }, + { + "name": "Full Name", + "rawType": "object", + "type": "string" } ], - "ref": "3fc867e1-bb6c-4849-9679-9581dfb7fada", + "ref": "1faff16c-03b5-46f8-ba0a-8650f61a2dc3", "rows": [ [ "0", - "Alex D", - "145.0" + "Alex", + "D", + "awda*****@***.com", + "2 hr 25 min", + "1900-01-01 18:01:00", + "1900-01-01 20:26:00", + "145.0", + "Alex D" ], [ "1", - "Bill Montgomery", - "147.0" + "Angela", + "Moore", + "ange*************@***.com", + "2 hr 29 min", + "1900-01-01 17:59:00", + "1900-01-01 20:27:00", + "148.0", + "Angela Moore" ], [ "2", - "Christina Porter", - "124.0" - ] - ], + "Bill", + "Montgomery", + "kyho***@***.com", + "2 hr 27 min", + "1900-01-01 17:59:00", + "1900-01-01 20:26:00", + "147.0", + "Bill Montgomery" + ], + [ + "3", + "Charles", + "Norman", + "ario****@***.com", + "2 hr 42 min", + "1900-01-01 17:45:00", + "1900-01-01 20:27:00", + "162.0", + "Charles Norman" + ], + [ + "4", + "Christina", + "Porter", + "chri**************@***.com", + "2 hr 4 min", + "1900-01-01 18:15:00", + "1900-01-01 20:19:00", + "124.0", + "Christina Porter" + ], + [ + "5", + "Cindy", + "Wedding", + "cwed*******@***.com", + "2 hr 22 min", + "1900-01-01 18:03:00", + "1900-01-01 20:25:00", + "142.0", + "Cindy Wedding" + ], + [ + "6", + "Classroom", + "Admin", + "classroom@codeyou.org", + "1 min", + "1900-01-01 17:59:00", + "1900-01-01 18:00:00", + "1.0", + "Classroom Admin" + ], + [ + "7", + "Joel", + "Anderson", + "joel*************@***.com", + "2 hr 27 min", + "1900-01-01 18:00:00", + "1900-01-01 20:27:00", + "147.0", + "Joel Anderson" + ], + [ + "8", + "Jonathan", + "Chadwell", + "jona*******************@***.com", + "2 hr 24 min", + "1900-01-01 18:02:00", + "1900-01-01 20:26:00", + "144.0", + "Jonathan Chadwell" + ], + [ + "9", + "Mendell", + "M", + "menm****@***.com", + "1 hr 58 min", + "1900-01-01 18:00:00", + "1900-01-01 20:00:00", + "120.0", + "Mendell M" + ], + [ + "10", + "Oli", + "Ivanova", + "olga************@***.com", + "2 hr 14 min", + "1900-01-01 17:59:00", + "1900-01-01 20:13:00", + "134.0", + "Oli Ivanova" + ], + [ + "11", + "S.", + "Byrnes", + "smby***@***.com", + "1 hr 58 min", + "1900-01-01 18:02:00", + "1900-01-01 20:00:00", + "118.0", + "S. Byrnes" + ], + [ + "12", + "Tara Leigh", + "Hylton", + "turr******@***.com", + "2 hr 5 min", + "1900-01-01 18:01:00", + "1900-01-01 20:06:00", + "125.0", + "Tara Leigh Hylton" + ], + [ + "13", + "Whitney", + "Parks", + "wypa*****@***.com", + "2 hr 38 min", + "1900-01-01 18:01:00", + "1900-01-01 20:39:00", + "158.0", + "Whitney Parks" + ], + [ + "14", + "Zachary", + "Young", + "zach*************@***.com", + "2 hr 6 min", + "1900-01-01 17:54:00", + "1900-01-01 20:00:00", + "126.0", + "Zachary Young" + ], + [ + "15", + "Zhenzhen", + "Xie", + "xzz.**********@***.com", + "2 hr 24 min", + "1900-01-01 18:01:00", + "1900-01-01 20:26:00", + "145.0", + "Zhenzhen Xie" + ] + ], + "shape": { + "columns": 8, + "rows": 16 + } + }, + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
First NameLast NameEmailDurationTime JoinedTime ExitedDuration In MinutesFull Name
0AlexDawda*****@***.com2 hr 25 min1900-01-01 18:01:001900-01-01 20:26:00145.0Alex D
1AngelaMooreange*************@***.com2 hr 29 min1900-01-01 17:59:001900-01-01 20:27:00148.0Angela Moore
2BillMontgomerykyho***@***.com2 hr 27 min1900-01-01 17:59:001900-01-01 20:26:00147.0Bill Montgomery
3CharlesNormanario****@***.com2 hr 42 min1900-01-01 17:45:001900-01-01 20:27:00162.0Charles Norman
4ChristinaPorterchri**************@***.com2 hr 4 min1900-01-01 18:15:001900-01-01 20:19:00124.0Christina Porter
5CindyWeddingcwed*******@***.com2 hr 22 min1900-01-01 18:03:001900-01-01 20:25:00142.0Cindy Wedding
6ClassroomAdminclassroom@codeyou.org1 min1900-01-01 17:59:001900-01-01 18:00:001.0Classroom Admin
7JoelAndersonjoel*************@***.com2 hr 27 min1900-01-01 18:00:001900-01-01 20:27:00147.0Joel Anderson
8JonathanChadwelljona*******************@***.com2 hr 24 min1900-01-01 18:02:001900-01-01 20:26:00144.0Jonathan Chadwell
9MendellMmenm****@***.com1 hr 58 min1900-01-01 18:00:001900-01-01 20:00:00120.0Mendell M
10OliIvanovaolga************@***.com2 hr 14 min1900-01-01 17:59:001900-01-01 20:13:00134.0Oli Ivanova
11S.Byrnessmby***@***.com1 hr 58 min1900-01-01 18:02:001900-01-01 20:00:00118.0S. Byrnes
12Tara LeighHyltonturr******@***.com2 hr 5 min1900-01-01 18:01:001900-01-01 20:06:00125.0Tara Leigh Hylton
13WhitneyParkswypa*****@***.com2 hr 38 min1900-01-01 18:01:001900-01-01 20:39:00158.0Whitney Parks
14ZacharyYoungzach*************@***.com2 hr 6 min1900-01-01 17:54:001900-01-01 20:00:00126.0Zachary Young
15ZhenzhenXiexzz.**********@***.com2 hr 24 min1900-01-01 18:01:001900-01-01 20:26:00145.0Zhenzhen Xie
\n", + "
" + ], + "text/plain": [ + " First Name Last Name Email Duration \\\n", + "0 Alex D awda*****@***.com 2 hr 25 min \n", + "1 Angela Moore ange*************@***.com 2 hr 29 min \n", + "2 Bill Montgomery kyho***@***.com 2 hr 27 min \n", + "3 Charles Norman ario****@***.com 2 hr 42 min \n", + "4 Christina Porter chri**************@***.com 2 hr 4 min \n", + "5 Cindy Wedding cwed*******@***.com 2 hr 22 min \n", + "6 Classroom Admin classroom@codeyou.org 1 min \n", + "7 Joel Anderson joel*************@***.com 2 hr 27 min \n", + "8 Jonathan Chadwell jona*******************@***.com 2 hr 24 min \n", + "9 Mendell M menm****@***.com 1 hr 58 min \n", + "10 Oli Ivanova olga************@***.com 2 hr 14 min \n", + "11 S. Byrnes smby***@***.com 1 hr 58 min \n", + "12 Tara Leigh Hylton turr******@***.com 2 hr 5 min \n", + "13 Whitney Parks wypa*****@***.com 2 hr 38 min \n", + "14 Zachary Young zach*************@***.com 2 hr 6 min \n", + "15 Zhenzhen Xie xzz.**********@***.com 2 hr 24 min \n", + "\n", + " Time Joined Time Exited Duration In Minutes \\\n", + "0 1900-01-01 18:01:00 1900-01-01 20:26:00 145.0 \n", + "1 1900-01-01 17:59:00 1900-01-01 20:27:00 148.0 \n", + "2 1900-01-01 17:59:00 1900-01-01 20:26:00 147.0 \n", + "3 1900-01-01 17:45:00 1900-01-01 20:27:00 162.0 \n", + "4 1900-01-01 18:15:00 1900-01-01 20:19:00 124.0 \n", + "5 1900-01-01 18:03:00 1900-01-01 20:25:00 142.0 \n", + "6 1900-01-01 17:59:00 1900-01-01 18:00:00 1.0 \n", + "7 1900-01-01 18:00:00 1900-01-01 20:27:00 147.0 \n", + "8 1900-01-01 18:02:00 1900-01-01 20:26:00 144.0 \n", + "9 1900-01-01 18:00:00 1900-01-01 20:00:00 120.0 \n", + "10 1900-01-01 17:59:00 1900-01-01 20:13:00 134.0 \n", + "11 1900-01-01 18:02:00 1900-01-01 20:00:00 118.0 \n", + "12 1900-01-01 18:01:00 1900-01-01 20:06:00 125.0 \n", + "13 1900-01-01 18:01:00 1900-01-01 20:39:00 158.0 \n", + "14 1900-01-01 17:54:00 1900-01-01 20:00:00 126.0 \n", + "15 1900-01-01 18:01:00 1900-01-01 20:26:00 145.0 \n", + "\n", + " Full Name \n", + "0 Alex D \n", + "1 Angela Moore \n", + "2 Bill Montgomery \n", + "3 Charles Norman \n", + "4 Christina Porter \n", + "5 Cindy Wedding \n", + "6 Classroom Admin \n", + "7 Joel Anderson \n", + "8 Jonathan Chadwell \n", + "9 Mendell M \n", + "10 Oli Ivanova \n", + "11 S. Byrnes \n", + "12 Tara Leigh Hylton \n", + "13 Whitney Parks \n", + "14 Zachary Young \n", + "15 Zhenzhen Xie " + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "meeting_1_cleaned = clean_meeting(meeting_1)\n", + "meeting_1_cleaned" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "0edd39e3", + "metadata": {}, + "outputs": [], + "source": [ + "def match_meeting_times(clean_list: pd.DataFrame,clean_meeting_time: pd.DataFrame) -> pd.DataFrame:\n", + " \"\"\"\n", + " Merges two DataFrame containing the name and duration of members that were present for a meeting.\n", + "\n", + " Args:\n", + " clean_list (pd.DataFrame): A DataFrame containing the 'Full Name' column.\n", + " clean_meeting_time (pd.DataFrame): A DataFrame containing 'Duration in Minutes' and 'Full Name' columns.\n", + "\n", + " Returns:\n", + " pd.DataFrame: A DataFrame containing the 'Full Name' and 'Duration in Minutes' columns.\n", + " \"\"\"\n", + " df = pd.merge(clean_list['Full Name'],clean_meeting_time[['Duration In Minutes','Full Name']], how = 'inner',on='Full Name')\n", + " return df" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "78bfd7b7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['First Name', 'Last Name', 'Email', 'Duration', 'Time Joined',\n", + " 'Time Exited', 'Duration In Minutes', 'Full Name'],\n", + " dtype='object')" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "meeting_1_cleaned.columns" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "976408a3", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.microsoft.datawrangler.viewer.v0+json": { + "columns": [ + { + "name": "index", + "rawType": "int64", + "type": "integer" + }, + { + "name": "Full Name", + "rawType": "object", + "type": "string" + }, + { + "name": "Duration In Minutes", + "rawType": "float64", + "type": "float" + } + ], + "ref": "f7a7d0d4-2848-45e7-8825-39fee1ac5a46", + "rows": [ + [ + "0", + "Alex D", + "145.0" + ], + [ + "1", + "Bill Montgomery", + "147.0" + ], + [ + "2", + "Christina Porter", + "124.0" + ] + ], "shape": { "columns": 2, "rows": 3 @@ -3048,7 +3611,7 @@ " \n", " \n", " Full Name\n", - " Duration in Minutes\n", + " Duration In Minutes\n", " \n", " \n", " \n", @@ -3072,27 +3635,27 @@ "" ], "text/plain": [ - " Full Name Duration in Minutes\n", + " Full Name Duration In Minutes\n", "0 Alex D 145.0\n", "1 Bill Montgomery 147.0\n", "2 Christina Porter 124.0" ] }, - "execution_count": 12, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#merge meeting 1 with mentor list to consolidate into list of mentors that where present and how long they where present\n", - "mentor_time_df = pd.merge(mentor_list['Full Name'], meeting_1_cleaned[['Duration in Minutes', 'Full Name']], how= 'inner', on='Full Name')\n", - "mentor_time_df" + "mentor_time = match_meeting_times(mentor_list,meeting_1_cleaned)\n", + "mentor_time" ] }, { "cell_type": "code", - "execution_count": null, - "id": "976408a3", + "execution_count": 20, + "id": "4aed423e", "metadata": {}, "outputs": [ { @@ -3110,12 +3673,12 @@ "type": "string" }, { - "name": "Duration in Minutes", + "name": "Duration In Minutes", "rawType": "float64", "type": "float" } ], - "ref": "ba38fd82-f12a-46dd-8eed-e6d90293376d", + "ref": "eb682ab3-8432-498b-af9d-28a20d1046ef", "rows": [], "shape": { "columns": 2, @@ -3142,7 +3705,7 @@ " \n", " \n", " Full Name\n", - " Duration in Minutes\n", + " Duration In Minutes\n", " \n", " \n", " \n", @@ -3152,24 +3715,24 @@ ], "text/plain": [ "Empty DataFrame\n", - "Columns: [Full Name, Duration in Minutes]\n", + "Columns: [Full Name, Duration In Minutes]\n", "Index: []" ] }, - "execution_count": 13, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "#merge meeting 1 with staff list to consolidate into list of staff that where present and how long they where present\n", - "staff_time = pd.merge(staff_list['Full Name'], meeting_1_cleaned[['Duration in Minutes', 'Full Name']], how= 'inner', on='Full Name')\n", + "#merge staff 1 with mentor list to consolidate into list of staff that where present and how long they where present\n", + "staff_time = match_meeting_times(staff_list,meeting_1_cleaned)\n", "staff_time" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 21, "id": "2bfdd92e", "metadata": {}, "outputs": [ @@ -3213,7 +3776,7 @@ "type": "datetime" }, { - "name": "Duration in Minutes", + "name": "Duration In Minutes", "rawType": "float64", "type": "float" }, @@ -3223,7 +3786,7 @@ "type": "string" } ], - "ref": "1ec04c56-7868-44a7-8ad2-9258af5f4e2d", + "ref": "7810ceb3-468b-4804-8489-844fc1b99746", "rows": [ [ "0", @@ -3410,7 +3973,7 @@ " Duration\n", " Time Joined\n", " Time Exited\n", - " Duration in Minutes\n", + " Duration In Minutes\n", " Full Name\n", " \n", " \n", @@ -3590,7 +4153,7 @@ "12 Jill Schrank just*******@***.com 1 hr 41 min \n", "13 Huan Song huan********@***.com 1 hr 43 min \n", "\n", - " Time Joined Time Exited Duration in Minutes \\\n", + " Time Joined Time Exited Duration In Minutes \\\n", "0 1900-01-01 17:58:00 1900-01-01 19:41:00 103.0 \n", "1 1900-01-01 18:01:00 1900-01-01 19:41:00 100.0 \n", "2 1900-01-01 17:55:00 1900-01-01 19:41:00 106.0 \n", @@ -3623,7 +4186,7 @@ "13 Huan Song " ] }, - "execution_count": 14, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -3635,7 +4198,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 22, "id": "b489007c", "metadata": {}, "outputs": [ @@ -3654,12 +4217,12 @@ "type": "string" }, { - "name": "Duration in Minutes", + "name": "Duration In Minutes", "rawType": "float64", "type": "float" } ], - "ref": "8a873a00-7eaf-4171-95b5-5eae1f6200ce", + "ref": "251e82bf-bfa1-45de-9f78-bb0fcb1d4758", "rows": [ [ "0", @@ -3692,7 +4255,7 @@ " \n", " \n", " Full Name\n", - " Duration in Minutes\n", + " Duration In Minutes\n", " \n", " \n", " \n", @@ -3706,24 +4269,24 @@ "" ], "text/plain": [ - " Full Name Duration in Minutes\n", + " Full Name Duration In Minutes\n", "0 Michael Puckett 97.0" ] }, - "execution_count": 15, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#merge meeting 2 with mentor list to consolidate into list of mentors that where present and how long they where present\n", - "mentor_time_df2 = pd.merge(mentor_list['Full Name'], meeting_2_cleaned[['Duration in Minutes', 'Full Name']], how= 'inner', on='Full Name')\n", - "mentor_time_df2" + "mentor_time_2 = match_meeting_times(mentor_list,meeting_2_cleaned)\n", + "mentor_time_2" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 23, "id": "20023162", "metadata": {}, "outputs": [ @@ -3742,12 +4305,12 @@ "type": "string" }, { - "name": "Duration in Minutes", + "name": "Duration In Minutes", "rawType": "float64", "type": "float" } ], - "ref": "7a386f2f-97a8-4c48-8c00-a21c52db1767", + "ref": "5e28508c-8c99-4248-a1b7-d21a9d16885b", "rows": [], "shape": { "columns": 2, @@ -3774,7 +4337,7 @@ " \n", " \n", " Full Name\n", - " Duration in Minutes\n", + " Duration In Minutes\n", " \n", " \n", " \n", @@ -3784,25 +4347,33 @@ ], "text/plain": [ "Empty DataFrame\n", - "Columns: [Full Name, Duration in Minutes]\n", + "Columns: [Full Name, Duration In Minutes]\n", "Index: []" ] }, - "execution_count": 16, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#merge meeting 2 with staff list to consolidate into list of staff that where present and how long they where present\n", - "staff_time_2 = pd.merge(staff_list['Full Name'], meeting_1_cleaned[['Duration in Minutes', 'Full Name']], how= 'inner', on='Full Name')\n", + "staff_time_2 = match_meeting_times(staff_list,meeting_2_cleaned)\n", "staff_time_2" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "88a26efe", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "venv (3.12.2)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -3816,7 +4387,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.2" + "version": "3.13.0" } }, "nbformat": 4, From 1e12327b1267f488fbad27661090d6763d6f340e Mon Sep 17 00:00:00 2001 From: leolion023 Date: Thu, 21 Aug 2025 21:29:56 -0400 Subject: [PATCH 2/4] add edge case for cleaning names --- src/notebook/notebook.ipynb | 220 +++++++++++++++++++++--------------- 1 file changed, 129 insertions(+), 91 deletions(-) diff --git a/src/notebook/notebook.ipynb b/src/notebook/notebook.ipynb index 403df05..d7ea23a 100644 --- a/src/notebook/notebook.ipynb +++ b/src/notebook/notebook.ipynb @@ -2,18 +2,19 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 27, "id": "cc02d731", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", + "import numpy as np\n", "from typing import List, Optional" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 28, "id": "5987e035", "metadata": {}, "outputs": [], @@ -26,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 29, "id": "886a505c", "metadata": {}, "outputs": [ @@ -55,7 +56,7 @@ "type": "unknown" } ], - "ref": "cf1aa62b-bfc8-4121-9908-273368270ce2", + "ref": "00370dd1-82cd-4877-826f-e534f6db234e", "rows": [ [ "0", @@ -564,7 +565,7 @@ "35 Sunny Zanchi NaN" ] }, - "execution_count": 3, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -575,7 +576,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 30, "id": "14c2c742", "metadata": {}, "outputs": [ @@ -596,7 +597,7 @@ { "name": "Last name", "rawType": "object", - "type": "string" + "type": "unknown" }, { "name": "Alternate Name", @@ -614,7 +615,7 @@ "type": "float" } ], - "ref": "db1e5e5f-b294-4c78-8240-f1c54afb2b58", + "ref": "7b7c1300-9418-4278-bc1c-c0de40ca605c", "rows": [ [ "0", @@ -751,11 +752,27 @@ null, null, null + ], + [ + "17", + "John Smith", + null, + null, + null, + null + ], + [ + "18", + "Klive", + null, + null, + null, + null ] ], "shape": { "columns": 5, - "rows": 17 + "rows": 19 } }, "text/html": [ @@ -921,32 +938,50 @@ " NaN\n", " NaN\n", " \n", + " \n", + " 17\n", + " John Smith\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " 18\n", + " Klive\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", " \n", "\n", "" ], "text/plain": [ - " First Name Last name Alternate Name Email Region\n", - "0 Ailene Johnston NaN NaN NaN\n", - "1 Alli Rippy NaN NaN NaN\n", - "2 Amanda Gearhart NaN NaN NaN\n", - "3 August Mapp NaN NaN NaN\n", - "4 Blake Herbert NaN NaN NaN\n", - "5 Brian Luerman NaN NaN NaN\n", - "6 classroom admin NaN NaN NaN\n", - "7 Dan Collins NaN NaN NaN\n", - "8 Danny Morton NaN NaN NaN\n", - "9 David York NaN NaN NaN\n", - "10 Emily Sullivan NaN NaN NaN\n", - "11 Jared Mueller NaN NaN NaN\n", - "12 Jenny Terry NaN NaN NaN\n", - "13 Kalee Howard NaN NaN NaN\n", - "14 Rekkai Steed NaN NaN NaN\n", - "15 Shannon Sheehy NaN NaN NaN\n", - "16 Tonia Nolden NaN NaN NaN" + " First Name Last name Alternate Name Email Region\n", + "0 Ailene Johnston NaN NaN NaN\n", + "1 Alli Rippy NaN NaN NaN\n", + "2 Amanda Gearhart NaN NaN NaN\n", + "3 August Mapp NaN NaN NaN\n", + "4 Blake Herbert NaN NaN NaN\n", + "5 Brian Luerman NaN NaN NaN\n", + "6 classroom admin NaN NaN NaN\n", + "7 Dan Collins NaN NaN NaN\n", + "8 Danny Morton NaN NaN NaN\n", + "9 David York NaN NaN NaN\n", + "10 Emily Sullivan NaN NaN NaN\n", + "11 Jared Mueller NaN NaN NaN\n", + "12 Jenny Terry NaN NaN NaN\n", + "13 Kalee Howard NaN NaN NaN\n", + "14 Rekkai Steed NaN NaN NaN\n", + "15 Shannon Sheehy NaN NaN NaN\n", + "16 Tonia Nolden NaN NaN NaN\n", + "17 John Smith NaN NaN NaN NaN\n", + "18 Klive NaN NaN NaN NaN" ] }, - "execution_count": 4, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -957,7 +992,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 31, "id": "3df8b097", "metadata": {}, "outputs": [], @@ -979,7 +1014,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 32, "id": "a3b7e280", "metadata": {}, "outputs": [], @@ -1031,7 +1066,31 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 33, + "id": "bd9d1679", + "metadata": {}, + "outputs": [], + "source": [ + "def split_names(df: pd.DataFrame) -> pd.DataFrame:\n", + " \"\"\"Function accounting for instance where first name column contains more than just the first name\n", + "\n", + " Args:\n", + " df (pd.DataFrame): DataFrame that needs to be checked for more than one name in first name\n", + "\n", + " Returns:\n", + " pd.DataFrame: DataFrame containing only the first name in the first name column and fills the last name column with the last name\n", + " \"\"\"\n", + " if ' ' in df['First Name']:\n", + " names = df['First Name'].split()\n", + " if len(names) >= 2:\n", + " df['First Name'] = names[0]\n", + " df['Last Name'] = names[-1]\n", + " return df" + ] + }, + { + "cell_type": "code", + "execution_count": 34, "id": "c3b40f9d", "metadata": {}, "outputs": [], @@ -1044,7 +1103,8 @@ " 1. Capitalizes column names for consistency.\n", " 2. Drops all comlumns that are not 'Fist Name' or 'Last Name'\n", " 3. Fill null values in name columns.\n", - " 3. Creates a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", + " 4. Accounts for instance where 'First Name' contains 'Last Name'\n", + " 5. Creates a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", "\n", " Parameters\n", " ----------\n", @@ -1058,10 +1118,8 @@ " \"\"\"\n", " df = keep_name(df)\n", " if df.isna().any().any() == True:\n", - " for col in df:\n", - " if df[col].isna().any():\n", - " df[col] = df[col].fillna('Unknown')\n", - " print(f\"Missing name in {col} filled with Unknown\")\n", + " df = df.fillna('Unknown')\n", + " df = df.apply(split_names, 1) \n", " df = add_full_name(df)\n", "\n", " return df" @@ -1077,7 +1135,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 35, "id": "628949fb", "metadata": {}, "outputs": [ @@ -1093,7 +1151,8 @@ "1. Capitalizes column names for consistency.\n", "2. Drops all comlumns that are not 'Fist Name' or 'Last Name'\n", "3. Fill null values in name columns.\n", - "3. Creates a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", + "4. Accounts for instance where 'First Name' contains 'Last Name'\n", + "5. Creates a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", "\n", "Parameters\n", "----------\n", @@ -1104,7 +1163,7 @@ "-------\n", "pd.DataFrame\n", " A cleaned DataFrame with standardized columns and a 'Full Name' field.\n", - "\u001b[1;31mFile:\u001b[0m c:\\users\\leolion023\\appdata\\local\\temp\\ipykernel_72684\\4215164641.py\n", + "\u001b[1;31mFile:\u001b[0m c:\\users\\leolion023\\appdata\\local\\temp\\ipykernel_27352\\4077920601.py\n", "\u001b[1;31mType:\u001b[0m function" ] } @@ -1115,7 +1174,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 36, "id": "9e6b2ba9", "metadata": {}, "outputs": [ @@ -1144,7 +1203,7 @@ "type": "string" } ], - "ref": "8314011b-fac1-47fa-9974-110a469be71f", + "ref": "37a174a3-9ba5-4c6c-8d81-977d985ac8a2", "rows": [ [ "0", @@ -1247,11 +1306,23 @@ "Tonia", "Nolden", "Tonia Nolden" + ], + [ + "17", + "John", + "Smith", + "John Smith" + ], + [ + "18", + "Klive", + "Unknown", + "Klive Unknown" ] ], "shape": { "columns": 3, - "rows": 17 + "rows": 19 } }, "text/html": [ @@ -1381,6 +1452,18 @@ " Nolden\n", " Tonia Nolden\n", " \n", + " \n", + " 17\n", + " John\n", + " Smith\n", + " John Smith\n", + " \n", + " \n", + " 18\n", + " Klive\n", + " Unknown\n", + " Klive Unknown\n", + " \n", " \n", "\n", "" @@ -1403,10 +1486,12 @@ "13 Kalee Howard Kalee Howard\n", "14 Rekkai Steed Rekkai Steed\n", "15 Shannon Sheehy Shannon Sheehy\n", - "16 Tonia Nolden Tonia Nolden" + "16 Tonia Nolden Tonia Nolden\n", + "17 John Smith John Smith\n", + "18 Klive Unknown Klive Unknown" ] }, - "execution_count": 9, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -1416,53 +1501,6 @@ "staff_list" ] }, - { - "cell_type": "code", - "execution_count": 10, - "id": "56dba6e7", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'\\ndef clean_mentor_df(df: pd.DataFrame) -> pd.DataFrame:\\n \"\"\"\\n Clean and standardize a mentor DataFrame.\\n\\n Steps performed:\\n 1. Fills missing values in the \\'Last Name\\' column with \\'Unknown\\'.\\n 2. Drops the \\'Alternate Name\\' column if it exists.\\n 3. Creates a \\'Full Name\\' column by combining \\'First Name\\' and \\'Last Name\\'.\\n\\n Parameters\\n ----------\\n df : pd.DataFrame\\n Input DataFrame containing mentor data.\\n\\n Returns\\n -------\\n pd.DataFrame\\n A cleaned DataFrame with standardized fields and a \\'Full Name\\' column.\\n \"\"\"\\n \\n df[\\'Last Name\\'] = df[\\'Last Name\\'].fillna(\\'Unknown\\')\\n df = df.drop(columns=\\'Alternate Name\\', errors=\\'ignore\\')\\n df[\\'Full Name\\'] = df[\\'First Name\\'] + \\' \\' + df[\\'Last Name\\']\\n \\n return df\\n'" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "'''\n", - "def clean_mentor_df(df: pd.DataFrame) -> pd.DataFrame:\n", - " \"\"\"\n", - " Clean and standardize a mentor DataFrame.\n", - "\n", - " Steps performed:\n", - " 1. Fills missing values in the 'Last Name' column with 'Unknown'.\n", - " 2. Drops the 'Alternate Name' column if it exists.\n", - " 3. Creates a 'Full Name' column by combining 'First Name' and 'Last Name'.\n", - "\n", - " Parameters\n", - " ----------\n", - " df : pd.DataFrame\n", - " Input DataFrame containing mentor data.\n", - "\n", - " Returns\n", - " -------\n", - " pd.DataFrame\n", - " A cleaned DataFrame with standardized fields and a 'Full Name' column.\n", - " \"\"\"\n", - " \n", - " df['Last Name'] = df['Last Name'].fillna('Unknown')\n", - " df = df.drop(columns='Alternate Name', errors='ignore')\n", - " df['Full Name'] = df['First Name'] + ' ' + df['Last Name']\n", - " \n", - " return df\n", - "'''" - ] - }, { "cell_type": "code", "execution_count": 11, From 9d4c8990bcf0806306113f2bce37ca6605fd8b2d Mon Sep 17 00:00:00 2001 From: leolion023 Date: Mon, 29 Sep 2025 17:04:44 -0400 Subject: [PATCH 3/4] add function to remove staff and mentors from list --- src/notebook/notebook.ipynb | 1358 +++++++++++++++++------------------ 1 file changed, 656 insertions(+), 702 deletions(-) diff --git a/src/notebook/notebook.ipynb b/src/notebook/notebook.ipynb index d7ea23a..e2c1824 100644 --- a/src/notebook/notebook.ipynb +++ b/src/notebook/notebook.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 27, + "execution_count": 23, "id": "cc02d731", "metadata": {}, "outputs": [], @@ -14,7 +14,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 24, "id": "5987e035", "metadata": {}, "outputs": [], @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 25, "id": "886a505c", "metadata": {}, "outputs": [ @@ -56,7 +56,7 @@ "type": "unknown" } ], - "ref": "00370dd1-82cd-4877-826f-e534f6db234e", + "ref": "db8826d7-1255-43fe-801e-5843a08dd877", "rows": [ [ "0", @@ -565,7 +565,7 @@ "35 Sunny Zanchi NaN" ] }, - "execution_count": 29, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -576,7 +576,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 26, "id": "14c2c742", "metadata": {}, "outputs": [ @@ -615,7 +615,7 @@ "type": "float" } ], - "ref": "7b7c1300-9418-4278-bc1c-c0de40ca605c", + "ref": "a798b62f-da45-4664-99aa-3518e5bf4ae5", "rows": [ [ "0", @@ -981,7 +981,7 @@ "18 Klive NaN NaN NaN NaN" ] }, - "execution_count": 30, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } @@ -992,7 +992,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 27, "id": "3df8b097", "metadata": {}, "outputs": [], @@ -1008,13 +1008,15 @@ " pd.DataFrame: A Data Frame with only the 'First Name' and 'Last Name' Columns\n", " \"\"\"\n", " df.columns = df.columns.str.title()\n", + " df['First Name'] = df['First Name'].str.title()\n", + " df['Last Name'] = df['Last Name'].str.title()\n", " col_to_keep = ['First Name', 'Last Name']\n", " return df[col_to_keep].copy()" ] }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 28, "id": "a3b7e280", "metadata": {}, "outputs": [], @@ -1066,7 +1068,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 29, "id": "bd9d1679", "metadata": {}, "outputs": [], @@ -1090,7 +1092,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 30, "id": "c3b40f9d", "metadata": {}, "outputs": [], @@ -1135,7 +1137,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 31, "id": "628949fb", "metadata": {}, "outputs": [ @@ -1163,7 +1165,7 @@ "-------\n", "pd.DataFrame\n", " A cleaned DataFrame with standardized columns and a 'Full Name' field.\n", - "\u001b[1;31mFile:\u001b[0m c:\\users\\leolion023\\appdata\\local\\temp\\ipykernel_27352\\4077920601.py\n", + "\u001b[1;31mFile:\u001b[0m c:\\users\\leolion023\\appdata\\local\\temp\\ipykernel_59672\\4077920601.py\n", "\u001b[1;31mType:\u001b[0m function" ] } @@ -1174,7 +1176,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 32, "id": "9e6b2ba9", "metadata": {}, "outputs": [ @@ -1203,7 +1205,7 @@ "type": "string" } ], - "ref": "37a174a3-9ba5-4c6c-8d81-977d985ac8a2", + "ref": "368936b2-ee0b-4332-88e9-795186a25905", "rows": [ [ "0", @@ -1243,9 +1245,9 @@ ], [ "6", - "classroom", - "admin", - "classroom admin" + "Classroom", + "Admin", + "Classroom Admin" ], [ "7", @@ -1388,9 +1390,9 @@ " \n", " \n", " 6\n", - " classroom\n", - " admin\n", - " classroom admin\n", + " Classroom\n", + " Admin\n", + " Classroom Admin\n", " \n", " \n", " 7\n", @@ -1476,7 +1478,7 @@ "3 August Mapp August Mapp\n", "4 Blake Herbert Blake Herbert\n", "5 Brian Luerman Brian Luerman\n", - "6 classroom admin classroom admin\n", + "6 Classroom Admin Classroom Admin\n", "7 Dan Collins Dan Collins\n", "8 Danny Morton Danny Morton\n", "9 David York David York\n", @@ -1491,7 +1493,7 @@ "18 Klive Unknown Klive Unknown" ] }, - "execution_count": 36, + "execution_count": 32, "metadata": {}, "output_type": "execute_result" } @@ -1503,7 +1505,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 33, "id": "6c86df50", "metadata": {}, "outputs": [], @@ -1513,17 +1515,10 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 34, "id": "115b41b9", "metadata": {}, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Missing name in Last Name filled with Unknown\n" - ] - }, { "data": { "application/vnd.microsoft.datawrangler.viewer.v0+json": { @@ -1549,7 +1544,7 @@ "type": "string" } ], - "ref": "e592a15c-e6d0-4e3d-9a8f-7fa61fee0016", + "ref": "1f852ad2-12e0-4bfc-886a-7178ccc99dd2", "rows": [ [ "0", @@ -2058,7 +2053,7 @@ "35 Sunny Zanchi Sunny Zanchi" ] }, - "execution_count": 28, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } @@ -2070,7 +2065,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 35, "id": "74a3b369", "metadata": {}, "outputs": [ @@ -2114,7 +2109,7 @@ "type": "string" } ], - "ref": "8825687e-6c93-4094-a5ff-afb20d1184b1", + "ref": "97fb1a42-4a92-4802-a113-8850fcabf2fc", "rows": [ [ "0", @@ -2480,7 +2475,7 @@ "15 6:01 PM 8:26 PM " ] }, - "execution_count": 13, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } @@ -2491,7 +2486,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 36, "id": "00cc7690", "metadata": {}, "outputs": [ @@ -2545,7 +2540,7 @@ "type": "string" } ], - "ref": "c231e819-ff85-4aee-aa88-b04cda8e956a", + "ref": "a09f24f3-b31f-4403-811a-e3a224a0dfdd", "rows": [ [ "0", @@ -2995,7 +2990,7 @@ "15 Zhenzhen Xie " ] }, - "execution_count": 14, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -3008,7 +3003,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 37, "id": "838ca4e1", "metadata": {}, "outputs": [], @@ -3016,12 +3011,13 @@ "def clean_meeting(df: pd.DataFrame) -> pd.DataFrame:\n", " df = process_meeting_times(df)\n", " df = add_full_name(df)\n", - " return df" + " col_to_keep = ['Full Name', 'Duration In Minutes']\n", + " return df[col_to_keep].copy()" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 38, "id": "03fa1b54", "metadata": {}, "outputs": [ @@ -3035,227 +3031,101 @@ "type": "integer" }, { - "name": "First Name", - "rawType": "object", - "type": "string" - }, - { - "name": "Last Name", - "rawType": "object", - "type": "string" - }, - { - "name": "Email", - "rawType": "object", - "type": "string" - }, - { - "name": "Duration", + "name": "Full Name", "rawType": "object", "type": "string" }, - { - "name": "Time Joined", - "rawType": "datetime64[ns]", - "type": "datetime" - }, - { - "name": "Time Exited", - "rawType": "datetime64[ns]", - "type": "datetime" - }, { "name": "Duration In Minutes", "rawType": "float64", "type": "float" - }, - { - "name": "Full Name", - "rawType": "object", - "type": "string" } ], - "ref": "1faff16c-03b5-46f8-ba0a-8650f61a2dc3", + "ref": "40f944f3-ead7-4dae-9d8b-c9fdfcbef8c7", "rows": [ [ "0", - "Alex", - "D", - "awda*****@***.com", - "2 hr 25 min", - "1900-01-01 18:01:00", - "1900-01-01 20:26:00", - "145.0", - "Alex D" + "Alex D", + "145.0" ], [ "1", - "Angela", - "Moore", - "ange*************@***.com", - "2 hr 29 min", - "1900-01-01 17:59:00", - "1900-01-01 20:27:00", - "148.0", - "Angela Moore" + "Angela Moore", + "148.0" ], [ "2", - "Bill", - "Montgomery", - "kyho***@***.com", - "2 hr 27 min", - "1900-01-01 17:59:00", - "1900-01-01 20:26:00", - "147.0", - "Bill Montgomery" + "Bill Montgomery", + "147.0" ], [ "3", - "Charles", - "Norman", - "ario****@***.com", - "2 hr 42 min", - "1900-01-01 17:45:00", - "1900-01-01 20:27:00", - "162.0", - "Charles Norman" + "Charles Norman", + "162.0" ], [ "4", - "Christina", - "Porter", - "chri**************@***.com", - "2 hr 4 min", - "1900-01-01 18:15:00", - "1900-01-01 20:19:00", - "124.0", - "Christina Porter" + "Christina Porter", + "124.0" ], [ "5", - "Cindy", - "Wedding", - "cwed*******@***.com", - "2 hr 22 min", - "1900-01-01 18:03:00", - "1900-01-01 20:25:00", - "142.0", - "Cindy Wedding" + "Cindy Wedding", + "142.0" ], [ "6", - "Classroom", - "Admin", - "classroom@codeyou.org", - "1 min", - "1900-01-01 17:59:00", - "1900-01-01 18:00:00", - "1.0", - "Classroom Admin" + "Classroom Admin", + "1.0" ], [ "7", - "Joel", - "Anderson", - "joel*************@***.com", - "2 hr 27 min", - "1900-01-01 18:00:00", - "1900-01-01 20:27:00", - "147.0", - "Joel Anderson" + "Joel Anderson", + "147.0" ], [ "8", - "Jonathan", - "Chadwell", - "jona*******************@***.com", - "2 hr 24 min", - "1900-01-01 18:02:00", - "1900-01-01 20:26:00", - "144.0", - "Jonathan Chadwell" + "Jonathan Chadwell", + "144.0" ], [ "9", - "Mendell", - "M", - "menm****@***.com", - "1 hr 58 min", - "1900-01-01 18:00:00", - "1900-01-01 20:00:00", - "120.0", - "Mendell M" + "Mendell M", + "120.0" ], [ "10", - "Oli", - "Ivanova", - "olga************@***.com", - "2 hr 14 min", - "1900-01-01 17:59:00", - "1900-01-01 20:13:00", - "134.0", - "Oli Ivanova" + "Oli Ivanova", + "134.0" ], [ "11", - "S.", - "Byrnes", - "smby***@***.com", - "1 hr 58 min", - "1900-01-01 18:02:00", - "1900-01-01 20:00:00", - "118.0", - "S. Byrnes" + "S. Byrnes", + "118.0" ], [ "12", - "Tara Leigh", - "Hylton", - "turr******@***.com", - "2 hr 5 min", - "1900-01-01 18:01:00", - "1900-01-01 20:06:00", - "125.0", - "Tara Leigh Hylton" + "Tara Leigh Hylton", + "125.0" ], [ "13", - "Whitney", - "Parks", - "wypa*****@***.com", - "2 hr 38 min", - "1900-01-01 18:01:00", - "1900-01-01 20:39:00", - "158.0", - "Whitney Parks" + "Whitney Parks", + "158.0" ], [ "14", - "Zachary", - "Young", - "zach*************@***.com", - "2 hr 6 min", - "1900-01-01 17:54:00", - "1900-01-01 20:00:00", - "126.0", - "Zachary Young" + "Zachary Young", + "126.0" ], [ "15", - "Zhenzhen", - "Xie", - "xzz.**********@***.com", - "2 hr 24 min", - "1900-01-01 18:01:00", - "1900-01-01 20:26:00", - "145.0", - "Zhenzhen Xie" + "Zhenzhen Xie", + "145.0" ] ], "shape": { - "columns": 8, + "columns": 2, "rows": 16 } }, @@ -3278,254 +3148,116 @@ " \n", " \n", " \n", - " First Name\n", - " Last Name\n", - " Email\n", - " Duration\n", - " Time Joined\n", - " Time Exited\n", - " Duration In Minutes\n", " Full Name\n", + " Duration In Minutes\n", " \n", " \n", " \n", " \n", " 0\n", - " Alex\n", - " D\n", - " awda*****@***.com\n", - " 2 hr 25 min\n", - " 1900-01-01 18:01:00\n", - " 1900-01-01 20:26:00\n", - " 145.0\n", " Alex D\n", + " 145.0\n", " \n", " \n", " 1\n", - " Angela\n", - " Moore\n", - " ange*************@***.com\n", - " 2 hr 29 min\n", - " 1900-01-01 17:59:00\n", - " 1900-01-01 20:27:00\n", - " 148.0\n", " Angela Moore\n", + " 148.0\n", " \n", " \n", " 2\n", - " Bill\n", - " Montgomery\n", - " kyho***@***.com\n", - " 2 hr 27 min\n", - " 1900-01-01 17:59:00\n", - " 1900-01-01 20:26:00\n", - " 147.0\n", " Bill Montgomery\n", + " 147.0\n", " \n", " \n", " 3\n", - " Charles\n", - " Norman\n", - " ario****@***.com\n", - " 2 hr 42 min\n", - " 1900-01-01 17:45:00\n", - " 1900-01-01 20:27:00\n", - " 162.0\n", " Charles Norman\n", + " 162.0\n", " \n", " \n", " 4\n", - " Christina\n", - " Porter\n", - " chri**************@***.com\n", - " 2 hr 4 min\n", - " 1900-01-01 18:15:00\n", - " 1900-01-01 20:19:00\n", - " 124.0\n", " Christina Porter\n", + " 124.0\n", " \n", " \n", " 5\n", - " Cindy\n", - " Wedding\n", - " cwed*******@***.com\n", - " 2 hr 22 min\n", - " 1900-01-01 18:03:00\n", - " 1900-01-01 20:25:00\n", - " 142.0\n", " Cindy Wedding\n", + " 142.0\n", " \n", " \n", " 6\n", - " Classroom\n", - " Admin\n", - " classroom@codeyou.org\n", - " 1 min\n", - " 1900-01-01 17:59:00\n", - " 1900-01-01 18:00:00\n", - " 1.0\n", " Classroom Admin\n", + " 1.0\n", " \n", " \n", " 7\n", - " Joel\n", - " Anderson\n", - " joel*************@***.com\n", - " 2 hr 27 min\n", - " 1900-01-01 18:00:00\n", - " 1900-01-01 20:27:00\n", - " 147.0\n", " Joel Anderson\n", + " 147.0\n", " \n", " \n", " 8\n", - " Jonathan\n", - " Chadwell\n", - " jona*******************@***.com\n", - " 2 hr 24 min\n", - " 1900-01-01 18:02:00\n", - " 1900-01-01 20:26:00\n", - " 144.0\n", " Jonathan Chadwell\n", + " 144.0\n", " \n", " \n", " 9\n", - " Mendell\n", - " M\n", - " menm****@***.com\n", - " 1 hr 58 min\n", - " 1900-01-01 18:00:00\n", - " 1900-01-01 20:00:00\n", - " 120.0\n", " Mendell M\n", + " 120.0\n", " \n", " \n", " 10\n", - " Oli\n", - " Ivanova\n", - " olga************@***.com\n", - " 2 hr 14 min\n", - " 1900-01-01 17:59:00\n", - " 1900-01-01 20:13:00\n", - " 134.0\n", " Oli Ivanova\n", + " 134.0\n", " \n", " \n", " 11\n", - " S.\n", - " Byrnes\n", - " smby***@***.com\n", - " 1 hr 58 min\n", - " 1900-01-01 18:02:00\n", - " 1900-01-01 20:00:00\n", - " 118.0\n", " S. Byrnes\n", + " 118.0\n", " \n", " \n", " 12\n", - " Tara Leigh\n", - " Hylton\n", - " turr******@***.com\n", - " 2 hr 5 min\n", - " 1900-01-01 18:01:00\n", - " 1900-01-01 20:06:00\n", - " 125.0\n", " Tara Leigh Hylton\n", + " 125.0\n", " \n", " \n", " 13\n", - " Whitney\n", - " Parks\n", - " wypa*****@***.com\n", - " 2 hr 38 min\n", - " 1900-01-01 18:01:00\n", - " 1900-01-01 20:39:00\n", - " 158.0\n", " Whitney Parks\n", + " 158.0\n", " \n", " \n", " 14\n", - " Zachary\n", - " Young\n", - " zach*************@***.com\n", - " 2 hr 6 min\n", - " 1900-01-01 17:54:00\n", - " 1900-01-01 20:00:00\n", - " 126.0\n", " Zachary Young\n", + " 126.0\n", " \n", " \n", " 15\n", - " Zhenzhen\n", - " Xie\n", - " xzz.**********@***.com\n", - " 2 hr 24 min\n", - " 1900-01-01 18:01:00\n", - " 1900-01-01 20:26:00\n", - " 145.0\n", " Zhenzhen Xie\n", + " 145.0\n", " \n", " \n", "\n", "" ], "text/plain": [ - " First Name Last Name Email Duration \\\n", - "0 Alex D awda*****@***.com 2 hr 25 min \n", - "1 Angela Moore ange*************@***.com 2 hr 29 min \n", - "2 Bill Montgomery kyho***@***.com 2 hr 27 min \n", - "3 Charles Norman ario****@***.com 2 hr 42 min \n", - "4 Christina Porter chri**************@***.com 2 hr 4 min \n", - "5 Cindy Wedding cwed*******@***.com 2 hr 22 min \n", - "6 Classroom Admin classroom@codeyou.org 1 min \n", - "7 Joel Anderson joel*************@***.com 2 hr 27 min \n", - "8 Jonathan Chadwell jona*******************@***.com 2 hr 24 min \n", - "9 Mendell M menm****@***.com 1 hr 58 min \n", - "10 Oli Ivanova olga************@***.com 2 hr 14 min \n", - "11 S. Byrnes smby***@***.com 1 hr 58 min \n", - "12 Tara Leigh Hylton turr******@***.com 2 hr 5 min \n", - "13 Whitney Parks wypa*****@***.com 2 hr 38 min \n", - "14 Zachary Young zach*************@***.com 2 hr 6 min \n", - "15 Zhenzhen Xie xzz.**********@***.com 2 hr 24 min \n", - "\n", - " Time Joined Time Exited Duration In Minutes \\\n", - "0 1900-01-01 18:01:00 1900-01-01 20:26:00 145.0 \n", - "1 1900-01-01 17:59:00 1900-01-01 20:27:00 148.0 \n", - "2 1900-01-01 17:59:00 1900-01-01 20:26:00 147.0 \n", - "3 1900-01-01 17:45:00 1900-01-01 20:27:00 162.0 \n", - "4 1900-01-01 18:15:00 1900-01-01 20:19:00 124.0 \n", - "5 1900-01-01 18:03:00 1900-01-01 20:25:00 142.0 \n", - "6 1900-01-01 17:59:00 1900-01-01 18:00:00 1.0 \n", - "7 1900-01-01 18:00:00 1900-01-01 20:27:00 147.0 \n", - "8 1900-01-01 18:02:00 1900-01-01 20:26:00 144.0 \n", - "9 1900-01-01 18:00:00 1900-01-01 20:00:00 120.0 \n", - "10 1900-01-01 17:59:00 1900-01-01 20:13:00 134.0 \n", - "11 1900-01-01 18:02:00 1900-01-01 20:00:00 118.0 \n", - "12 1900-01-01 18:01:00 1900-01-01 20:06:00 125.0 \n", - "13 1900-01-01 18:01:00 1900-01-01 20:39:00 158.0 \n", - "14 1900-01-01 17:54:00 1900-01-01 20:00:00 126.0 \n", - "15 1900-01-01 18:01:00 1900-01-01 20:26:00 145.0 \n", - "\n", - " Full Name \n", - "0 Alex D \n", - "1 Angela Moore \n", - "2 Bill Montgomery \n", - "3 Charles Norman \n", - "4 Christina Porter \n", - "5 Cindy Wedding \n", - "6 Classroom Admin \n", - "7 Joel Anderson \n", - "8 Jonathan Chadwell \n", - "9 Mendell M \n", - "10 Oli Ivanova \n", - "11 S. Byrnes \n", - "12 Tara Leigh Hylton \n", - "13 Whitney Parks \n", - "14 Zachary Young \n", - "15 Zhenzhen Xie " + " Full Name Duration In Minutes\n", + "0 Alex D 145.0\n", + "1 Angela Moore 148.0\n", + "2 Bill Montgomery 147.0\n", + "3 Charles Norman 162.0\n", + "4 Christina Porter 124.0\n", + "5 Cindy Wedding 142.0\n", + "6 Classroom Admin 1.0\n", + "7 Joel Anderson 147.0\n", + "8 Jonathan Chadwell 144.0\n", + "9 Mendell M 120.0\n", + "10 Oli Ivanova 134.0\n", + "11 S. Byrnes 118.0\n", + "12 Tara Leigh Hylton 125.0\n", + "13 Whitney Parks 158.0\n", + "14 Zachary Young 126.0\n", + "15 Zhenzhen Xie 145.0" ] }, - "execution_count": 16, + "execution_count": 38, "metadata": {}, "output_type": "execute_result" } @@ -3537,7 +3269,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 39, "id": "0edd39e3", "metadata": {}, "outputs": [], @@ -3559,19 +3291,17 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 40, "id": "78bfd7b7", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Index(['First Name', 'Last Name', 'Email', 'Duration', 'Time Joined',\n", - " 'Time Exited', 'Duration In Minutes', 'Full Name'],\n", - " dtype='object')" + "Index(['Full Name', 'Duration In Minutes'], dtype='object')" ] }, - "execution_count": 18, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } @@ -3582,7 +3312,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 41, "id": "976408a3", "metadata": {}, "outputs": [ @@ -3606,7 +3336,7 @@ "type": "float" } ], - "ref": "f7a7d0d4-2848-45e7-8825-39fee1ac5a46", + "ref": "57e53651-3158-46ad-8d29-7e98209318c8", "rows": [ [ "0", @@ -3679,7 +3409,7 @@ "2 Christina Porter 124.0" ] }, - "execution_count": 19, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } @@ -3692,7 +3422,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 42, "id": "4aed423e", "metadata": {}, "outputs": [ @@ -3716,11 +3446,17 @@ "type": "float" } ], - "ref": "eb682ab3-8432-498b-af9d-28a20d1046ef", - "rows": [], + "ref": "ffcb5ea6-8ede-48ec-80b8-71a273f7c93d", + "rows": [ + [ + "0", + "Classroom Admin", + "1.0" + ] + ], "shape": { "columns": 2, - "rows": 0 + "rows": 1 } }, "text/html": [ @@ -3747,17 +3483,21 @@ " \n", " \n", " \n", + " \n", + " 0\n", + " Classroom Admin\n", + " 1.0\n", + " \n", " \n", "\n", "" ], "text/plain": [ - "Empty DataFrame\n", - "Columns: [Full Name, Duration In Minutes]\n", - "Index: []" + " Full Name Duration In Minutes\n", + "0 Classroom Admin 1.0" ] }, - "execution_count": 20, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -3770,7 +3510,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 43, "id": "2bfdd92e", "metadata": {}, "outputs": [ @@ -3784,205 +3524,91 @@ "type": "integer" }, { - "name": "First Name", - "rawType": "object", - "type": "string" - }, - { - "name": "Last Name", - "rawType": "object", - "type": "string" - }, - { - "name": "Email", - "rawType": "object", - "type": "string" - }, - { - "name": "Duration", + "name": "Full Name", "rawType": "object", "type": "string" }, - { - "name": "Time Joined", - "rawType": "datetime64[ns]", - "type": "datetime" - }, - { - "name": "Time Exited", - "rawType": "datetime64[ns]", - "type": "datetime" - }, { "name": "Duration In Minutes", "rawType": "float64", "type": "float" - }, - { - "name": "Full Name", - "rawType": "object", - "type": "string" } ], - "ref": "7810ceb3-468b-4804-8489-844fc1b99746", + "ref": "c075b93c-3143-40ec-ad80-ee6e0a91e9c6", "rows": [ [ "0", - "Sheyla", - "Diaz", - "dshe*****@***.com", - "1 hr 43 min", - "1900-01-01 17:58:00", - "1900-01-01 19:41:00", - "103.0", - "Sheyla Diaz" + "Sheyla Diaz", + "103.0" ], [ "1", - "James", - "Glosser", - "demo**********@***.com", - "1 hr 40 min", - "1900-01-01 18:01:00", - "1900-01-01 19:41:00", - "100.0", - "James Glosser" + "James Glosser", + "100.0" ], [ "2", - "Reed", - "Haddix", - "shir***********@***.com", - "1 hr 46 min", - "1900-01-01 17:55:00", - "1900-01-01 19:41:00", - "106.0", - "Reed Haddix" + "Reed Haddix", + "106.0" ], [ "3", - "John", - "Hankins", - "john**********@***.com", - "1 hr 38 min", - "1900-01-01 18:03:00", - "1900-01-01 19:41:00", - "98.0", - "John Hankins" + "John Hankins", + "98.0" ], [ "4", - "Stephanie", - "Jones", - "step*******************@***.com", - "1 hr 48 min", - "1900-01-01 17:53:00", - "1900-01-01 19:41:00", - "108.0", - "Stephanie Jones" + "Stephanie Jones", + "108.0" ], [ "5", - "Aaron", - "LaLiberty", - "daei**@***.com", - "1 hr 39 min", - "1900-01-01 18:02:00", - "1900-01-01 19:41:00", - "99.0", - "Aaron LaLiberty" + "Aaron LaLiberty", + "99.0" ], [ "6", - "Dakota", - "McMullin", - "kota****@***.com", - "1 hr 11 min", - "1900-01-01 17:59:00", - "1900-01-01 19:11:00", - "72.0", - "Dakota McMullin" + "Dakota McMullin", + "72.0" ], [ "7", - "Toni-Ivy", - "Ownn.", - "toni*********@***.com", - "1 hr 40 min", - "1900-01-01 18:01:00", - "1900-01-01 19:41:00", - "100.0", - "Toni-Ivy Ownn." + "Toni-Ivy Ownn.", + "100.0" ], [ "8", - "Michael", - "Puckett", - "mich***********@***.com", - "1 hr 37 min", - "1900-01-01 18:04:00", - "1900-01-01 19:41:00", - "97.0", - "Michael Puckett" + "Michael Puckett", + "97.0" ], [ "9", - "Leighton", - "Pulliam", - "l8on**@***.com", - "1 hr 40 min", - "1900-01-01 18:00:00", - "1900-01-01 19:41:00", - "101.0", - "Leighton Pulliam" + "Leighton Pulliam", + "101.0" ], [ "10", - "ken", - "quiggins", - "kash************@***.com", - "1 hr 43 min", - "1900-01-01 17:58:00", - "1900-01-01 19:41:00", - "103.0", - "ken quiggins" + "ken quiggins", + "103.0" ], [ "11", - "Amber", - "Ratliff", - "arat********@***.com", - "1 hr 40 min", - "1900-01-01 18:01:00", - "1900-01-01 19:41:00", - "100.0", - "Amber Ratliff" + "Amber Ratliff", + "100.0" ], [ "12", - "Jill", - "Schrank", - "just*******@***.com", - "1 hr 41 min", - "1900-01-01 17:59:00", - "1900-01-01 19:41:00", - "102.0", - "Jill Schrank" + "Jill Schrank", + "102.0" ], [ "13", - "Huan", - "Song", - "huan********@***.com", - "1 hr 43 min", - "1900-01-01 17:58:00", - "1900-01-01 19:41:00", - "103.0", - "Huan Song" + "Huan Song", + "103.0" ] ], "shape": { - "columns": 8, + "columns": 2, "rows": 14 } }, @@ -4005,226 +3631,104 @@ " \n", " \n", " \n", - " First Name\n", - " Last Name\n", - " Email\n", - " Duration\n", - " Time Joined\n", - " Time Exited\n", - " Duration In Minutes\n", " Full Name\n", + " Duration In Minutes\n", " \n", " \n", " \n", " \n", " 0\n", - " Sheyla\n", - " Diaz\n", - " dshe*****@***.com\n", - " 1 hr 43 min\n", - " 1900-01-01 17:58:00\n", - " 1900-01-01 19:41:00\n", - " 103.0\n", " Sheyla Diaz\n", + " 103.0\n", " \n", " \n", " 1\n", - " James\n", - " Glosser\n", - " demo**********@***.com\n", - " 1 hr 40 min\n", - " 1900-01-01 18:01:00\n", - " 1900-01-01 19:41:00\n", - " 100.0\n", " James Glosser\n", + " 100.0\n", " \n", " \n", " 2\n", - " Reed\n", - " Haddix\n", - " shir***********@***.com\n", - " 1 hr 46 min\n", - " 1900-01-01 17:55:00\n", - " 1900-01-01 19:41:00\n", - " 106.0\n", " Reed Haddix\n", + " 106.0\n", " \n", " \n", " 3\n", - " John\n", - " Hankins\n", - " john**********@***.com\n", - " 1 hr 38 min\n", - " 1900-01-01 18:03:00\n", - " 1900-01-01 19:41:00\n", - " 98.0\n", " John Hankins\n", + " 98.0\n", " \n", " \n", " 4\n", - " Stephanie\n", - " Jones\n", - " step*******************@***.com\n", - " 1 hr 48 min\n", - " 1900-01-01 17:53:00\n", - " 1900-01-01 19:41:00\n", - " 108.0\n", " Stephanie Jones\n", + " 108.0\n", " \n", " \n", " 5\n", - " Aaron\n", - " LaLiberty\n", - " daei**@***.com\n", - " 1 hr 39 min\n", - " 1900-01-01 18:02:00\n", - " 1900-01-01 19:41:00\n", - " 99.0\n", " Aaron LaLiberty\n", + " 99.0\n", " \n", " \n", " 6\n", - " Dakota\n", - " McMullin\n", - " kota****@***.com\n", - " 1 hr 11 min\n", - " 1900-01-01 17:59:00\n", - " 1900-01-01 19:11:00\n", - " 72.0\n", " Dakota McMullin\n", + " 72.0\n", " \n", " \n", " 7\n", - " Toni-Ivy\n", - " Ownn.\n", - " toni*********@***.com\n", - " 1 hr 40 min\n", - " 1900-01-01 18:01:00\n", - " 1900-01-01 19:41:00\n", - " 100.0\n", " Toni-Ivy Ownn.\n", + " 100.0\n", " \n", " \n", " 8\n", - " Michael\n", - " Puckett\n", - " mich***********@***.com\n", - " 1 hr 37 min\n", - " 1900-01-01 18:04:00\n", - " 1900-01-01 19:41:00\n", - " 97.0\n", " Michael Puckett\n", + " 97.0\n", " \n", " \n", " 9\n", - " Leighton\n", - " Pulliam\n", - " l8on**@***.com\n", - " 1 hr 40 min\n", - " 1900-01-01 18:00:00\n", - " 1900-01-01 19:41:00\n", - " 101.0\n", " Leighton Pulliam\n", + " 101.0\n", " \n", " \n", " 10\n", - " ken\n", - " quiggins\n", - " kash************@***.com\n", - " 1 hr 43 min\n", - " 1900-01-01 17:58:00\n", - " 1900-01-01 19:41:00\n", - " 103.0\n", " ken quiggins\n", + " 103.0\n", " \n", " \n", " 11\n", - " Amber\n", - " Ratliff\n", - " arat********@***.com\n", - " 1 hr 40 min\n", - " 1900-01-01 18:01:00\n", - " 1900-01-01 19:41:00\n", - " 100.0\n", " Amber Ratliff\n", + " 100.0\n", " \n", " \n", " 12\n", - " Jill\n", - " Schrank\n", - " just*******@***.com\n", - " 1 hr 41 min\n", - " 1900-01-01 17:59:00\n", - " 1900-01-01 19:41:00\n", - " 102.0\n", " Jill Schrank\n", + " 102.0\n", " \n", " \n", " 13\n", - " Huan\n", - " Song\n", - " huan********@***.com\n", - " 1 hr 43 min\n", - " 1900-01-01 17:58:00\n", - " 1900-01-01 19:41:00\n", - " 103.0\n", " Huan Song\n", + " 103.0\n", " \n", " \n", "\n", "" ], "text/plain": [ - " First Name Last Name Email Duration \\\n", - "0 Sheyla Diaz dshe*****@***.com 1 hr 43 min \n", - "1 James Glosser demo**********@***.com 1 hr 40 min \n", - "2 Reed Haddix shir***********@***.com 1 hr 46 min \n", - "3 John Hankins john**********@***.com 1 hr 38 min \n", - "4 Stephanie Jones step*******************@***.com 1 hr 48 min \n", - "5 Aaron LaLiberty daei**@***.com 1 hr 39 min \n", - "6 Dakota McMullin kota****@***.com 1 hr 11 min \n", - "7 Toni-Ivy Ownn. toni*********@***.com 1 hr 40 min \n", - "8 Michael Puckett mich***********@***.com 1 hr 37 min \n", - "9 Leighton Pulliam l8on**@***.com 1 hr 40 min \n", - "10 ken quiggins kash************@***.com 1 hr 43 min \n", - "11 Amber Ratliff arat********@***.com 1 hr 40 min \n", - "12 Jill Schrank just*******@***.com 1 hr 41 min \n", - "13 Huan Song huan********@***.com 1 hr 43 min \n", - "\n", - " Time Joined Time Exited Duration In Minutes \\\n", - "0 1900-01-01 17:58:00 1900-01-01 19:41:00 103.0 \n", - "1 1900-01-01 18:01:00 1900-01-01 19:41:00 100.0 \n", - "2 1900-01-01 17:55:00 1900-01-01 19:41:00 106.0 \n", - "3 1900-01-01 18:03:00 1900-01-01 19:41:00 98.0 \n", - "4 1900-01-01 17:53:00 1900-01-01 19:41:00 108.0 \n", - "5 1900-01-01 18:02:00 1900-01-01 19:41:00 99.0 \n", - "6 1900-01-01 17:59:00 1900-01-01 19:11:00 72.0 \n", - "7 1900-01-01 18:01:00 1900-01-01 19:41:00 100.0 \n", - "8 1900-01-01 18:04:00 1900-01-01 19:41:00 97.0 \n", - "9 1900-01-01 18:00:00 1900-01-01 19:41:00 101.0 \n", - "10 1900-01-01 17:58:00 1900-01-01 19:41:00 103.0 \n", - "11 1900-01-01 18:01:00 1900-01-01 19:41:00 100.0 \n", - "12 1900-01-01 17:59:00 1900-01-01 19:41:00 102.0 \n", - "13 1900-01-01 17:58:00 1900-01-01 19:41:00 103.0 \n", - "\n", - " Full Name \n", - "0 Sheyla Diaz \n", - "1 James Glosser \n", - "2 Reed Haddix \n", - "3 John Hankins \n", - "4 Stephanie Jones \n", - "5 Aaron LaLiberty \n", - "6 Dakota McMullin \n", - "7 Toni-Ivy Ownn. \n", - "8 Michael Puckett \n", - "9 Leighton Pulliam \n", - "10 ken quiggins \n", - "11 Amber Ratliff \n", - "12 Jill Schrank \n", - "13 Huan Song " + " Full Name Duration In Minutes\n", + "0 Sheyla Diaz 103.0\n", + "1 James Glosser 100.0\n", + "2 Reed Haddix 106.0\n", + "3 John Hankins 98.0\n", + "4 Stephanie Jones 108.0\n", + "5 Aaron LaLiberty 99.0\n", + "6 Dakota McMullin 72.0\n", + "7 Toni-Ivy Ownn. 100.0\n", + "8 Michael Puckett 97.0\n", + "9 Leighton Pulliam 101.0\n", + "10 ken quiggins 103.0\n", + "11 Amber Ratliff 100.0\n", + "12 Jill Schrank 102.0\n", + "13 Huan Song 103.0" ] }, - "execution_count": 21, + "execution_count": 43, "metadata": {}, "output_type": "execute_result" } @@ -4236,7 +3740,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 44, "id": "b489007c", "metadata": {}, "outputs": [ @@ -4260,7 +3764,7 @@ "type": "float" } ], - "ref": "251e82bf-bfa1-45de-9f78-bb0fcb1d4758", + "ref": "727c515b-619f-4104-ad87-91edb6abefee", "rows": [ [ "0", @@ -4311,7 +3815,7 @@ "0 Michael Puckett 97.0" ] }, - "execution_count": 22, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -4324,7 +3828,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 45, "id": "20023162", "metadata": {}, "outputs": [ @@ -4348,7 +3852,7 @@ "type": "float" } ], - "ref": "5e28508c-8c99-4248-a1b7-d21a9d16885b", + "ref": "94c21081-b1ed-4ebc-b2fe-2357782fe30f", "rows": [], "shape": { "columns": 2, @@ -4389,7 +3893,7 @@ "Index: []" ] }, - "execution_count": 23, + "execution_count": 45, "metadata": {}, "output_type": "execute_result" } @@ -4403,7 +3907,457 @@ { "cell_type": "code", "execution_count": null, - "id": "88a26efe", + "id": "b88830f9", + "metadata": {}, + "outputs": [], + "source": [ + "def remove_staff_mentor_meeting(meeting: pd.DataFrame, staff_list: pd.DataFrame, mentor_list: pd.DataFrame) -> pd.DataFrame:\n", + " \"\"\"\n", + " Removes staff and mentor names from the meeting list\n", + " Args:\n", + " meeting (pd.DataFrame): meeting being reduced\n", + " staff_list (pd.DataFrame): list of staff names\n", + " mentor_list (pd.DataFrame): list of mentor names\n", + "\n", + " Returns:\n", + " pd.DataFrame: list of members and time duration excluding staff and mentor names\n", + " \"\"\"\n", + " df = meeting[~meeting['Full Name'].isin(mentor_list['Full Name'])]\n", + " df = df[~df['Full Name'].isin(staff_list['Full Name'])]\n", + " return df" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "205ddadf", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.microsoft.datawrangler.viewer.v0+json": { + "columns": [ + { + "name": "index", + "rawType": "int64", + "type": "integer" + }, + { + "name": "Full Name", + "rawType": "object", + "type": "string" + }, + { + "name": "Duration In Minutes", + "rawType": "float64", + "type": "float" + } + ], + "ref": "8793785f-b4a2-44f7-8c64-1596688a3c08", + "rows": [ + [ + "1", + "Angela Moore", + "148.0" + ], + [ + "3", + "Charles Norman", + "162.0" + ], + [ + "5", + "Cindy Wedding", + "142.0" + ], + [ + "7", + "Joel Anderson", + "147.0" + ], + [ + "8", + "Jonathan Chadwell", + "144.0" + ], + [ + "9", + "Mendell M", + "120.0" + ], + [ + "10", + "Oli Ivanova", + "134.0" + ], + [ + "11", + "S. Byrnes", + "118.0" + ], + [ + "12", + "Tara Leigh Hylton", + "125.0" + ], + [ + "13", + "Whitney Parks", + "158.0" + ], + [ + "14", + "Zachary Young", + "126.0" + ], + [ + "15", + "Zhenzhen Xie", + "145.0" + ] + ], + "shape": { + "columns": 2, + "rows": 12 + } + }, + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Full NameDuration In Minutes
1Angela Moore148.0
3Charles Norman162.0
5Cindy Wedding142.0
7Joel Anderson147.0
8Jonathan Chadwell144.0
9Mendell M120.0
10Oli Ivanova134.0
11S. Byrnes118.0
12Tara Leigh Hylton125.0
13Whitney Parks158.0
14Zachary Young126.0
15Zhenzhen Xie145.0
\n", + "
" + ], + "text/plain": [ + " Full Name Duration In Minutes\n", + "1 Angela Moore 148.0\n", + "3 Charles Norman 162.0\n", + "5 Cindy Wedding 142.0\n", + "7 Joel Anderson 147.0\n", + "8 Jonathan Chadwell 144.0\n", + "9 Mendell M 120.0\n", + "10 Oli Ivanova 134.0\n", + "11 S. Byrnes 118.0\n", + "12 Tara Leigh Hylton 125.0\n", + "13 Whitney Parks 158.0\n", + "14 Zachary Young 126.0\n", + "15 Zhenzhen Xie 145.0" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "meeting_1_students = remove_staff_mentor_meeting(meeting_1_cleaned,staff_list,mentor_list)\n", + "meeting_1_students" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "d21aae8a", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.microsoft.datawrangler.viewer.v0+json": { + "columns": [ + { + "name": "index", + "rawType": "int64", + "type": "integer" + }, + { + "name": "Full Name", + "rawType": "object", + "type": "string" + }, + { + "name": "Duration In Minutes", + "rawType": "float64", + "type": "float" + } + ], + "ref": "55352337-6e59-4cac-ac8a-da8fc7ccd041", + "rows": [ + [ + "0", + "Sheyla Diaz", + "103.0" + ], + [ + "1", + "James Glosser", + "100.0" + ], + [ + "2", + "Reed Haddix", + "106.0" + ], + [ + "3", + "John Hankins", + "98.0" + ], + [ + "4", + "Stephanie Jones", + "108.0" + ], + [ + "5", + "Aaron LaLiberty", + "99.0" + ], + [ + "6", + "Dakota McMullin", + "72.0" + ], + [ + "7", + "Toni-Ivy Ownn.", + "100.0" + ], + [ + "9", + "Leighton Pulliam", + "101.0" + ], + [ + "10", + "ken quiggins", + "103.0" + ], + [ + "11", + "Amber Ratliff", + "100.0" + ], + [ + "12", + "Jill Schrank", + "102.0" + ], + [ + "13", + "Huan Song", + "103.0" + ] + ], + "shape": { + "columns": 2, + "rows": 13 + } + }, + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Full NameDuration In Minutes
0Sheyla Diaz103.0
1James Glosser100.0
2Reed Haddix106.0
3John Hankins98.0
4Stephanie Jones108.0
5Aaron LaLiberty99.0
6Dakota McMullin72.0
7Toni-Ivy Ownn.100.0
9Leighton Pulliam101.0
10ken quiggins103.0
11Amber Ratliff100.0
12Jill Schrank102.0
13Huan Song103.0
\n", + "
" + ], + "text/plain": [ + " Full Name Duration In Minutes\n", + "0 Sheyla Diaz 103.0\n", + "1 James Glosser 100.0\n", + "2 Reed Haddix 106.0\n", + "3 John Hankins 98.0\n", + "4 Stephanie Jones 108.0\n", + "5 Aaron LaLiberty 99.0\n", + "6 Dakota McMullin 72.0\n", + "7 Toni-Ivy Ownn. 100.0\n", + "9 Leighton Pulliam 101.0\n", + "10 ken quiggins 103.0\n", + "11 Amber Ratliff 100.0\n", + "12 Jill Schrank 102.0\n", + "13 Huan Song 103.0" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "meeting_2_students = remove_staff_mentor_meeting(meeting_2_cleaned,staff_list,mentor_list)\n", + "meeting_2_students" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "007cf203", "metadata": {}, "outputs": [], "source": [] @@ -4411,7 +4365,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "venv", "language": "python", "name": "python3" }, From 71266347397c529281549b2e9b6b3c4c11ac1b4a Mon Sep 17 00:00:00 2001 From: leolion023 Date: Mon, 29 Sep 2025 17:12:33 -0400 Subject: [PATCH 4/4] fix titling in in full names when creating full name column for meetings --- src/notebook/notebook.ipynb | 170 ++++++++++++++++++------------------ 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/src/notebook/notebook.ipynb b/src/notebook/notebook.ipynb index e2c1824..fcbd97b 100644 --- a/src/notebook/notebook.ipynb +++ b/src/notebook/notebook.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 23, + "execution_count": 52, "id": "cc02d731", "metadata": {}, "outputs": [], @@ -14,7 +14,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 53, "id": "5987e035", "metadata": {}, "outputs": [], @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 54, "id": "886a505c", "metadata": {}, "outputs": [ @@ -56,7 +56,7 @@ "type": "unknown" } ], - "ref": "db8826d7-1255-43fe-801e-5843a08dd877", + "ref": "1e961b2f-9b34-49f4-9617-148ad4c8ec89", "rows": [ [ "0", @@ -565,7 +565,7 @@ "35 Sunny Zanchi NaN" ] }, - "execution_count": 25, + "execution_count": 54, "metadata": {}, "output_type": "execute_result" } @@ -576,7 +576,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 55, "id": "14c2c742", "metadata": {}, "outputs": [ @@ -615,7 +615,7 @@ "type": "float" } ], - "ref": "a798b62f-da45-4664-99aa-3518e5bf4ae5", + "ref": "22a255a6-c9a8-4968-bb4f-877554cd8882", "rows": [ [ "0", @@ -981,7 +981,7 @@ "18 Klive NaN NaN NaN NaN" ] }, - "execution_count": 26, + "execution_count": 55, "metadata": {}, "output_type": "execute_result" } @@ -992,7 +992,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 56, "id": "3df8b097", "metadata": {}, "outputs": [], @@ -1016,7 +1016,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 57, "id": "a3b7e280", "metadata": {}, "outputs": [], @@ -1062,13 +1062,13 @@ " pd.DataFrame\n", " DataFrame with a new 'Full Name' column.\n", " \"\"\"\n", - " df['Full Name'] = df['First Name'] + ' ' + df['Last Name']\n", + " df['Full Name'] = df['First Name'].str.title() + ' ' + df['Last Name'].str.title()\n", " return df" ] }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 58, "id": "bd9d1679", "metadata": {}, "outputs": [], @@ -1092,7 +1092,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 59, "id": "c3b40f9d", "metadata": {}, "outputs": [], @@ -1137,7 +1137,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 60, "id": "628949fb", "metadata": {}, "outputs": [ @@ -1176,7 +1176,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 61, "id": "9e6b2ba9", "metadata": {}, "outputs": [ @@ -1205,7 +1205,7 @@ "type": "string" } ], - "ref": "368936b2-ee0b-4332-88e9-795186a25905", + "ref": "fe6c61ab-e4f1-40e2-863d-71bd92af124e", "rows": [ [ "0", @@ -1493,7 +1493,7 @@ "18 Klive Unknown Klive Unknown" ] }, - "execution_count": 32, + "execution_count": 61, "metadata": {}, "output_type": "execute_result" } @@ -1505,7 +1505,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 62, "id": "6c86df50", "metadata": {}, "outputs": [], @@ -1515,7 +1515,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 63, "id": "115b41b9", "metadata": {}, "outputs": [ @@ -1544,7 +1544,7 @@ "type": "string" } ], - "ref": "1f852ad2-12e0-4bfc-886a-7178ccc99dd2", + "ref": "6af6b282-fc16-414e-ad7f-ed6c9b10b662", "rows": [ [ "0", @@ -2053,7 +2053,7 @@ "35 Sunny Zanchi Sunny Zanchi" ] }, - "execution_count": 34, + "execution_count": 63, "metadata": {}, "output_type": "execute_result" } @@ -2065,7 +2065,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 64, "id": "74a3b369", "metadata": {}, "outputs": [ @@ -2109,7 +2109,7 @@ "type": "string" } ], - "ref": "97fb1a42-4a92-4802-a113-8850fcabf2fc", + "ref": "94693d9e-2c1b-415a-882f-460903e77e18", "rows": [ [ "0", @@ -2475,7 +2475,7 @@ "15 6:01 PM 8:26 PM " ] }, - "execution_count": 35, + "execution_count": 64, "metadata": {}, "output_type": "execute_result" } @@ -2486,7 +2486,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 65, "id": "00cc7690", "metadata": {}, "outputs": [ @@ -2540,7 +2540,7 @@ "type": "string" } ], - "ref": "a09f24f3-b31f-4403-811a-e3a224a0dfdd", + "ref": "96c6aeb8-70dd-405d-805a-348b21c4ab95", "rows": [ [ "0", @@ -2990,7 +2990,7 @@ "15 Zhenzhen Xie " ] }, - "execution_count": 36, + "execution_count": 65, "metadata": {}, "output_type": "execute_result" } @@ -3003,7 +3003,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 66, "id": "838ca4e1", "metadata": {}, "outputs": [], @@ -3017,7 +3017,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 67, "id": "03fa1b54", "metadata": {}, "outputs": [ @@ -3041,7 +3041,7 @@ "type": "float" } ], - "ref": "40f944f3-ead7-4dae-9d8b-c9fdfcbef8c7", + "ref": "6a0f0e25-20f4-4b04-b984-4634b9ca9e85", "rows": [ [ "0", @@ -3257,7 +3257,7 @@ "15 Zhenzhen Xie 145.0" ] }, - "execution_count": 38, + "execution_count": 67, "metadata": {}, "output_type": "execute_result" } @@ -3269,7 +3269,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 68, "id": "0edd39e3", "metadata": {}, "outputs": [], @@ -3291,7 +3291,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 69, "id": "78bfd7b7", "metadata": {}, "outputs": [ @@ -3301,7 +3301,7 @@ "Index(['Full Name', 'Duration In Minutes'], dtype='object')" ] }, - "execution_count": 40, + "execution_count": 69, "metadata": {}, "output_type": "execute_result" } @@ -3312,7 +3312,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 70, "id": "976408a3", "metadata": {}, "outputs": [ @@ -3336,7 +3336,7 @@ "type": "float" } ], - "ref": "57e53651-3158-46ad-8d29-7e98209318c8", + "ref": "5f7e0092-dcb4-46ba-8ac9-88d91052ec54", "rows": [ [ "0", @@ -3409,7 +3409,7 @@ "2 Christina Porter 124.0" ] }, - "execution_count": 41, + "execution_count": 70, "metadata": {}, "output_type": "execute_result" } @@ -3422,7 +3422,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 71, "id": "4aed423e", "metadata": {}, "outputs": [ @@ -3446,7 +3446,7 @@ "type": "float" } ], - "ref": "ffcb5ea6-8ede-48ec-80b8-71a273f7c93d", + "ref": "2c577d97-b807-4135-8b32-9bc0947eca8b", "rows": [ [ "0", @@ -3497,7 +3497,7 @@ "0 Classroom Admin 1.0" ] }, - "execution_count": 42, + "execution_count": 71, "metadata": {}, "output_type": "execute_result" } @@ -3510,7 +3510,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 72, "id": "2bfdd92e", "metadata": {}, "outputs": [ @@ -3534,7 +3534,7 @@ "type": "float" } ], - "ref": "c075b93c-3143-40ec-ad80-ee6e0a91e9c6", + "ref": "5bf4bf82-4e69-499e-ae22-96cf024622e1", "rows": [ [ "0", @@ -3563,12 +3563,12 @@ ], [ "5", - "Aaron LaLiberty", + "Aaron Laliberty", "99.0" ], [ "6", - "Dakota McMullin", + "Dakota Mcmullin", "72.0" ], [ @@ -3588,7 +3588,7 @@ ], [ "10", - "ken quiggins", + "Ken Quiggins", "103.0" ], [ @@ -3663,12 +3663,12 @@ " \n", " \n", " 5\n", - " Aaron LaLiberty\n", + " Aaron Laliberty\n", " 99.0\n", " \n", " \n", " 6\n", - " Dakota McMullin\n", + " Dakota Mcmullin\n", " 72.0\n", " \n", " \n", @@ -3688,7 +3688,7 @@ " \n", " \n", " 10\n", - " ken quiggins\n", + " Ken Quiggins\n", " 103.0\n", " \n", " \n", @@ -3717,18 +3717,18 @@ "2 Reed Haddix 106.0\n", "3 John Hankins 98.0\n", "4 Stephanie Jones 108.0\n", - "5 Aaron LaLiberty 99.0\n", - "6 Dakota McMullin 72.0\n", + "5 Aaron Laliberty 99.0\n", + "6 Dakota Mcmullin 72.0\n", "7 Toni-Ivy Ownn. 100.0\n", "8 Michael Puckett 97.0\n", "9 Leighton Pulliam 101.0\n", - "10 ken quiggins 103.0\n", + "10 Ken Quiggins 103.0\n", "11 Amber Ratliff 100.0\n", "12 Jill Schrank 102.0\n", "13 Huan Song 103.0" ] }, - "execution_count": 43, + "execution_count": 72, "metadata": {}, "output_type": "execute_result" } @@ -3740,7 +3740,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 73, "id": "b489007c", "metadata": {}, "outputs": [ @@ -3764,17 +3764,22 @@ "type": "float" } ], - "ref": "727c515b-619f-4104-ad87-91edb6abefee", + "ref": "976368be-ed62-493b-aa3f-c5d6755b1ac8", "rows": [ [ "0", + "Ken Quiggins", + "103.0" + ], + [ + "1", "Michael Puckett", "97.0" ] ], "shape": { "columns": 2, - "rows": 1 + "rows": 2 } }, "text/html": [ @@ -3803,6 +3808,11 @@ " \n", " \n", " 0\n", + " Ken Quiggins\n", + " 103.0\n", + " \n", + " \n", + " 1\n", " Michael Puckett\n", " 97.0\n", " \n", @@ -3812,10 +3822,11 @@ ], "text/plain": [ " Full Name Duration In Minutes\n", - "0 Michael Puckett 97.0" + "0 Ken Quiggins 103.0\n", + "1 Michael Puckett 97.0" ] }, - "execution_count": 44, + "execution_count": 73, "metadata": {}, "output_type": "execute_result" } @@ -3828,7 +3839,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 74, "id": "20023162", "metadata": {}, "outputs": [ @@ -3852,7 +3863,7 @@ "type": "float" } ], - "ref": "94c21081-b1ed-4ebc-b2fe-2357782fe30f", + "ref": "a1085e69-3fdf-446d-bfa9-296ef7f6b0a0", "rows": [], "shape": { "columns": 2, @@ -3893,7 +3904,7 @@ "Index: []" ] }, - "execution_count": 45, + "execution_count": 74, "metadata": {}, "output_type": "execute_result" } @@ -3906,7 +3917,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 75, "id": "b88830f9", "metadata": {}, "outputs": [], @@ -3929,7 +3940,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 76, "id": "205ddadf", "metadata": {}, "outputs": [ @@ -3953,7 +3964,7 @@ "type": "float" } ], - "ref": "8793785f-b4a2-44f7-8c64-1596688a3c08", + "ref": "9078f185-1d69-4c12-b0b1-922767f1117b", "rows": [ [ "1", @@ -4125,7 +4136,7 @@ "15 Zhenzhen Xie 145.0" ] }, - "execution_count": 50, + "execution_count": 76, "metadata": {}, "output_type": "execute_result" } @@ -4137,7 +4148,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 78, "id": "d21aae8a", "metadata": {}, "outputs": [ @@ -4161,7 +4172,7 @@ "type": "float" } ], - "ref": "55352337-6e59-4cac-ac8a-da8fc7ccd041", + "ref": "f52c6f68-8230-4454-bd5c-aa008981772c", "rows": [ [ "0", @@ -4190,12 +4201,12 @@ ], [ "5", - "Aaron LaLiberty", + "Aaron Laliberty", "99.0" ], [ "6", - "Dakota McMullin", + "Dakota Mcmullin", "72.0" ], [ @@ -4208,11 +4219,6 @@ "Leighton Pulliam", "101.0" ], - [ - "10", - "ken quiggins", - "103.0" - ], [ "11", "Amber Ratliff", @@ -4231,7 +4237,7 @@ ], "shape": { "columns": 2, - "rows": 13 + "rows": 12 } }, "text/html": [ @@ -4285,12 +4291,12 @@ " \n", " \n", " 5\n", - " Aaron LaLiberty\n", + " Aaron Laliberty\n", " 99.0\n", " \n", " \n", " 6\n", - " Dakota McMullin\n", + " Dakota Mcmullin\n", " 72.0\n", " \n", " \n", @@ -4304,11 +4310,6 @@ " 101.0\n", " \n", " \n", - " 10\n", - " ken quiggins\n", - " 103.0\n", - " \n", - " \n", " 11\n", " Amber Ratliff\n", " 100.0\n", @@ -4334,17 +4335,16 @@ "2 Reed Haddix 106.0\n", "3 John Hankins 98.0\n", "4 Stephanie Jones 108.0\n", - "5 Aaron LaLiberty 99.0\n", - "6 Dakota McMullin 72.0\n", + "5 Aaron Laliberty 99.0\n", + "6 Dakota Mcmullin 72.0\n", "7 Toni-Ivy Ownn. 100.0\n", "9 Leighton Pulliam 101.0\n", - "10 ken quiggins 103.0\n", "11 Amber Ratliff 100.0\n", "12 Jill Schrank 102.0\n", "13 Huan Song 103.0" ] }, - "execution_count": 51, + "execution_count": 78, "metadata": {}, "output_type": "execute_result" }