Browse Source

last modifications

master
김선중 1 year ago
parent
commit
cc26228c41
2 changed files with 282 additions and 41 deletions
  1. BIN
      Scripts/__pycache__/generate_signals.cpython-312.pyc
  2. +282
    -41
      analysis/0725_main_test/6_use_class_gs.ipynb

BIN
Scripts/__pycache__/generate_signals.cpython-312.pyc View File


+ 282
- 41
analysis/0725_main_test/6_use_class_gs.ipynb View File

@ -55,7 +55,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 19,
"execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -91,7 +91,7 @@
" <tbody>\n", " <tbody>\n",
" <tr>\n", " <tr>\n",
" <th>0</th>\n", " <th>0</th>\n",
" <td>1722416326</td>\n",
" <td>1722383926</td>\n",
" <td>436</td>\n", " <td>436</td>\n",
" <td>2</td>\n", " <td>2</td>\n",
" <td>2</td>\n", " <td>2</td>\n",
@ -101,7 +101,7 @@
" </tr>\n", " </tr>\n",
" <tr>\n", " <tr>\n",
" <th>1</th>\n", " <th>1</th>\n",
" <td>1722416326</td>\n",
" <td>1722383926</td>\n",
" <td>437</td>\n", " <td>437</td>\n",
" <td>3</td>\n", " <td>3</td>\n",
" <td>3</td>\n", " <td>3</td>\n",
@ -111,7 +111,7 @@
" </tr>\n", " </tr>\n",
" <tr>\n", " <tr>\n",
" <th>2</th>\n", " <th>2</th>\n",
" <td>1722416326</td>\n",
" <td>1722383926</td>\n",
" <td>438</td>\n", " <td>438</td>\n",
" <td>1</td>\n", " <td>1</td>\n",
" <td>1</td>\n", " <td>1</td>\n",
@ -121,7 +121,7 @@
" </tr>\n", " </tr>\n",
" <tr>\n", " <tr>\n",
" <th>3</th>\n", " <th>3</th>\n",
" <td>1722416326</td>\n",
" <td>1722383926</td>\n",
" <td>442</td>\n", " <td>442</td>\n",
" <td>1</td>\n", " <td>1</td>\n",
" <td>1</td>\n", " <td>1</td>\n",
@ -131,7 +131,7 @@
" </tr>\n", " </tr>\n",
" <tr>\n", " <tr>\n",
" <th>4</th>\n", " <th>4</th>\n",
" <td>1722416326</td>\n",
" <td>1722383926</td>\n",
" <td>443</td>\n", " <td>443</td>\n",
" <td>1</td>\n", " <td>1</td>\n",
" <td>1</td>\n", " <td>1</td>\n",
@ -151,7 +151,7 @@
" </tr>\n", " </tr>\n",
" <tr>\n", " <tr>\n",
" <th>11095</th>\n", " <th>11095</th>\n",
" <td>1722417443</td>\n",
" <td>1722385043</td>\n",
" <td>444</td>\n", " <td>444</td>\n",
" <td>4</td>\n", " <td>4</td>\n",
" <td>4</td>\n", " <td>4</td>\n",
@ -161,7 +161,7 @@
" </tr>\n", " </tr>\n",
" <tr>\n", " <tr>\n",
" <th>11096</th>\n", " <th>11096</th>\n",
" <td>1722417443</td>\n",
" <td>1722385043</td>\n",
" <td>455</td>\n", " <td>455</td>\n",
" <td>2</td>\n", " <td>2</td>\n",
" <td>2</td>\n", " <td>2</td>\n",
@ -171,7 +171,7 @@
" </tr>\n", " </tr>\n",
" <tr>\n", " <tr>\n",
" <th>11097</th>\n", " <th>11097</th>\n",
" <td>1722417443</td>\n",
" <td>1722385043</td>\n",
" <td>456</td>\n", " <td>456</td>\n",
" <td>4</td>\n", " <td>4</td>\n",
" <td>4</td>\n", " <td>4</td>\n",
@ -181,7 +181,7 @@
" </tr>\n", " </tr>\n",
" <tr>\n", " <tr>\n",
" <th>11098</th>\n", " <th>11098</th>\n",
" <td>1722417443</td>\n",
" <td>1722385043</td>\n",
" <td>457</td>\n", " <td>457</td>\n",
" <td>3</td>\n", " <td>3</td>\n",
" <td>3</td>\n", " <td>3</td>\n",
@ -191,7 +191,7 @@
" </tr>\n", " </tr>\n",
" <tr>\n", " <tr>\n",
" <th>11099</th>\n", " <th>11099</th>\n",
" <td>1722417443</td>\n",
" <td>1722385043</td>\n",
" <td>458</td>\n", " <td>458</td>\n",
" <td>2</td>\n", " <td>2</td>\n",
" <td>2</td>\n", " <td>2</td>\n",
@ -206,22 +206,22 @@
], ],
"text/plain": [ "text/plain": [
" start_unix inter_no phas_A phas_B STOS_NO move_A move_B\n", " start_unix inter_no phas_A phas_B STOS_NO move_A move_B\n",
"0 1722416326 436 2 2 0 8 3\n",
"1 1722416326 437 3 3 0 8 3\n",
"2 1722416326 438 1 1 0 6 2\n",
"3 1722416326 442 1 1 0 6 1\n",
"4 1722416326 443 1 1 0 6 2\n",
"0 1722383926 436 2 2 0 8 3\n",
"1 1722383926 437 3 3 0 8 3\n",
"2 1722383926 438 1 1 0 6 2\n",
"3 1722383926 442 1 1 0 6 1\n",
"4 1722383926 443 1 1 0 6 2\n",
"... ... ... ... ... ... ... ...\n", "... ... ... ... ... ... ... ...\n",
"11095 1722417443 444 4 4 0 -1 -1\n",
"11096 1722417443 455 2 2 0 -1 -1\n",
"11097 1722417443 456 4 4 0 17 -1\n",
"11098 1722417443 457 3 3 0 17 17\n",
"11099 1722417443 458 2 2 0 17 17\n",
"11095 1722385043 444 4 4 0 -1 -1\n",
"11096 1722385043 455 2 2 0 -1 -1\n",
"11097 1722385043 456 4 4 0 17 -1\n",
"11098 1722385043 457 3 3 0 17 17\n",
"11099 1722385043 458 2 2 0 17 17\n",
"\n", "\n",
"[11100 rows x 7 columns]" "[11100 rows x 7 columns]"
] ]
}, },
"execution_count": 19,
"execution_count": 4,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -240,14 +240,22 @@
" lambda row: int(isp2move_A.get((row.inter_no, row.STOS_NO, row.phas_A), -1)), axis=1)\n", " lambda row: int(isp2move_A.get((row.inter_no, row.STOS_NO, row.phas_A), -1)), axis=1)\n",
"phases['move_B'] = phases.apply(\n", "phases['move_B'] = phases.apply(\n",
" lambda row: int(isp2move_B.get((row.inter_no, row.STOS_NO, row.phas_B), -1)), axis=1)\n", " lambda row: int(isp2move_B.get((row.inter_no, row.STOS_NO, row.phas_B), -1)), axis=1)\n",
"phases['start_unix'] = pd.to_datetime(phases['start_unix'])\n",
"phases['start_unix'] = phases['start_unix'].apply(lambda x: int(x.timestamp()))\n",
"phases['start_unix'] = phases['start_unix'].apply(lambda x:int(datetime.strptime(x, '%Y-%m-%d %H:%M:%S').timestamp()))\n",
"phases" "phases"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 20,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"self.history['end_unix'] = self.history['end_unix'].apply(lambda x:int(datetime.strptime(x, '%Y-%m-%d %H:%M:%S').timestamp()))\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -256,38 +264,271 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 25,
"execution_count": 26,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"ename": "NameError",
"evalue": "name 'move' is not defined",
"name": "stdout",
"output_type": "stream",
"text": [
"1722383926\n",
"1722385043\n",
"1722384300\n",
"1722384000\n",
"1722384300\n"
]
}
],
"source": [
"print(phases.start_unix.min())\n",
"print(phases.start_unix.max())\n",
"print(self.present_time)\n",
"print(fsecs[0])\n",
"print(fsecs[-1])"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"fsecs = list(range(self.present_time - self.sim_timespan, self.present_time + 1, 5))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"ename": "ValueError",
"evalue": "Cannot merge a Series without a name",
"output_type": "error", "output_type": "error",
"traceback": [ "traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[25], line 16\u001b[0m\n\u001b[0;32m 7\u001b[0m move \u001b[38;5;241m=\u001b[39m pd\u001b[38;5;241m.\u001b[39mconcat(moves)\n\u001b[0;32m 8\u001b[0m \u001b[38;5;66;03m# # 2. 이력 테이블 조회해서 교차로별로 유닉스시간 최대인 데이터(교차로번호, 종료유닉스타임)만 수집 : B\u001b[39;00m\n\u001b[0;32m 9\u001b[0m \u001b[38;5;66;03m# recent_histories = [group.iloc[-1:] for _, group in self.history[self.history['end_unix'] < fsec].groupby('inter_no')] # 교차로별로 유닉스시간이 최대인 행들\u001b[39;00m\n\u001b[0;32m 10\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 14\u001b[0m \u001b[38;5;66;03m# rhistory = pd.concat(recent_histories)\u001b[39;00m\n\u001b[0;32m 15\u001b[0m \u001b[38;5;66;03m# recent_unix = rhistory[['inter_no', 'end_unix']]\u001b[39;00m\n\u001b[1;32m---> 16\u001b[0m \u001b[43mmove\u001b[49m\n",
"\u001b[1;31mNameError\u001b[0m: name 'move' is not defined"
"\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[7], line 20\u001b[0m\n\u001b[0;32m 18\u001b[0m recent_unix \u001b[38;5;241m=\u001b[39m rhistory[[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124minter_no\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mend_unix\u001b[39m\u001b[38;5;124m'\u001b[39m]]\n\u001b[0;32m 19\u001b[0m \u001b[38;5;66;03m# 3. 상태 테이블 조회정보(A)와 이력 테이블 조회정보(B) 조인(키값 : 교차로번호) : C\u001b[39;00m\n\u001b[1;32m---> 20\u001b[0m move \u001b[38;5;241m=\u001b[39m \u001b[43mpd\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmerge\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmove\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mrecent_unix\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhow\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mleft\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mon\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43minter_no\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[0;32m 21\u001b[0m move[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mend_unix\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;241m=\u001b[39m move[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mend_unix\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;241m.\u001b[39mfillna(\u001b[38;5;241m0\u001b[39m)\u001b[38;5;241m.\u001b[39mastype(\u001b[38;5;28mint\u001b[39m)\n\u001b[0;32m 22\u001b[0m \u001b[38;5;66;03m# # 4. C데이터 프레임에 신규 컬럼(시작 유닉스타임) 생성 후 종료유닉스 타임 값 입력, 종료 유닉스 타임 컬럼 제거\u001b[39;00m\n",
"File \u001b[1;32mc:\\github\\siggen\\siggen_env\\Lib\\site-packages\\pandas\\core\\reshape\\merge.py:152\u001b[0m, in \u001b[0;36mmerge\u001b[1;34m(left, right, how, on, left_on, right_on, left_index, right_index, sort, suffixes, copy, indicator, validate)\u001b[0m\n\u001b[0;32m 135\u001b[0m \u001b[38;5;129m@Substitution\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124mleft : DataFrame or named Series\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m 136\u001b[0m \u001b[38;5;129m@Appender\u001b[39m(_merge_doc, indents\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m0\u001b[39m)\n\u001b[0;32m 137\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mmerge\u001b[39m(\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 150\u001b[0m validate: \u001b[38;5;28mstr\u001b[39m \u001b[38;5;241m|\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[0;32m 151\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m DataFrame:\n\u001b[1;32m--> 152\u001b[0m left_df \u001b[38;5;241m=\u001b[39m \u001b[43m_validate_operand\u001b[49m\u001b[43m(\u001b[49m\u001b[43mleft\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 153\u001b[0m right_df \u001b[38;5;241m=\u001b[39m _validate_operand(right)\n\u001b[0;32m 154\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m how \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcross\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n",
"File \u001b[1;32mc:\\github\\siggen\\siggen_env\\Lib\\site-packages\\pandas\\core\\reshape\\merge.py:2689\u001b[0m, in \u001b[0;36m_validate_operand\u001b[1;34m(obj)\u001b[0m\n\u001b[0;32m 2687\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(obj, ABCSeries):\n\u001b[0;32m 2688\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m obj\u001b[38;5;241m.\u001b[39mname \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m-> 2689\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCannot merge a Series without a name\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m 2690\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m obj\u001b[38;5;241m.\u001b[39mto_frame()\n\u001b[0;32m 2691\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n",
"\u001b[1;31mValueError\u001b[0m: Cannot merge a Series without a name"
] ]
} }
], ],
"source": [ "source": [
"fsec = fsecs[-1]\n",
"fsec = fsecs[5]\n",
"# 1. 상태 테이블 조회해서 전체 데이터중 필요데이터(교차로번호, A링 현시번호, A링 이동류번호, B링 현시번호, B링 이동류번호)만 수집 : A\n", "# 1. 상태 테이블 조회해서 전체 데이터중 필요데이터(교차로번호, A링 현시번호, A링 이동류번호, B링 현시번호, B링 이동류번호)만 수집 : A\n",
"moves = [group.iloc[-1] for _, group in phases[phases.start_unix < fsec].groupby('inter_no')]\n", "moves = [group.iloc[-1] for _, group in phases[phases.start_unix < fsec].groupby('inter_no')]\n",
"if not moves:\n", "if not moves:\n",
" pass\n",
" move = pd.DataFrame({\n",
" 'start_unix':[], 'inter_no':[], 'phas_A':[], 'phas_B':[],\n",
" 'STOS_NO':[], 'move_A':[], 'move_B':[]})\n",
"else:\n", "else:\n",
" move = pd.concat(moves)\n", " move = pd.concat(moves)\n",
"# # 2. 이력 테이블 조회해서 교차로별로 유닉스시간 최대인 데이터(교차로번호, 종료유닉스타임)만 수집 : B\n",
"# recent_histories = [group.iloc[-1:] for _, group in self.history[self.history['end_unix'] < fsec].groupby('inter_no')] # 교차로별로 유닉스시간이 최대인 행들\n",
"move = move.drop(columns='start_unix')\n",
"# 2. 이력 테이블 조회해서 교차로별로 유닉스시간 최대인 데이터(교차로번호, 종료유닉스타임)만 수집 : B\n",
"recent_histories = [group.iloc[-1:] for _, group in self.history[self.history['end_unix'] < fsec].groupby('inter_no')] # 교차로별로 유닉스시간이 최대인 행들\n",
"\n", "\n",
"# if not recent_histories:\n",
"# rhistory = pd.DataFrame({'inter_no':[], 'end_unix':[]}) # recent history\n",
"# else:\n",
"# rhistory = pd.concat(recent_histories)\n",
"# recent_unix = rhistory[['inter_no', 'end_unix']]\n",
"move"
"if not recent_histories:\n",
" rhistory = pd.DataFrame({'inter_no':[], 'end_unix':[]}) # recent history\n",
"else:\n",
" rhistory = pd.concat(recent_histories)\n",
"recent_unix = rhistory[['inter_no', 'end_unix']]\n",
"# 3. 상태 테이블 조회정보(A)와 이력 테이블 조회정보(B) 조인(키값 : 교차로번호) : C\n",
"move = pd.merge(move, recent_unix, how='left', on='inter_no')\n",
"move['end_unix'] = move['end_unix'].fillna(0).astype(int)\n",
"# # 4. C데이터 프레임에 신규 컬럼(시작 유닉스타임) 생성 후 종료유닉스 타임 값 입력, 종료 유닉스 타임 컬럼 제거\n",
"move = move.rename(columns = {'end_unix':'start_unix'})\n",
"# 5. 이동류 이력정보 READ\n",
"# - CSV 파일로 서버에 저장된 이동류정보를 읽어옴(파일이 없는 경우에는 데이터가 없는 프레임 D 생성)\n",
"try:\n",
" movement # movement가 존재할 경우 그걸 그대로 씀.\n",
"except NameError: # movement가 존재하지 않는 경우 생성\n",
" movement = pd.DataFrame()\n",
"# 6. 이동류 이력정보 데이터테이블(D)에 C데이터 add\n",
"movement = pd.concat([movement, move])\n",
"# 7. D데이터 프레임에서 중복데이터 제거(교차로번호, 시작 유닉스타임, A링 현시번호, B링 현시번호 같은 행은 제거)\n",
"movement = movement.drop_duplicates(['inter_no','phas_A','phas_B','start_unix'])\n",
"# 8. D데이터 보관 시간 기준시간을 시작 유닉스 타임의 최대값 - self.subtractor // 2을 값으로 산출하고, 보관 시간 기준시간보다 작은 시작 유닉스 타임을 가진 행은 모두 제거(1시간 데이터만 보관)\n",
"movement = movement[movement.start_unix > fsec - self.subtractor // 2]\n",
"movement\n"
]
},
{
"cell_type": "code",
"execution_count": 7,
"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>start_unix</th>\n",
" <th>inter_no</th>\n",
" <th>phas_A</th>\n",
" <th>phas_B</th>\n",
" <th>STOS_NO</th>\n",
" <th>move_A</th>\n",
" <th>move_B</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1722416326</td>\n",
" <td>436</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>8</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1722416326</td>\n",
" <td>437</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>8</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1722416326</td>\n",
" <td>438</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>6</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1722416326</td>\n",
" <td>442</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>6</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1722416326</td>\n",
" <td>443</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>6</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11095</th>\n",
" <td>1722417443</td>\n",
" <td>444</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>-1</td>\n",
" <td>-1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11096</th>\n",
" <td>1722417443</td>\n",
" <td>455</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>-1</td>\n",
" <td>-1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11097</th>\n",
" <td>1722417443</td>\n",
" <td>456</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>0</td>\n",
" <td>17</td>\n",
" <td>-1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11098</th>\n",
" <td>1722417443</td>\n",
" <td>457</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>17</td>\n",
" <td>17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11099</th>\n",
" <td>1722417443</td>\n",
" <td>458</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>17</td>\n",
" <td>17</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>11100 rows × 7 columns</p>\n",
"</div>"
],
"text/plain": [
" start_unix inter_no phas_A phas_B STOS_NO move_A move_B\n",
"0 1722416326 436 2 2 0 8 3\n",
"1 1722416326 437 3 3 0 8 3\n",
"2 1722416326 438 1 1 0 6 2\n",
"3 1722416326 442 1 1 0 6 1\n",
"4 1722416326 443 1 1 0 6 2\n",
"... ... ... ... ... ... ... ...\n",
"11095 1722417443 444 4 4 0 -1 -1\n",
"11096 1722417443 455 2 2 0 -1 -1\n",
"11097 1722417443 456 4 4 0 17 -1\n",
"11098 1722417443 457 3 3 0 17 17\n",
"11099 1722417443 458 2 2 0 17 17\n",
"\n",
"[11100 rows x 7 columns]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"phases"
] ]
}, },
{ {

Loading…
Cancel
Save