Skip to content

Commit

Permalink
various testing in IPYNB
Browse files Browse the repository at this point in the history
  • Loading branch information
ronylpatil committed Sep 16, 2024
1 parent e542888 commit 4bbf5c5
Showing 1 changed file with 213 additions and 18 deletions.
231 changes: 213 additions & 18 deletions notebooks/preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
"source": [
"<font color = 'orange'>\n",
"\n",
"#### <b> Orer_Date\n",
"#### <b> Order_Date\n",
"\n",
"- change data type\n"
]
Expand Down Expand Up @@ -3975,7 +3975,7 @@
},
{
"cell_type": "code",
"execution_count": 65,
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -3984,10 +3984,219 @@
"\n",
"pd.set_option('display.max_columns', None)\n",
"\n",
"train_df = pd.read_csv(f\"{pathlib.Path().absolute().parent.as_posix()}/data/processed/train.csv\")\n",
"test_df = pd.read_csv(f\"{pathlib.Path().absolute().parent.as_posix()}/data/processed/test.csv\")"
"train_df = pd.read_csv(f\"{pathlib.Path().absolute().parent.as_posix()}/data/processed/processed_train.csv\")\n",
"test_df = pd.read_csv(f\"{pathlib.Path().absolute().parent.as_posix()}/data/processed/processed_test.csv\")"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(8714, 18)"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"test_df.shape"
]
},
{
"cell_type": "code",
"execution_count": 27,
"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>0</th>\n",
" <th>index</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>int64</td>\n",
" <td>Age</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>float64</td>\n",
" <td>Ratings</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>int64</td>\n",
" <td>Weatherconditions</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>int64</td>\n",
" <td>Road_traffic_density</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>int64</td>\n",
" <td>Vehicle_condition</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>int64</td>\n",
" <td>Type_of_order</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>int64</td>\n",
" <td>Type_of_vehicle</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>int64</td>\n",
" <td>multiple_deliveries</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>int64</td>\n",
" <td>Festival</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>int64</td>\n",
" <td>City</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>int64</td>\n",
" <td>Time_taken(min)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>float64</td>\n",
" <td>haversine_dist</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>float64</td>\n",
" <td>estm_time</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>float64</td>\n",
" <td>time_lag</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>float64</td>\n",
" <td>hour</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>int64</td>\n",
" <td>day</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>int64</td>\n",
" <td>is_weekend</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>int64</td>\n",
" <td>is_rush</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 0 index\n",
"0 int64 Age\n",
"1 float64 Ratings\n",
"2 int64 Weatherconditions\n",
"3 int64 Road_traffic_density\n",
"4 int64 Vehicle_condition\n",
"5 int64 Type_of_order\n",
"6 int64 Type_of_vehicle\n",
"7 int64 multiple_deliveries\n",
"8 int64 Festival\n",
"9 int64 City\n",
"10 int64 Time_taken(min)\n",
"11 float64 haversine_dist\n",
"12 float64 estm_time\n",
"13 float64 time_lag\n",
"14 float64 hour\n",
"15 int64 day\n",
"16 int64 is_weekend\n",
"17 int64 is_rush"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pd.DataFrame(train_df.dtypes).reset_index().iloc[:, [1,0]]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"'int64',\t'Age'\n",
"'float64',\t'Ratings'\n",
"'int64',\t'Weatherconditions'\n",
"'int64',\t'Road_traffic_density'\n",
"'int64',\t'Vehicle_condition'\n",
"'int64',\t'Type_of_order'\n",
"'int64',\t'Type_of_vehicle'\n",
"'float64',\t'multiple_deliveries'\n",
"'int64',\t'Festival'\n",
"'int64',\t'City'\n",
"'int64',\t'Time_taken(min)'\n",
"'float64',\t'haversine_dist'\n",
"'float64',\t'estm_time'\n",
"'float64',\t'time_lag'\n",
"'float64',\t'hour'\n",
"'int64',\t'day'\n",
"'int64',\t'is_weekend'\n",
"'int64',\t'is_rush'"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 57,
Expand Down Expand Up @@ -4215,20 +4424,6 @@
"train_df.dtypes"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 2,
Expand Down

0 comments on commit 4bbf5c5

Please sign in to comment.