{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Import various Python packages.\n", "\n", "import pandas as pd\n", "import numpy as np\n", "import statistics\n", "import math\n", "import matplotlib.pyplot as plt\n", "import statsmodels.api as sm\n", "from statsmodels.graphics.gofplots import qqplot\n", "from scipy.stats import shapiro" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Import the data set into a Python dataframe, which we will call df.\n", "# Clean the dataframe so we only include the columns CPT, Surgery Time, and Wait Time Target.\n", "\n", "df = pd.read_csv(\"On Time OR - Surgery durations (Richard Hoshino).csv\", \n", " names=[\"A\", \"B\", \"C\", \"CPT\", \"Time\", \"F\", \"G\", \"H\", \"I\", \"WTT\", \n", " \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\"])\n", "df = df.drop([\"A\", \"B\", \"C\", \"F\", \"G\", \"H\", \"I\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\"], axis=1)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | CPT | \n", "Time | \n", "WTT | \n", "LogTime | \n", "
---|---|---|---|---|
0 | \n", "11047 | \n", "15 | \n", "4 hours | \n", "2.708050 | \n", "
1 | \n", "11047 | \n", "60 | \n", "24 hours | \n", "4.094345 | \n", "
2 | \n", "11047 | \n", "40 | \n", "24 hours | \n", "3.688879 | \n", "
3 | \n", "11047 | \n", "20 | \n", "24 hours | \n", "2.995732 | \n", "
4 | \n", "11047 | \n", "60 | \n", "24 hours | \n", "4.094345 | \n", "