|
|
|
@ -2708,9 +2708,188 @@
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": null,
|
|
|
|
|
"execution_count": 44,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"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>link_ID</th>\n",
|
|
|
|
|
" <th>time_interval_begin</th>\n",
|
|
|
|
|
" <th>date</th>\n",
|
|
|
|
|
" <th>travel_time</th>\n",
|
|
|
|
|
" <th>travel_time2</th>\n",
|
|
|
|
|
" <th>date_trend</th>\n",
|
|
|
|
|
" <th>minute_trend</th>\n",
|
|
|
|
|
" <th>length</th>\n",
|
|
|
|
|
" <th>width</th>\n",
|
|
|
|
|
" <th>link_num</th>\n",
|
|
|
|
|
" <th>area</th>\n",
|
|
|
|
|
" <th>vacation</th>\n",
|
|
|
|
|
" <th>minute</th>\n",
|
|
|
|
|
" <th>hour</th>\n",
|
|
|
|
|
" <th>day</th>\n",
|
|
|
|
|
" <th>week_day</th>\n",
|
|
|
|
|
" <th>mouth</th>\n",
|
|
|
|
|
" <th>link_ID_en</th>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </thead>\n",
|
|
|
|
|
" <tbody>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>0</th>\n",
|
|
|
|
|
" <td>3377906280028510514</td>\n",
|
|
|
|
|
" <td>2017-03-01 06:00:00</td>\n",
|
|
|
|
|
" <td>2017-03-01</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>1.960745</td>\n",
|
|
|
|
|
" <td>-0.252121</td>\n",
|
|
|
|
|
" <td>48</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>2</td>\n",
|
|
|
|
|
" <td>144</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>0</td>\n",
|
|
|
|
|
" <td>6</td>\n",
|
|
|
|
|
" <td>1</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>75</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>1</th>\n",
|
|
|
|
|
" <td>3377906280028510514</td>\n",
|
|
|
|
|
" <td>2017-03-01 06:02:00</td>\n",
|
|
|
|
|
" <td>2017-03-01</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>1.960745</td>\n",
|
|
|
|
|
" <td>-0.246743</td>\n",
|
|
|
|
|
" <td>48</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>2</td>\n",
|
|
|
|
|
" <td>144</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>2</td>\n",
|
|
|
|
|
" <td>6</td>\n",
|
|
|
|
|
" <td>1</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>75</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>2</th>\n",
|
|
|
|
|
" <td>3377906280028510514</td>\n",
|
|
|
|
|
" <td>2017-03-01 06:04:00</td>\n",
|
|
|
|
|
" <td>2017-03-01</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>1.960745</td>\n",
|
|
|
|
|
" <td>-0.241428</td>\n",
|
|
|
|
|
" <td>48</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>2</td>\n",
|
|
|
|
|
" <td>144</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>4</td>\n",
|
|
|
|
|
" <td>6</td>\n",
|
|
|
|
|
" <td>1</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>75</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>3</th>\n",
|
|
|
|
|
" <td>3377906280028510514</td>\n",
|
|
|
|
|
" <td>2017-03-01 06:06:00</td>\n",
|
|
|
|
|
" <td>2017-03-01</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>1.960745</td>\n",
|
|
|
|
|
" <td>-0.236176</td>\n",
|
|
|
|
|
" <td>48</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>2</td>\n",
|
|
|
|
|
" <td>144</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>6</td>\n",
|
|
|
|
|
" <td>6</td>\n",
|
|
|
|
|
" <td>1</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>75</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" <tr>\n",
|
|
|
|
|
" <th>4</th>\n",
|
|
|
|
|
" <td>3377906280028510514</td>\n",
|
|
|
|
|
" <td>2017-03-01 06:08:00</td>\n",
|
|
|
|
|
" <td>2017-03-01</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>NaN</td>\n",
|
|
|
|
|
" <td>1.960745</td>\n",
|
|
|
|
|
" <td>-0.230986</td>\n",
|
|
|
|
|
" <td>48</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>2</td>\n",
|
|
|
|
|
" <td>144</td>\n",
|
|
|
|
|
" <td>0.0</td>\n",
|
|
|
|
|
" <td>8</td>\n",
|
|
|
|
|
" <td>6</td>\n",
|
|
|
|
|
" <td>1</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>3</td>\n",
|
|
|
|
|
" <td>75</td>\n",
|
|
|
|
|
" </tr>\n",
|
|
|
|
|
" </tbody>\n",
|
|
|
|
|
"</table>\n",
|
|
|
|
|
"</div>"
|
|
|
|
|
],
|
|
|
|
|
"text/plain": [
|
|
|
|
|
" link_ID time_interval_begin date travel_time \\\n",
|
|
|
|
|
"0 3377906280028510514 2017-03-01 06:00:00 2017-03-01 NaN \n",
|
|
|
|
|
"1 3377906280028510514 2017-03-01 06:02:00 2017-03-01 NaN \n",
|
|
|
|
|
"2 3377906280028510514 2017-03-01 06:04:00 2017-03-01 NaN \n",
|
|
|
|
|
"3 3377906280028510514 2017-03-01 06:06:00 2017-03-01 NaN \n",
|
|
|
|
|
"4 3377906280028510514 2017-03-01 06:08:00 2017-03-01 NaN \n",
|
|
|
|
|
"\n",
|
|
|
|
|
" travel_time2 date_trend minute_trend length width link_num area \\\n",
|
|
|
|
|
"0 NaN 1.960745 -0.252121 48 3 2 144 \n",
|
|
|
|
|
"1 NaN 1.960745 -0.246743 48 3 2 144 \n",
|
|
|
|
|
"2 NaN 1.960745 -0.241428 48 3 2 144 \n",
|
|
|
|
|
"3 NaN 1.960745 -0.236176 48 3 2 144 \n",
|
|
|
|
|
"4 NaN 1.960745 -0.230986 48 3 2 144 \n",
|
|
|
|
|
"\n",
|
|
|
|
|
" vacation minute hour day week_day mouth link_ID_en \n",
|
|
|
|
|
"0 0.0 0 6 1 3 3 75 \n",
|
|
|
|
|
"1 0.0 2 6 1 3 3 75 \n",
|
|
|
|
|
"2 0.0 4 6 1 3 3 75 \n",
|
|
|
|
|
"3 0.0 6 6 1 3 3 75 \n",
|
|
|
|
|
"4 0.0 8 6 1 3 3 75 "
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"execution_count": 44,
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"output_type": "execute_result"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"# 通行时间长的编号大\n",
|
|
|
|
|
"sorted_link = np.sort(df['link_ID_en'].unique())\n",
|
|
|
|
|