{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import os\n",
|
|
"import pandas as pd"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"todPlan = pd.read_excel('todPlan.xlsx')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div>\n",
|
|
"<style scoped>\n",
|
|
" .dataframe tbody tr th:only-of-type {\n",
|
|
" vertical-align: middle;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe tbody tr th {\n",
|
|
" vertical-align: top;\n",
|
|
" }\n",
|
|
"\n",
|
|
" .dataframe thead th {\n",
|
|
" text-align: right;\n",
|
|
" }\n",
|
|
"</style>\n",
|
|
"<table border=\"1\" class=\"dataframe\">\n",
|
|
" <thead>\n",
|
|
" <tr style=\"text-align: right;\">\n",
|
|
" <th></th>\n",
|
|
" <th>location_id</th>\n",
|
|
" <th>todPlan_index</th>\n",
|
|
" <th>todPlan_data</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>2</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>0,0,160,136,42,42,42,42,12,12,30,30,34,34,0,0,...</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
],
|
|
"text/plain": [
|
|
" location_id todPlan_index \\\n",
|
|
"2 2 0 \n",
|
|
"\n",
|
|
" todPlan_data \n",
|
|
"2 0,0,160,136,42,42,42,42,12,12,30,30,34,34,0,0,... "
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"location_id = 2\n",
|
|
"todPlan_index = 0\n",
|
|
"the_todPlan = todPlan[(todPlan.location_id==location_id)&(todPlan.todPlan_index==todPlan_index)]\n",
|
|
"display(the_todPlan)\n",
|
|
"row = the_todPlan.iloc[0]\n",
|
|
"data = row.todPlan_data"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 22,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"1 0\n",
|
|
"0,0,160,132,60,60,34,34,16,16,50,50,0,0,0,0,0,0,0,0,6,0,180,152,66,66,43,43,23,23,48,48,0,0,0,0,0,0,0,0,10,0,170,142,68,68,36,36,18,18,48,48,0,0,0,0,0,0,0,0,16,0,180,152,70,70,43,43,22,22,45,45,0,0,0,0,0,0,0,0\n",
|
|
"80\n",
|
|
"1 1\n",
|
|
"0,0,160,132,60,60,34,34,16,16,50,50,0,0,0,0,0,0,0,0,6,0,180,152,70,70,40,40,20,20,50,50,0,0,0,0,0,0,0,0\n",
|
|
"40\n",
|
|
"2 0\n",
|
|
"0,0,160,136,42,42,42,42,12,12,30,30,34,34,0,0,0,0,0,0,6,0,180,156,44,44,57,57,15,15,30,30,34,34,0,0,0,0,0,0,7,30,180,156,40,40,53,53,15,15,30,30,42,42,0,0,0,0,0,0,9,0,180,156,44,44,57,57,15,15,30,30,34,34,0,0,0,0,0,0,10,0,170,146,44,44,50,50,12,12,30,30,34,34,0,0,0,0,0,0,16,0,180,156,44,44,52,52,20,20,30,30,34,34,0,0,0,0,0,0\n",
|
|
"120\n",
|
|
"2 1\n",
|
|
"0,0,160,136,42,42,42,42,12,12,30,30,34,34,0,0,0,0,0,0,6,0,180,156,44,44,57,57,15,15,30,30,34,34,0,0,0,0,0,0,7,30,180,156,40,40,53,53,15,15,30,30,42,42,0,0,0,0,0,0,9,0,180,156,44,44,57,57,15,15,30,30,34,34,0,0,0,0,0,0\n",
|
|
"80\n",
|
|
"3 1\n",
|
|
"0,0,160,125,75,75,25,25,40,40,20,20,0,0,0,0,0,0,0,0,6,0,180,155,85,85,35,35,40,40,20,20,0,0,0,0,0,0,0,0\n",
|
|
"40\n",
|
|
"3 0\n",
|
|
"0,0,160,125,75,75,25,25,40,40,20,20,0,0,0,0,0,0,0,0,6,0,180,150,85,85,35,35,40,40,20,20,0,0,0,0,0,0,0,0,10,0,170,140,85,85,25,25,40,40,20,20,0,0,0,0,0,0,0,0,16,0,180,153,85,85,35,35,40,40,20,20,0,0,0,0,0,0,0,0\n",
|
|
"80\n",
|
|
"4 0\n",
|
|
"0,0,160,115,40,40,65,65,20,20,35,35,0,0,0,0,0,0,0,0,6,0,180,133,47,47,68,68,30,30,35,35,0,0,0,0,0,0,0,0,10,0,170,120,45,45,73,73,17,17,35,35,0,0,0,0,0,0,0,0,16,0,180,130,45,45,70,70,25,25,40,40,0,0,0,0,0,0,0,0\n",
|
|
"80\n",
|
|
"4 1\n",
|
|
"0,0,160,115,40,40,65,65,20,20,35,35,0,0,0,0,0,0,0,0,6,0,180,125,50,50,65,65,30,30,35,35,0,0,0,0,0,0,0,0\n",
|
|
"40\n",
|
|
"5 1\n",
|
|
"6,0,140,70,67,67,18,18,18,18,37,37,0,0,0,0,0,0,0,0\n",
|
|
"20\n",
|
|
"5 0\n",
|
|
"6,0,140,70,67,67,18,18,18,18,37,37,0,0,0,0,0,0,0,0\n",
|
|
"20\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"for i in range(10):\n",
|
|
" print(todPlan.iloc[i].location_id, todPlan.iloc[i].todPlan_index)\n",
|
|
" print(todPlan.iloc[i].todPlan_data)\n",
|
|
" plan = todPlan.iloc[i].todPlan_data.split(',')\n",
|
|
" print(len(plan))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 16,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"0 80\n",
|
|
"1 40\n",
|
|
"2 120\n",
|
|
"3 80\n",
|
|
"4 40\n",
|
|
"5 80\n",
|
|
"6 80\n",
|
|
"7 40\n",
|
|
"8 20\n",
|
|
"9 20\n",
|
|
"10 320\n",
|
|
"11 320\n",
|
|
"12 320\n",
|
|
"13 320\n",
|
|
"14 20\n",
|
|
"15 40\n",
|
|
"16 60\n",
|
|
"17 20\n",
|
|
"18 20\n",
|
|
"19 20\n",
|
|
"20 40\n",
|
|
"21 40\n",
|
|
"22 80\n",
|
|
"23 40\n",
|
|
"24 40\n",
|
|
"25 100\n",
|
|
"26 320\n",
|
|
"27 320\n",
|
|
"28 40\n",
|
|
"29 80\n",
|
|
"30 20\n",
|
|
"31 320\n",
|
|
"32 320\n",
|
|
"33 320\n",
|
|
"34 320\n",
|
|
"35 320\n",
|
|
"36 320\n",
|
|
"37 320\n",
|
|
"38 320\n",
|
|
"39 320\n",
|
|
"40 320\n",
|
|
"41 320\n",
|
|
"42 320\n",
|
|
"43 320\n",
|
|
"44 80\n",
|
|
"45 40\n",
|
|
"46 20\n",
|
|
"47 20\n",
|
|
"48 40\n",
|
|
"49 320\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"for i in range(50):\n",
|
|
" plan = todPlan.iloc[i].todPlan_data.split(',')\n",
|
|
" print(i, len(plan))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"120"
|
|
]
|
|
},
|
|
"execution_count": 13,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"plan = data.split(',')\n",
|
|
"len(plan)"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "siggen_env",
|
|
"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.12.4"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|