bachelorThesis/task_slowdown/task_slowdown_table.ipynb
2021-05-19 22:20:49 +02:00

453 lines
23 KiB
Text

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Task slowdown"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"import sys\n",
"import gzip\n",
"import pandas\n",
"import seaborn as sns\n",
"import matplotlib as mpl\n",
"import matplotlib.pyplot as plt\n",
"from IPython.display import display, HTML"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Legend for columns:\n",
"- *n_fsh*: number of jobs that terminated with status 6 (FINISH)\n",
"- *n_non*: number of jobs that did not terminate with status 6 or did not terminate at all\n",
"- *finished%*: `n_fsh` / (`n_fsh` + `n_non`)\n",
"- *c_zero_end*: count of number of **Finished** jobs that have a last execution time of `0` \n",
"- *s_last*: sum of execution times for last events\n",
"- *m_last*: mean execution time for last event\n",
"- *s_all*: sum of all execution times for all events\n",
"- *m_all*: mean execution time for all events\n",
"- *s_slow*: sum of **slowdown** values computed for each job: `job_slowdown` = sum(`exec_time`) / last(`exec_time`)\n",
"- *m_slow*: mean job-wise **slowdown** value, i.e. `s_slow` / `n_fsh`\n",
"- *m_slow_2*: priority-wise mean **slowdown**, i.e. `s_all` / `s_last`"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\\taskslowdown{Cluster A}{\n",
"\\begin{tabular}{rlrrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_last & m\\_all & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" -1 & 10.62\\% & 783.0 & 593.0 & 1.10 \\\\\n",
" 24 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 25 & 0.33\\% & 5769.0 & 1203.0 & 82.97 \\\\\n",
" 100 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 101 & 81.92\\% & 63305.0 & 6346.0 & 30.80 \\\\\n",
" 102 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 103 & 14.99\\% & 3074.0 & 3033.0 & 1.13 \\\\\n",
" 105 & 57.68\\% & 1666.0 & 1750.0 & 1.08 \\\\\n",
" 107 & 53.93\\% & 1022.0 & 1031.0 & 1.02 \\\\\n",
" 114 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 115 & 4.11\\% & 2041.0 & 2042.0 & 1.00 \\\\\n",
" 116 & 13.05\\% & 4443.0 & 4443.0 & 1.03 \\\\\n",
" 117 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 118 & 11.91\\% & 1817.0 & 1814.0 & 1.00 \\\\\n",
" 119 & 21.26\\% & 2250.0 & 2877.0 & 1.50 \\\\\n",
" 170 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 200 & 27.21\\% & 4546.0 & 16845.0 & 4.12 \\\\\n",
" 205 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 210 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 214 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 215 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 360 & 0.62\\% & 514181.0 & 400580.0 & 2.92 \\\\\n",
" 400 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 450 & 2.2\\% & 686817.0 & 653878.0 & 1.14 \\\\\n",
" 500 & 0.0\\% & NaN & NaN & NaN \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster B}{\n",
"\\begin{tabular}{rlrrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_last & m\\_all & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 45.19\\% & 1351.0 & 1467.0 & 1.18 \\\\\n",
" 25 & 0.02\\% & 10696.0 & 4121.0 & 133.48 \\\\\n",
" 80 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 100 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 101 & 66.48\\% & 6069.0 & 5402.0 & 433.41 \\\\\n",
" 103 & 0.11\\% & 19430.0 & 14897.0 & 1.65 \\\\\n",
" 105 & 0.46\\% & 934421.0 & 392431.0 & 2.41 \\\\\n",
" 107 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 114 & 0.68\\% & 32949.0 & 30470.0 & 1.00 \\\\\n",
" 115 & 4.12\\% & 25585.0 & 107089.0 & 5.92 \\\\\n",
" 116 & 8.32\\% & 29290.0 & 29017.0 & 1.11 \\\\\n",
" 117 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 118 & 0.31\\% & 2776.0 & 2776.0 & 1.00 \\\\\n",
" 119 & 0.2\\% & 193081.0 & 304469.0 & 2.56 \\\\\n",
" 170 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 199 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 200 & 30.92\\% & 182604.0 & 466329.0 & 9.71 \\\\\n",
" 205 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 210 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 214 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 215 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 360 & 3.5\\% & 1048245.0 & 495124.0 & 1.61 \\\\\n",
" 450 & 0.61\\% & 1579367.0 & 1529555.0 & 1.06 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster C}{\n",
"\\begin{tabular}{rlrrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_last & m\\_all & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 50.89\\% & 933.0 & 1002.0 & 1.11 \\\\\n",
" 3 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 10 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 25 & 22.47\\% & 171281.0 & 4551.0 & 8.19 \\\\\n",
" 100 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 101 & 52.63\\% & 6271.0 & 2498.0 & 421.49 \\\\\n",
" 103 & 0.01\\% & 3344.0 & 7444.0 & 2.79 \\\\\n",
" 105 & 0.02\\% & 1202141.0 & 863764.0 & 1.37 \\\\\n",
" 107 & 0.0\\% & 7033.0 & 93102.0 & 14.71 \\\\\n",
" 114 & 0.02\\% & 3148.0 & 3142.0 & 1.01 \\\\\n",
" 115 & 0.28\\% & 14729.0 & 27168.0 & 1.98 \\\\\n",
" 116 & 0.01\\% & 2846.0 & 2851.0 & 1.02 \\\\\n",
" 117 & 93.17\\% & 2144.0 & 2144.0 & 1.00 \\\\\n",
" 118 & 0.0\\% & 1114.0 & 1112.0 & 1.10 \\\\\n",
" 119 & 2.22\\% & 573740.0 & 242446.0 & 2.04 \\\\\n",
" 170 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 200 & 3.61\\% & 352603.0 & 357993.0 & 4.14 \\\\\n",
" 205 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 210 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 214 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 215 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 360 & 4.37\\% & 769284.0 & 442062.0 & 2.06 \\\\\n",
" 450 & 1.51\\% & 1390175.0 & 1319771.0 & 1.07 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster D}{\n",
"\\begin{tabular}{rlrrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_last & m\\_all & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 26.52\\% & 1398.0 & 1469.0 & 1.12 \\\\\n",
" 5 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 25 & 16.29\\% & 21432.0 & 4037.0 & 65.68 \\\\\n",
" 100 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 101 & 45.31\\% & 8391.0 & 3317.0 & 315.95 \\\\\n",
" 103 & 0.0\\% & 6791.0 & 6647.0 & 1.07 \\\\\n",
" 105 & 0.05\\% & 825749.0 & 924081.0 & 2.90 \\\\\n",
" 107 & 0.0\\% & 300532.0 & 174837.0 & 1.55 \\\\\n",
" 114 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 115 & 5.19\\% & 12598.0 & 26142.0 & 2.19 \\\\\n",
" 116 & 0.13\\% & 9268.0 & 10955.0 & 1.28 \\\\\n",
" 117 & 85.71\\% & 10969.0 & 10969.0 & 1.00 \\\\\n",
" 118 & 0.05\\% & 24041.0 & 30599.0 & 2.05 \\\\\n",
" 119 & 0.44\\% & 184484.0 & 172746.0 & 3.02 \\\\\n",
" 197 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 199 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 200 & 6.53\\% & 279565.0 & 349364.0 & 5.51 \\\\\n",
" 205 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 210 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 214 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 215 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 360 & 1.59\\% & 650116.0 & 390151.0 & 2.48 \\\\\n",
" 450 & 0.61\\% & 938727.0 & 523665.0 & 1.33 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster E}{\n",
"\\begin{tabular}{rlrrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_last & m\\_all & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 42.81\\% & 802.0 & 1127.0 & 1.44 \\\\\n",
" 25 & 5.34\\% & 32247.0 & 38946.0 & 2.68 \\\\\n",
" 100 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 101 & 0.02\\% & 30603.0 & 27726.0 & 1.12 \\\\\n",
" 103 & 0.02\\% & 76294.0 & 48552.0 & 3.16 \\\\\n",
" 105 & 0.4\\% & 106677.0 & 64190.0 & 14.75 \\\\\n",
" 107 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 114 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 115 & 0.03\\% & 67237.0 & 65369.0 & 1.00 \\\\\n",
" 116 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 117 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 118 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 119 & 0.46\\% & 62123.0 & 83322.0 & 10.31 \\\\\n",
" 170 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 200 & 1.96\\% & 231639.0 & 414149.0 & 8.54 \\\\\n",
" 201 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 205 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 210 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 215 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 220 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 360 & 37.16\\% & 611504.0 & 439280.0 & 2.87 \\\\\n",
" 450 & 0.55\\% & 803792.0 & 824467.0 & 1.11 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster F}{\n",
"\\begin{tabular}{rlrrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_last & m\\_all & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 45.21\\% & 2929.0 & 2973.0 & 1.09 \\\\\n",
" 25 & 0.65\\% & 184518.0 & 34096.0 & 2.23 \\\\\n",
" 100 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 101 & 40.3\\% & 8160.0 & 10083.0 & 323.86 \\\\\n",
" 103 & 0.06\\% & 46444.0 & 47234.0 & 1.17 \\\\\n",
" 105 & 0.22\\% & 1111530.0 & 1173594.0 & 1.55 \\\\\n",
" 107 & 0.06\\% & 80151.0 & 78835.0 & 1.01 \\\\\n",
" 114 & 0.01\\% & 677.0 & 677.0 & 1.00 \\\\\n",
" 115 & 3.65\\% & 121345.0 & 252663.0 & 5.09 \\\\\n",
" 116 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 117 & 0.0\\% & 15875.0 & 15875.0 & 1.00 \\\\\n",
" 118 & 0.0\\% & 30045.0 & 25492.0 & 1.00 \\\\\n",
" 119 & 31.35\\% & 154196.0 & 68833.0 & 7.61 \\\\\n",
" 200 & 3.65\\% & 297168.0 & 492372.0 & 5.94 \\\\\n",
" 201 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 360 & 7.42\\% & 963351.0 & 569428.0 & 2.17 \\\\\n",
" 450 & 0.99\\% & 1115783.0 & 1113282.0 & 1.02 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster G}{\n",
"\\begin{tabular}{rlrrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_last & m\\_all & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 33.61\\% & 3010.0 & 3317.0 & 1.14 \\\\\n",
" 25 & 0.23\\% & 61708.0 & 12156.0 & 8.69 \\\\\n",
" 50 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 100 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 101 & 96.47\\% & 133953.0 & 7448.0 & 19.38 \\\\\n",
" 103 & 0.03\\% & 118310.0 & 112746.0 & 1.27 \\\\\n",
" 105 & 0.2\\% & 8271.0 & 8214.0 & 1.00 \\\\\n",
" 107 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 114 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 115 & 7.63\\% & 34424.0 & 56315.0 & 1.80 \\\\\n",
" 117 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 118 & 48.97\\% & 608526.0 & 474729.0 & 3.88 \\\\\n",
" 119 & 0.09\\% & 124006.0 & 231395.0 & 3.17 \\\\\n",
" 170 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 200 & 26.75\\% & 115953.0 & 399050.0 & 14.57 \\\\\n",
" 360 & 1.62\\% & 786594.0 & 488025.0 & 2.12 \\\\\n",
" 450 & 2.74\\% & 1204747.0 & 1188251.0 & 1.04 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\taskslowdown{Cluster H}{\n",
"\\begin{tabular}{rlrrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_last & m\\_all & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" 0 & 27.74\\% & 5663.0 & 6211.0 & 1.12 \\\\\n",
" 19 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 25 & 1.04\\% & 304870.0 & 283847.0 & 3.06 \\\\\n",
" 101 & 100.0\\% & 34063.0 & 12250.0 & 76.44 \\\\\n",
" 103 & 0.48\\% & 272635.0 & 92894.0 & 1.26 \\\\\n",
" 105 & 1.43\\% & 611763.0 & 393762.0 & 4.21 \\\\\n",
" 107 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 115 & 5.12\\% & 28907.0 & 28907.0 & 1.00 \\\\\n",
" 116 & 1.04\\% & 633.0 & 42105.0 & 73.45 \\\\\n",
" 117 & 0.0\\% & 656.0 & 656.0 & 1.00 \\\\\n",
" 118 & 1.0\\% & 197687.0 & 139121.0 & 1.95 \\\\\n",
" 119 & 0.15\\% & 139907.0 & 15558.0 & 7.30 \\\\\n",
" 200 & 2.7\\% & 298799.0 & 470783.0 & 5.80 \\\\\n",
" 201 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 220 & 0.0\\% & NaN & NaN & NaN \\\\\n",
" 360 & 4.43\\% & 838719.0 & 397301.0 & 2.02 \\\\\n",
" 450 & 0.54\\% & 1470577.0 & 1411397.0 & 1.05 \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n",
"\\begin{tabular}{rlrrr}\n",
"\\toprule\n",
" priority & finished\\% & m\\_last & m\\_all & m\\_slow\\_2 \\\\\n",
"\\midrule\n",
" -1 & 10.62\\% & 783.0 & 0.0 & 1.097556 \\\\\n",
" 0 & 42.86\\% & 1373.0 & 0.0 & 1.136770 \\\\\n",
" 3 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 5 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 10 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 19 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 24 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 25 & 1.31\\% & 86732.0 & 22.0 & 11.772172 \\\\\n",
" 50 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 80 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 100 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 101 & 5.2\\% & 65233.0 & 673.0 & 36.358841 \\\\\n",
" 102 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 103 & 1.05\\% & 8210.0 & 28.0 & 1.257530 \\\\\n",
" 105 & 22.9\\% & 3651.0 & 616.0 & 1.733089 \\\\\n",
" 107 & 18.51\\% & 1025.0 & 308.0 & 1.017332 \\\\\n",
" 114 & 0.07\\% & 29364.0 & 2.0 & 1.003503 \\\\\n",
" 115 & 1.74\\% & 10059.0 & 22.0 & 3.461721 \\\\\n",
" 116 & 3.03\\% & 18226.0 & 71.0 & 1.102756 \\\\\n",
" 117 & 0.0\\% & 2430.0 & 1.0 & 1.000000 \\\\\n",
" 118 & 1.28\\% & 15072.0 & 163.0 & 3.340741 \\\\\n",
" 119 & 4.49\\% & 19449.0 & 280.0 & 5.326446 \\\\\n",
" 170 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 197 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 199 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 200 & 13.54\\% & 54789.0 & 24.0 & 6.684155 \\\\\n",
" 201 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 205 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 210 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 214 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 215 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 220 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 360 & 3.36\\% & 788069.0 & 42.0 & 2.241646 \\\\\n",
" 400 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
" 450 & 1.15\\% & 1182248.0 & 197.0 & 1.068893 \\\\\n",
" 500 & 0.0\\% & NaN & 0.0 & NaN \\\\\n",
"\\bottomrule\n",
"\\end{tabular}\n",
"\n",
"}\n"
]
}
],
"source": [
"CLUSTERS = \"abcdefgh\"\n",
"DIR = \"/Users/maggicl/Git/bachelorThesis/task_slowdown/\"\n",
"\n",
"df = {}\n",
"dftotal = None\n",
"\n",
"for cluster in CLUSTERS:\n",
" print(\"\\\\taskslowdown{Cluster \" + cluster.upper() + \"}{\")\n",
" df[cluster] = pandas.read_csv(DIR + \"/\" + cluster + \"_slowdown_table.csv\")\n",
" df[cluster][\"m_slow_2\"] = (df[cluster][\"s_all\"] / df[cluster][\"s_last\"]).round(2)\n",
" del df[cluster][\"s_slow\"]\n",
" del df[cluster][\"m_slow\"]\n",
" df[cluster][\"m_all\"] = (df[cluster][\"m_all\"] / 1000000).round(0)\n",
" df[cluster][\"m_last\"] = (df[cluster][\"m_last\"] / 1000000).round(0)\n",
" del df[cluster][\"c_zero_end\"]\n",
" del df[cluster][\"Unnamed: 0\"]\n",
" \n",
" \n",
" df2 = df[cluster].copy()\n",
" df[cluster][\"c\"] = df2[\"m_all\"] / df2[\"s_all\"]\n",
" del df2[\"s_all\"]\n",
" del df2[\"s_last\"]\n",
" del df2[\"n_fsh\"]\n",
" del df2[\"n_non\"]\n",
" #del df2[\"c\"]\n",
" df2[\"finished%\"] = (df2[\"finished%\"] * 100).round(2).astype(str) + \"%\"\n",
" print(df2.to_latex(index=False))\n",
" print(\"}\")\n",
" \n",
" if dftotal is None:\n",
" dftotal = df[cluster]\n",
" else:\n",
" dftotal = dftotal.append(df[cluster])\n",
" \n",
"dftotal = dftotal.groupby(\"priority\").sum().reset_index()\n",
"dftotal[\"m_slow_2\"] = (dftotal[\"s_all\"] / dftotal[\"s_last\"]) \n",
"dftotal[\"finished%\"] = (dftotal[\"n_fsh\"]) / (dftotal[\"n_fsh\"] + dftotal[\"n_non\"])\n",
"dftotal[\"m_last\"] = (dftotal[\"s_last\"] / (dftotal[\"n_fsh\"] * 1000000)).round(0)\n",
"dftotal[\"m_all\"] = (dftotal[\"s_all\"] * dftotal[\"c\"] / 1000000).round(0)\n",
"del dftotal[\"s_all\"]\n",
"del dftotal[\"s_last\"]\n",
"del dftotal[\"n_fsh\"]\n",
"del dftotal[\"n_non\"]\n",
"del dftotal[\"c\"]\n",
"\n",
"df2 = dftotal.copy()\n",
"df2[\"m_all\"] = df2[\"m_all\"].round(0)\n",
"df2[\"m_last\"] = df2[\"m_last\"].round(0)\n",
"#del df2[\"c\"]\n",
"df2[\"finished%\"] = (df2[\"finished%\"] * 100).round(2).astype(str) + \"%\"\n",
"print(df2.to_latex(index=False))\n",
"print(\"}\")\n"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'wc' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-7-55b47c0da7a2>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mwc\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'wc' is not defined"
]
}
],
"source": [
"wc"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"tc"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}