Datasets:
ArXiv:
DOI:
License:
Yiran Wang
commited on
Commit
·
6067878
1
Parent(s):
ba37a6c
polish pandas buggy and fixed versions
Browse files- benchmark/pandas_1/pandas_1_fixed.ipynb +0 -0
- benchmark/pandas_1/pandas_1_reproduced.ipynb +0 -0
- benchmark/pandas_10/pandas_10_fixed.ipynb +42 -428
- benchmark/pandas_10/pandas_10_reproduced.ipynb +45 -470
- benchmark/pandas_11/pandas_11_fixed.ipynb +140 -143
- benchmark/pandas_11/pandas_11_reproduced.ipynb +12 -265
- benchmark/pandas_12/pandas_12_fixed.ipynb +523 -729
- benchmark/pandas_12/pandas_12_reproduced.ipynb +21 -227
- benchmark/pandas_13/pandas_13_fixed.ipynb +24 -280
- benchmark/pandas_13/pandas_13_reproduced.ipynb +25 -281
- benchmark/pandas_14/pandas_14_fixed.ipynb +23 -405
- benchmark/pandas_14/pandas_14_reproduced.ipynb +24 -406
- benchmark/pandas_15/pandas_15_fixed.ipynb +22 -656
- benchmark/pandas_15/pandas_15_reproduced.ipynb +23 -657
- benchmark/pandas_2/pandas_2_fixed.ipynb +5 -394
- benchmark/pandas_2/pandas_2_reproduced.ipynb +6 -395
- benchmark/pandas_3/pandas_3_reproduced.ipynb +5 -5
- benchmark/pandas_4/pandas_4_fixed.ipynb +12 -194
- benchmark/pandas_4/pandas_4_reproduced.ipynb +13 -195
- benchmark/pandas_5/pandas_5_fixed.ipynb +29 -723
- benchmark/pandas_5/pandas_5_reproduced.ipynb +30 -724
- benchmark/pandas_6/pandas_6_fixed.ipynb +19 -258
- benchmark/pandas_6/pandas_6_reproduced.ipynb +10 -64
- benchmark/pandas_7/pandas_7_fixed.ipynb +8 -76
- benchmark/pandas_7/pandas_7_reproduced.ipynb +8 -77
- benchmark/pandas_8/pandas_8_fixed.ipynb +14 -259
- benchmark/pandas_8/pandas_8_reproduced.ipynb +0 -0
- benchmark/pandas_9/pandas_9_fixed.ipynb +7 -504
- benchmark/pandas_9/pandas_9_reproduced.ipynb +6 -260
benchmark/pandas_1/pandas_1_fixed.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
benchmark/pandas_1/pandas_1_reproduced.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
benchmark/pandas_10/pandas_10_fixed.ipynb
CHANGED
|
@@ -68,7 +68,7 @@
|
|
| 68 |
},
|
| 69 |
{
|
| 70 |
"cell_type": "code",
|
| 71 |
-
"execution_count":
|
| 72 |
"metadata": {
|
| 73 |
"execution": {
|
| 74 |
"iopub.execute_input": "2023-10-22T12:44:58.372979Z",
|
|
@@ -78,163 +78,14 @@
|
|
| 78 |
"shell.execute_reply.started": "2023-10-22T12:44:58.372945Z"
|
| 79 |
}
|
| 80 |
},
|
| 81 |
-
"outputs": [
|
| 82 |
-
{
|
| 83 |
-
"data": {
|
| 84 |
-
"text/html": [
|
| 85 |
-
"<div>\n",
|
| 86 |
-
"<style scoped>\n",
|
| 87 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 88 |
-
" vertical-align: middle;\n",
|
| 89 |
-
" }\n",
|
| 90 |
-
"\n",
|
| 91 |
-
" .dataframe tbody tr th {\n",
|
| 92 |
-
" vertical-align: top;\n",
|
| 93 |
-
" }\n",
|
| 94 |
-
"\n",
|
| 95 |
-
" .dataframe thead th {\n",
|
| 96 |
-
" text-align: right;\n",
|
| 97 |
-
" }\n",
|
| 98 |
-
"</style>\n",
|
| 99 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 100 |
-
" <thead>\n",
|
| 101 |
-
" <tr style=\"text-align: right;\">\n",
|
| 102 |
-
" <th></th>\n",
|
| 103 |
-
" <th>App</th>\n",
|
| 104 |
-
" <th>Category</th>\n",
|
| 105 |
-
" <th>Rating</th>\n",
|
| 106 |
-
" <th>Reviews</th>\n",
|
| 107 |
-
" <th>Size</th>\n",
|
| 108 |
-
" <th>Installs</th>\n",
|
| 109 |
-
" <th>Type</th>\n",
|
| 110 |
-
" <th>Price</th>\n",
|
| 111 |
-
" <th>Content Rating</th>\n",
|
| 112 |
-
" <th>Genres</th>\n",
|
| 113 |
-
" <th>Last Updated</th>\n",
|
| 114 |
-
" <th>Current Ver</th>\n",
|
| 115 |
-
" <th>Android Ver</th>\n",
|
| 116 |
-
" </tr>\n",
|
| 117 |
-
" </thead>\n",
|
| 118 |
-
" <tbody>\n",
|
| 119 |
-
" <tr>\n",
|
| 120 |
-
" <th>0</th>\n",
|
| 121 |
-
" <td>Photo Editor & Candy Camera & Grid & ScrapBook</td>\n",
|
| 122 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 123 |
-
" <td>4.1</td>\n",
|
| 124 |
-
" <td>159</td>\n",
|
| 125 |
-
" <td>19M</td>\n",
|
| 126 |
-
" <td>10,000+</td>\n",
|
| 127 |
-
" <td>Free</td>\n",
|
| 128 |
-
" <td>0</td>\n",
|
| 129 |
-
" <td>Everyone</td>\n",
|
| 130 |
-
" <td>Art & Design</td>\n",
|
| 131 |
-
" <td>7-Jan-18</td>\n",
|
| 132 |
-
" <td>1.0.0</td>\n",
|
| 133 |
-
" <td>4.0.3 and up</td>\n",
|
| 134 |
-
" </tr>\n",
|
| 135 |
-
" <tr>\n",
|
| 136 |
-
" <th>1</th>\n",
|
| 137 |
-
" <td>Coloring book moana</td>\n",
|
| 138 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 139 |
-
" <td>3.9</td>\n",
|
| 140 |
-
" <td>967</td>\n",
|
| 141 |
-
" <td>14M</td>\n",
|
| 142 |
-
" <td>500,000+</td>\n",
|
| 143 |
-
" <td>Free</td>\n",
|
| 144 |
-
" <td>0</td>\n",
|
| 145 |
-
" <td>Everyone</td>\n",
|
| 146 |
-
" <td>Art & Design;Pretend Play</td>\n",
|
| 147 |
-
" <td>15-Jan-18</td>\n",
|
| 148 |
-
" <td>2.0.0</td>\n",
|
| 149 |
-
" <td>4.0.3 and up</td>\n",
|
| 150 |
-
" </tr>\n",
|
| 151 |
-
" <tr>\n",
|
| 152 |
-
" <th>2</th>\n",
|
| 153 |
-
" <td>U Launcher Lite – FREE Live Cool Themes, Hide ...</td>\n",
|
| 154 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 155 |
-
" <td>4.7</td>\n",
|
| 156 |
-
" <td>87510</td>\n",
|
| 157 |
-
" <td>8.7M</td>\n",
|
| 158 |
-
" <td>5,000,000+</td>\n",
|
| 159 |
-
" <td>Free</td>\n",
|
| 160 |
-
" <td>0</td>\n",
|
| 161 |
-
" <td>Everyone</td>\n",
|
| 162 |
-
" <td>Art & Design</td>\n",
|
| 163 |
-
" <td>1-Aug-18</td>\n",
|
| 164 |
-
" <td>1.2.4</td>\n",
|
| 165 |
-
" <td>4.0.3 and up</td>\n",
|
| 166 |
-
" </tr>\n",
|
| 167 |
-
" <tr>\n",
|
| 168 |
-
" <th>3</th>\n",
|
| 169 |
-
" <td>Sketch - Draw & Paint</td>\n",
|
| 170 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 171 |
-
" <td>4.5</td>\n",
|
| 172 |
-
" <td>215644</td>\n",
|
| 173 |
-
" <td>25M</td>\n",
|
| 174 |
-
" <td>50,000,000+</td>\n",
|
| 175 |
-
" <td>Free</td>\n",
|
| 176 |
-
" <td>0</td>\n",
|
| 177 |
-
" <td>Teen</td>\n",
|
| 178 |
-
" <td>Art & Design</td>\n",
|
| 179 |
-
" <td>8-Jun-18</td>\n",
|
| 180 |
-
" <td>Varies with device</td>\n",
|
| 181 |
-
" <td>4.2 and up</td>\n",
|
| 182 |
-
" </tr>\n",
|
| 183 |
-
" <tr>\n",
|
| 184 |
-
" <th>4</th>\n",
|
| 185 |
-
" <td>Pixel Draw - Number Art Coloring Book</td>\n",
|
| 186 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 187 |
-
" <td>4.3</td>\n",
|
| 188 |
-
" <td>967</td>\n",
|
| 189 |
-
" <td>2.8M</td>\n",
|
| 190 |
-
" <td>100,000+</td>\n",
|
| 191 |
-
" <td>Free</td>\n",
|
| 192 |
-
" <td>0</td>\n",
|
| 193 |
-
" <td>Everyone</td>\n",
|
| 194 |
-
" <td>Art & Design;Creativity</td>\n",
|
| 195 |
-
" <td>20-Jun-18</td>\n",
|
| 196 |
-
" <td>1.1</td>\n",
|
| 197 |
-
" <td>4.4 and up</td>\n",
|
| 198 |
-
" </tr>\n",
|
| 199 |
-
" </tbody>\n",
|
| 200 |
-
"</table>\n",
|
| 201 |
-
"</div>"
|
| 202 |
-
],
|
| 203 |
-
"text/plain": [
|
| 204 |
-
" App Category Rating \\\n",
|
| 205 |
-
"0 Photo Editor & Candy Camera & Grid & ScrapBook ART_AND_DESIGN 4.1 \n",
|
| 206 |
-
"1 Coloring book moana ART_AND_DESIGN 3.9 \n",
|
| 207 |
-
"2 U Launcher Lite – FREE Live Cool Themes, Hide ... ART_AND_DESIGN 4.7 \n",
|
| 208 |
-
"3 Sketch - Draw & Paint ART_AND_DESIGN 4.5 \n",
|
| 209 |
-
"4 Pixel Draw - Number Art Coloring Book ART_AND_DESIGN 4.3 \n",
|
| 210 |
-
"\n",
|
| 211 |
-
" Reviews Size Installs Type Price Content Rating \\\n",
|
| 212 |
-
"0 159 19M 10,000+ Free 0 Everyone \n",
|
| 213 |
-
"1 967 14M 500,000+ Free 0 Everyone \n",
|
| 214 |
-
"2 87510 8.7M 5,000,000+ Free 0 Everyone \n",
|
| 215 |
-
"3 215644 25M 50,000,000+ Free 0 Teen \n",
|
| 216 |
-
"4 967 2.8M 100,000+ Free 0 Everyone \n",
|
| 217 |
-
"\n",
|
| 218 |
-
" Genres Last Updated Current Ver Android Ver \n",
|
| 219 |
-
"0 Art & Design 7-Jan-18 1.0.0 4.0.3 and up \n",
|
| 220 |
-
"1 Art & Design;Pretend Play 15-Jan-18 2.0.0 4.0.3 and up \n",
|
| 221 |
-
"2 Art & Design 1-Aug-18 1.2.4 4.0.3 and up \n",
|
| 222 |
-
"3 Art & Design 8-Jun-18 Varies with device 4.2 and up \n",
|
| 223 |
-
"4 Art & Design;Creativity 20-Jun-18 1.1 4.4 and up "
|
| 224 |
-
]
|
| 225 |
-
},
|
| 226 |
-
"execution_count": 3,
|
| 227 |
-
"metadata": {},
|
| 228 |
-
"output_type": "execute_result"
|
| 229 |
-
}
|
| 230 |
-
],
|
| 231 |
"source": [
|
| 232 |
"df.head()"
|
| 233 |
]
|
| 234 |
},
|
| 235 |
{
|
| 236 |
"cell_type": "code",
|
| 237 |
-
"execution_count":
|
| 238 |
"metadata": {
|
| 239 |
"execution": {
|
| 240 |
"iopub.execute_input": "2023-10-22T12:44:58.411513Z",
|
|
@@ -244,18 +95,7 @@
|
|
| 244 |
"shell.execute_reply.started": "2023-10-22T12:44:58.411466Z"
|
| 245 |
}
|
| 246 |
},
|
| 247 |
-
"outputs": [
|
| 248 |
-
{
|
| 249 |
-
"data": {
|
| 250 |
-
"text/plain": [
|
| 251 |
-
"(10841, 13)"
|
| 252 |
-
]
|
| 253 |
-
},
|
| 254 |
-
"execution_count": 4,
|
| 255 |
-
"metadata": {},
|
| 256 |
-
"output_type": "execute_result"
|
| 257 |
-
}
|
| 258 |
-
],
|
| 259 |
"source": [
|
| 260 |
"# print Rows and Col\n",
|
| 261 |
"df.shape"
|
|
@@ -263,7 +103,7 @@
|
|
| 263 |
},
|
| 264 |
{
|
| 265 |
"cell_type": "code",
|
| 266 |
-
"execution_count":
|
| 267 |
"metadata": {
|
| 268 |
"execution": {
|
| 269 |
"iopub.execute_input": "2023-10-22T12:44:58.424396Z",
|
|
@@ -273,34 +113,7 @@
|
|
| 273 |
"shell.execute_reply.started": "2023-10-22T12:44:58.424363Z"
|
| 274 |
}
|
| 275 |
},
|
| 276 |
-
"outputs": [
|
| 277 |
-
{
|
| 278 |
-
"name": "stdout",
|
| 279 |
-
"output_type": "stream",
|
| 280 |
-
"text": [
|
| 281 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 282 |
-
"RangeIndex: 10841 entries, 0 to 10840\n",
|
| 283 |
-
"Data columns (total 13 columns):\n",
|
| 284 |
-
" # Column Non-Null Count Dtype \n",
|
| 285 |
-
"--- ------ -------------- ----- \n",
|
| 286 |
-
" 0 App 10841 non-null object \n",
|
| 287 |
-
" 1 Category 10841 non-null object \n",
|
| 288 |
-
" 2 Rating 9367 non-null float64\n",
|
| 289 |
-
" 3 Reviews 10841 non-null object \n",
|
| 290 |
-
" 4 Size 10841 non-null object \n",
|
| 291 |
-
" 5 Installs 10841 non-null object \n",
|
| 292 |
-
" 6 Type 10840 non-null object \n",
|
| 293 |
-
" 7 Price 10841 non-null object \n",
|
| 294 |
-
" 8 Content Rating 10840 non-null object \n",
|
| 295 |
-
" 9 Genres 10841 non-null object \n",
|
| 296 |
-
" 10 Last Updated 10841 non-null object \n",
|
| 297 |
-
" 11 Current Ver 10833 non-null object \n",
|
| 298 |
-
" 12 Android Ver 10838 non-null object \n",
|
| 299 |
-
"dtypes: float64(1), object(12)\n",
|
| 300 |
-
"memory usage: 1.1+ MB\n"
|
| 301 |
-
]
|
| 302 |
-
}
|
| 303 |
-
],
|
| 304 |
"source": [
|
| 305 |
"# Information of Data\n",
|
| 306 |
"df.info()"
|
|
@@ -324,7 +137,7 @@
|
|
| 324 |
},
|
| 325 |
{
|
| 326 |
"cell_type": "code",
|
| 327 |
-
"execution_count":
|
| 328 |
"metadata": {
|
| 329 |
"execution": {
|
| 330 |
"iopub.execute_input": "2023-10-22T12:44:58.476239Z",
|
|
@@ -334,38 +147,14 @@
|
|
| 334 |
"shell.execute_reply.started": "2023-10-22T12:44:58.476193Z"
|
| 335 |
}
|
| 336 |
},
|
| 337 |
-
"outputs": [
|
| 338 |
-
{
|
| 339 |
-
"data": {
|
| 340 |
-
"text/plain": [
|
| 341 |
-
"App 0\n",
|
| 342 |
-
"Category 0\n",
|
| 343 |
-
"Rating 1474\n",
|
| 344 |
-
"Reviews 0\n",
|
| 345 |
-
"Size 0\n",
|
| 346 |
-
"Installs 0\n",
|
| 347 |
-
"Type 1\n",
|
| 348 |
-
"Price 0\n",
|
| 349 |
-
"Content Rating 1\n",
|
| 350 |
-
"Genres 0\n",
|
| 351 |
-
"Last Updated 0\n",
|
| 352 |
-
"Current Ver 8\n",
|
| 353 |
-
"Android Ver 3\n",
|
| 354 |
-
"dtype: int64"
|
| 355 |
-
]
|
| 356 |
-
},
|
| 357 |
-
"execution_count": 6,
|
| 358 |
-
"metadata": {},
|
| 359 |
-
"output_type": "execute_result"
|
| 360 |
-
}
|
| 361 |
-
],
|
| 362 |
"source": [
|
| 363 |
"df.isnull().sum()"
|
| 364 |
]
|
| 365 |
},
|
| 366 |
{
|
| 367 |
"cell_type": "code",
|
| 368 |
-
"execution_count":
|
| 369 |
"metadata": {
|
| 370 |
"execution": {
|
| 371 |
"iopub.execute_input": "2023-10-22T12:44:58.503907Z",
|
|
@@ -382,7 +171,7 @@
|
|
| 382 |
},
|
| 383 |
{
|
| 384 |
"cell_type": "code",
|
| 385 |
-
"execution_count":
|
| 386 |
"metadata": {
|
| 387 |
"execution": {
|
| 388 |
"iopub.execute_input": "2023-10-22T12:44:58.530211Z",
|
|
@@ -392,38 +181,14 @@
|
|
| 392 |
"shell.execute_reply.started": "2023-10-22T12:44:58.530124Z"
|
| 393 |
}
|
| 394 |
},
|
| 395 |
-
"outputs": [
|
| 396 |
-
{
|
| 397 |
-
"data": {
|
| 398 |
-
"text/plain": [
|
| 399 |
-
"App 0\n",
|
| 400 |
-
"Category 0\n",
|
| 401 |
-
"Rating 0\n",
|
| 402 |
-
"Reviews 0\n",
|
| 403 |
-
"Size 0\n",
|
| 404 |
-
"Installs 0\n",
|
| 405 |
-
"Type 0\n",
|
| 406 |
-
"Price 0\n",
|
| 407 |
-
"Content Rating 0\n",
|
| 408 |
-
"Genres 0\n",
|
| 409 |
-
"Last Updated 0\n",
|
| 410 |
-
"Current Ver 0\n",
|
| 411 |
-
"Android Ver 0\n",
|
| 412 |
-
"dtype: int64"
|
| 413 |
-
]
|
| 414 |
-
},
|
| 415 |
-
"execution_count": 8,
|
| 416 |
-
"metadata": {},
|
| 417 |
-
"output_type": "execute_result"
|
| 418 |
-
}
|
| 419 |
-
],
|
| 420 |
"source": [
|
| 421 |
"df.isnull().sum()"
|
| 422 |
]
|
| 423 |
},
|
| 424 |
{
|
| 425 |
"cell_type": "code",
|
| 426 |
-
"execution_count":
|
| 427 |
"metadata": {
|
| 428 |
"execution": {
|
| 429 |
"iopub.execute_input": "2023-10-22T12:44:58.556274Z",
|
|
@@ -433,31 +198,7 @@
|
|
| 433 |
"shell.execute_reply.started": "2023-10-22T12:44:58.556234Z"
|
| 434 |
}
|
| 435 |
},
|
| 436 |
-
"outputs": [
|
| 437 |
-
{
|
| 438 |
-
"data": {
|
| 439 |
-
"text/plain": [
|
| 440 |
-
"App object\n",
|
| 441 |
-
"Category object\n",
|
| 442 |
-
"Rating float64\n",
|
| 443 |
-
"Reviews object\n",
|
| 444 |
-
"Size object\n",
|
| 445 |
-
"Installs object\n",
|
| 446 |
-
"Type object\n",
|
| 447 |
-
"Price object\n",
|
| 448 |
-
"Content Rating object\n",
|
| 449 |
-
"Genres object\n",
|
| 450 |
-
"Last Updated object\n",
|
| 451 |
-
"Current Ver object\n",
|
| 452 |
-
"Android Ver object\n",
|
| 453 |
-
"dtype: object"
|
| 454 |
-
]
|
| 455 |
-
},
|
| 456 |
-
"execution_count": 9,
|
| 457 |
-
"metadata": {},
|
| 458 |
-
"output_type": "execute_result"
|
| 459 |
-
}
|
| 460 |
-
],
|
| 461 |
"source": [
|
| 462 |
"# Check Datatypes\n",
|
| 463 |
"df.dtypes"
|
|
@@ -472,7 +213,7 @@
|
|
| 472 |
},
|
| 473 |
{
|
| 474 |
"cell_type": "code",
|
| 475 |
-
"execution_count":
|
| 476 |
"metadata": {
|
| 477 |
"execution": {
|
| 478 |
"iopub.execute_input": "2023-10-22T12:44:58.568629Z",
|
|
@@ -489,7 +230,7 @@
|
|
| 489 |
},
|
| 490 |
{
|
| 491 |
"cell_type": "code",
|
| 492 |
-
"execution_count":
|
| 493 |
"metadata": {
|
| 494 |
"execution": {
|
| 495 |
"iopub.execute_input": "2023-10-22T12:44:58.584706Z",
|
|
@@ -499,38 +240,14 @@
|
|
| 499 |
"shell.execute_reply.started": "2023-10-22T12:44:58.584656Z"
|
| 500 |
}
|
| 501 |
},
|
| 502 |
-
"outputs": [
|
| 503 |
-
{
|
| 504 |
-
"data": {
|
| 505 |
-
"text/plain": [
|
| 506 |
-
"App object\n",
|
| 507 |
-
"Category object\n",
|
| 508 |
-
"Rating float64\n",
|
| 509 |
-
"Reviews int64\n",
|
| 510 |
-
"Size object\n",
|
| 511 |
-
"Installs object\n",
|
| 512 |
-
"Type object\n",
|
| 513 |
-
"Price object\n",
|
| 514 |
-
"Content Rating object\n",
|
| 515 |
-
"Genres object\n",
|
| 516 |
-
"Last Updated object\n",
|
| 517 |
-
"Current Ver object\n",
|
| 518 |
-
"Android Ver object\n",
|
| 519 |
-
"dtype: object"
|
| 520 |
-
]
|
| 521 |
-
},
|
| 522 |
-
"execution_count": 11,
|
| 523 |
-
"metadata": {},
|
| 524 |
-
"output_type": "execute_result"
|
| 525 |
-
}
|
| 526 |
-
],
|
| 527 |
"source": [
|
| 528 |
"df.dtypes"
|
| 529 |
]
|
| 530 |
},
|
| 531 |
{
|
| 532 |
"cell_type": "code",
|
| 533 |
-
"execution_count":
|
| 534 |
"metadata": {
|
| 535 |
"execution": {
|
| 536 |
"iopub.execute_input": "2023-10-22T12:44:58.607554Z",
|
|
@@ -542,12 +259,13 @@
|
|
| 542 |
},
|
| 543 |
"outputs": [],
|
| 544 |
"source": [
|
| 545 |
-
"# df['Installs']=df['Installs'].astype('int') # fix --- they fixed themselved in the following cells"
|
|
|
|
| 546 |
]
|
| 547 |
},
|
| 548 |
{
|
| 549 |
"cell_type": "code",
|
| 550 |
-
"execution_count":
|
| 551 |
"metadata": {
|
| 552 |
"execution": {
|
| 553 |
"iopub.execute_input": "2023-10-22T12:45:31.529064Z",
|
|
@@ -559,13 +277,13 @@
|
|
| 559 |
},
|
| 560 |
"outputs": [],
|
| 561 |
"source": [
|
| 562 |
-
"df['Installs']=df['Installs'].str.replace('+','')\n",
|
| 563 |
-
"df['Installs']=df['Installs'].str.replace(',','')"
|
| 564 |
]
|
| 565 |
},
|
| 566 |
{
|
| 567 |
"cell_type": "code",
|
| 568 |
-
"execution_count":
|
| 569 |
"metadata": {
|
| 570 |
"execution": {
|
| 571 |
"iopub.execute_input": "2023-10-22T12:45:34.207157Z",
|
|
@@ -577,12 +295,12 @@
|
|
| 577 |
},
|
| 578 |
"outputs": [],
|
| 579 |
"source": [
|
| 580 |
-
"df['Installs']=df['Installs'].astype('int')"
|
| 581 |
]
|
| 582 |
},
|
| 583 |
{
|
| 584 |
"cell_type": "code",
|
| 585 |
-
"execution_count":
|
| 586 |
"metadata": {
|
| 587 |
"execution": {
|
| 588 |
"iopub.execute_input": "2023-10-22T12:45:37.326177Z",
|
|
@@ -592,38 +310,14 @@
|
|
| 592 |
"shell.execute_reply.started": "2023-10-22T12:45:37.326147Z"
|
| 593 |
}
|
| 594 |
},
|
| 595 |
-
"outputs": [
|
| 596 |
-
{
|
| 597 |
-
"data": {
|
| 598 |
-
"text/plain": [
|
| 599 |
-
"App object\n",
|
| 600 |
-
"Category object\n",
|
| 601 |
-
"Rating float64\n",
|
| 602 |
-
"Reviews int64\n",
|
| 603 |
-
"Size object\n",
|
| 604 |
-
"Installs int64\n",
|
| 605 |
-
"Type object\n",
|
| 606 |
-
"Price object\n",
|
| 607 |
-
"Content Rating object\n",
|
| 608 |
-
"Genres object\n",
|
| 609 |
-
"Last Updated object\n",
|
| 610 |
-
"Current Ver object\n",
|
| 611 |
-
"Android Ver object\n",
|
| 612 |
-
"dtype: object"
|
| 613 |
-
]
|
| 614 |
-
},
|
| 615 |
-
"execution_count": 16,
|
| 616 |
-
"metadata": {},
|
| 617 |
-
"output_type": "execute_result"
|
| 618 |
-
}
|
| 619 |
-
],
|
| 620 |
"source": [
|
| 621 |
"df.dtypes"
|
| 622 |
]
|
| 623 |
},
|
| 624 |
{
|
| 625 |
"cell_type": "code",
|
| 626 |
-
"execution_count":
|
| 627 |
"metadata": {
|
| 628 |
"execution": {
|
| 629 |
"iopub.execute_input": "2023-10-22T12:45:40.288946Z",
|
|
@@ -635,12 +329,12 @@
|
|
| 635 |
},
|
| 636 |
"outputs": [],
|
| 637 |
"source": [
|
| 638 |
-
"# df['Price']=df['Price'].astype('float') # fix ---
|
| 639 |
]
|
| 640 |
},
|
| 641 |
{
|
| 642 |
"cell_type": "code",
|
| 643 |
-
"execution_count":
|
| 644 |
"metadata": {
|
| 645 |
"execution": {
|
| 646 |
"iopub.execute_input": "2023-10-22T12:45:45.746481Z",
|
|
@@ -657,7 +351,7 @@
|
|
| 657 |
},
|
| 658 |
{
|
| 659 |
"cell_type": "code",
|
| 660 |
-
"execution_count":
|
| 661 |
"metadata": {
|
| 662 |
"execution": {
|
| 663 |
"iopub.execute_input": "2023-10-22T12:45:48.333300Z",
|
|
@@ -674,7 +368,7 @@
|
|
| 674 |
},
|
| 675 |
{
|
| 676 |
"cell_type": "code",
|
| 677 |
-
"execution_count":
|
| 678 |
"metadata": {
|
| 679 |
"execution": {
|
| 680 |
"iopub.status.busy": "2023-10-22T12:45:00.128119Z",
|
|
@@ -683,38 +377,14 @@
|
|
| 683 |
"shell.execute_reply.started": "2023-10-22T12:45:00.128407Z"
|
| 684 |
}
|
| 685 |
},
|
| 686 |
-
"outputs": [
|
| 687 |
-
{
|
| 688 |
-
"data": {
|
| 689 |
-
"text/plain": [
|
| 690 |
-
"App object\n",
|
| 691 |
-
"Category object\n",
|
| 692 |
-
"Rating float64\n",
|
| 693 |
-
"Reviews int64\n",
|
| 694 |
-
"Size object\n",
|
| 695 |
-
"Installs int64\n",
|
| 696 |
-
"Type object\n",
|
| 697 |
-
"Price float64\n",
|
| 698 |
-
"Content Rating object\n",
|
| 699 |
-
"Genres object\n",
|
| 700 |
-
"Last Updated object\n",
|
| 701 |
-
"Current Ver object\n",
|
| 702 |
-
"Android Ver object\n",
|
| 703 |
-
"dtype: object"
|
| 704 |
-
]
|
| 705 |
-
},
|
| 706 |
-
"execution_count": 20,
|
| 707 |
-
"metadata": {},
|
| 708 |
-
"output_type": "execute_result"
|
| 709 |
-
}
|
| 710 |
-
],
|
| 711 |
"source": [
|
| 712 |
"df.dtypes"
|
| 713 |
]
|
| 714 |
},
|
| 715 |
{
|
| 716 |
"cell_type": "code",
|
| 717 |
-
"execution_count":
|
| 718 |
"metadata": {
|
| 719 |
"execution": {
|
| 720 |
"iopub.execute_input": "2023-10-22T12:45:51.282739Z",
|
|
@@ -726,12 +396,12 @@
|
|
| 726 |
},
|
| 727 |
"outputs": [],
|
| 728 |
"source": [
|
| 729 |
-
"# df['Size']=df['Size'].astype('float') # fix ---
|
| 730 |
]
|
| 731 |
},
|
| 732 |
{
|
| 733 |
"cell_type": "code",
|
| 734 |
-
"execution_count":
|
| 735 |
"metadata": {
|
| 736 |
"execution": {
|
| 737 |
"iopub.status.busy": "2023-10-22T12:45:00.134339Z",
|
|
@@ -740,37 +410,14 @@
|
|
| 740 |
"shell.execute_reply.started": "2023-10-22T12:45:00.135690Z"
|
| 741 |
}
|
| 742 |
},
|
| 743 |
-
"outputs": [
|
| 744 |
-
{
|
| 745 |
-
"data": {
|
| 746 |
-
"text/plain": [
|
| 747 |
-
"Size\n",
|
| 748 |
-
"Varies with device 1637\n",
|
| 749 |
-
"14M 165\n",
|
| 750 |
-
"12M 161\n",
|
| 751 |
-
"15M 159\n",
|
| 752 |
-
"11M 159\n",
|
| 753 |
-
" ... \n",
|
| 754 |
-
"383k 1\n",
|
| 755 |
-
"454k 1\n",
|
| 756 |
-
"812k 1\n",
|
| 757 |
-
"442k 1\n",
|
| 758 |
-
"619k 1\n",
|
| 759 |
-
"Name: count, Length: 413, dtype: int64"
|
| 760 |
-
]
|
| 761 |
-
},
|
| 762 |
-
"execution_count": 22,
|
| 763 |
-
"metadata": {},
|
| 764 |
-
"output_type": "execute_result"
|
| 765 |
-
}
|
| 766 |
-
],
|
| 767 |
"source": [
|
| 768 |
"df['Size'].value_counts()"
|
| 769 |
]
|
| 770 |
},
|
| 771 |
{
|
| 772 |
"cell_type": "code",
|
| 773 |
-
"execution_count":
|
| 774 |
"metadata": {
|
| 775 |
"execution": {
|
| 776 |
"iopub.execute_input": "2023-10-22T12:46:01.150574Z",
|
|
@@ -797,7 +444,7 @@
|
|
| 797 |
},
|
| 798 |
{
|
| 799 |
"cell_type": "code",
|
| 800 |
-
"execution_count":
|
| 801 |
"metadata": {
|
| 802 |
"execution": {
|
| 803 |
"iopub.execute_input": "2023-10-22T12:46:04.480910Z",
|
|
@@ -830,7 +477,7 @@
|
|
| 830 |
},
|
| 831 |
{
|
| 832 |
"cell_type": "code",
|
| 833 |
-
"execution_count":
|
| 834 |
"metadata": {
|
| 835 |
"execution": {
|
| 836 |
"iopub.execute_input": "2023-10-22T12:46:08.114585Z",
|
|
@@ -840,38 +487,14 @@
|
|
| 840 |
"shell.execute_reply.started": "2023-10-22T12:46:08.114556Z"
|
| 841 |
}
|
| 842 |
},
|
| 843 |
-
"outputs": [
|
| 844 |
-
{
|
| 845 |
-
"data": {
|
| 846 |
-
"text/plain": [
|
| 847 |
-
"App 0\n",
|
| 848 |
-
"Category 0\n",
|
| 849 |
-
"Rating 0\n",
|
| 850 |
-
"Reviews 0\n",
|
| 851 |
-
"Size 1637\n",
|
| 852 |
-
"Installs 0\n",
|
| 853 |
-
"Type 0\n",
|
| 854 |
-
"Price 0\n",
|
| 855 |
-
"Content Rating 0\n",
|
| 856 |
-
"Genres 0\n",
|
| 857 |
-
"Last Updated 0\n",
|
| 858 |
-
"Current Ver 0\n",
|
| 859 |
-
"Android Ver 0\n",
|
| 860 |
-
"dtype: int64"
|
| 861 |
-
]
|
| 862 |
-
},
|
| 863 |
-
"execution_count": 25,
|
| 864 |
-
"metadata": {},
|
| 865 |
-
"output_type": "execute_result"
|
| 866 |
-
}
|
| 867 |
-
],
|
| 868 |
"source": [
|
| 869 |
"df.isnull().sum()"
|
| 870 |
]
|
| 871 |
},
|
| 872 |
{
|
| 873 |
"cell_type": "code",
|
| 874 |
-
"execution_count":
|
| 875 |
"metadata": {
|
| 876 |
"execution": {
|
| 877 |
"iopub.execute_input": "2023-10-22T12:46:13.768815Z",
|
|
@@ -881,16 +504,7 @@
|
|
| 881 |
"shell.execute_reply.started": "2023-10-22T12:46:13.768781Z"
|
| 882 |
}
|
| 883 |
},
|
| 884 |
-
"outputs": [
|
| 885 |
-
{
|
| 886 |
-
"name": "stderr",
|
| 887 |
-
"output_type": "stream",
|
| 888 |
-
"text": [
|
| 889 |
-
"<ipython-input-26-3323fbc28fc2>:1: FutureWarning: Series.fillna with 'method' is deprecated and will raise in a future version. Use obj.ffill() or obj.bfill() instead.\n",
|
| 890 |
-
" df['Size'].fillna(method='ffill',inplace=True)\n"
|
| 891 |
-
]
|
| 892 |
-
}
|
| 893 |
-
],
|
| 894 |
"source": [
|
| 895 |
"df['Size'].fillna(method='ffill',inplace=True)"
|
| 896 |
]
|
|
|
|
| 68 |
},
|
| 69 |
{
|
| 70 |
"cell_type": "code",
|
| 71 |
+
"execution_count": null,
|
| 72 |
"metadata": {
|
| 73 |
"execution": {
|
| 74 |
"iopub.execute_input": "2023-10-22T12:44:58.372979Z",
|
|
|
|
| 78 |
"shell.execute_reply.started": "2023-10-22T12:44:58.372945Z"
|
| 79 |
}
|
| 80 |
},
|
| 81 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
"source": [
|
| 83 |
"df.head()"
|
| 84 |
]
|
| 85 |
},
|
| 86 |
{
|
| 87 |
"cell_type": "code",
|
| 88 |
+
"execution_count": null,
|
| 89 |
"metadata": {
|
| 90 |
"execution": {
|
| 91 |
"iopub.execute_input": "2023-10-22T12:44:58.411513Z",
|
|
|
|
| 95 |
"shell.execute_reply.started": "2023-10-22T12:44:58.411466Z"
|
| 96 |
}
|
| 97 |
},
|
| 98 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
"source": [
|
| 100 |
"# print Rows and Col\n",
|
| 101 |
"df.shape"
|
|
|
|
| 103 |
},
|
| 104 |
{
|
| 105 |
"cell_type": "code",
|
| 106 |
+
"execution_count": null,
|
| 107 |
"metadata": {
|
| 108 |
"execution": {
|
| 109 |
"iopub.execute_input": "2023-10-22T12:44:58.424396Z",
|
|
|
|
| 113 |
"shell.execute_reply.started": "2023-10-22T12:44:58.424363Z"
|
| 114 |
}
|
| 115 |
},
|
| 116 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
"source": [
|
| 118 |
"# Information of Data\n",
|
| 119 |
"df.info()"
|
|
|
|
| 137 |
},
|
| 138 |
{
|
| 139 |
"cell_type": "code",
|
| 140 |
+
"execution_count": null,
|
| 141 |
"metadata": {
|
| 142 |
"execution": {
|
| 143 |
"iopub.execute_input": "2023-10-22T12:44:58.476239Z",
|
|
|
|
| 147 |
"shell.execute_reply.started": "2023-10-22T12:44:58.476193Z"
|
| 148 |
}
|
| 149 |
},
|
| 150 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
"source": [
|
| 152 |
"df.isnull().sum()"
|
| 153 |
]
|
| 154 |
},
|
| 155 |
{
|
| 156 |
"cell_type": "code",
|
| 157 |
+
"execution_count": 3,
|
| 158 |
"metadata": {
|
| 159 |
"execution": {
|
| 160 |
"iopub.execute_input": "2023-10-22T12:44:58.503907Z",
|
|
|
|
| 171 |
},
|
| 172 |
{
|
| 173 |
"cell_type": "code",
|
| 174 |
+
"execution_count": null,
|
| 175 |
"metadata": {
|
| 176 |
"execution": {
|
| 177 |
"iopub.execute_input": "2023-10-22T12:44:58.530211Z",
|
|
|
|
| 181 |
"shell.execute_reply.started": "2023-10-22T12:44:58.530124Z"
|
| 182 |
}
|
| 183 |
},
|
| 184 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
"source": [
|
| 186 |
"df.isnull().sum()"
|
| 187 |
]
|
| 188 |
},
|
| 189 |
{
|
| 190 |
"cell_type": "code",
|
| 191 |
+
"execution_count": null,
|
| 192 |
"metadata": {
|
| 193 |
"execution": {
|
| 194 |
"iopub.execute_input": "2023-10-22T12:44:58.556274Z",
|
|
|
|
| 198 |
"shell.execute_reply.started": "2023-10-22T12:44:58.556234Z"
|
| 199 |
}
|
| 200 |
},
|
| 201 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
"source": [
|
| 203 |
"# Check Datatypes\n",
|
| 204 |
"df.dtypes"
|
|
|
|
| 213 |
},
|
| 214 |
{
|
| 215 |
"cell_type": "code",
|
| 216 |
+
"execution_count": 4,
|
| 217 |
"metadata": {
|
| 218 |
"execution": {
|
| 219 |
"iopub.execute_input": "2023-10-22T12:44:58.568629Z",
|
|
|
|
| 230 |
},
|
| 231 |
{
|
| 232 |
"cell_type": "code",
|
| 233 |
+
"execution_count": null,
|
| 234 |
"metadata": {
|
| 235 |
"execution": {
|
| 236 |
"iopub.execute_input": "2023-10-22T12:44:58.584706Z",
|
|
|
|
| 240 |
"shell.execute_reply.started": "2023-10-22T12:44:58.584656Z"
|
| 241 |
}
|
| 242 |
},
|
| 243 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
"source": [
|
| 245 |
"df.dtypes"
|
| 246 |
]
|
| 247 |
},
|
| 248 |
{
|
| 249 |
"cell_type": "code",
|
| 250 |
+
"execution_count": 5,
|
| 251 |
"metadata": {
|
| 252 |
"execution": {
|
| 253 |
"iopub.execute_input": "2023-10-22T12:44:58.607554Z",
|
|
|
|
| 259 |
},
|
| 260 |
"outputs": [],
|
| 261 |
"source": [
|
| 262 |
+
"# df['Installs']=df['Installs'].astype('int') # fix --- they fixed themselved in the following cells\n",
|
| 263 |
+
"df['Installs']=df['Installs'].str.replace('+','').str.replace(',','').astype('int')"
|
| 264 |
]
|
| 265 |
},
|
| 266 |
{
|
| 267 |
"cell_type": "code",
|
| 268 |
+
"execution_count": null,
|
| 269 |
"metadata": {
|
| 270 |
"execution": {
|
| 271 |
"iopub.execute_input": "2023-10-22T12:45:31.529064Z",
|
|
|
|
| 277 |
},
|
| 278 |
"outputs": [],
|
| 279 |
"source": [
|
| 280 |
+
"# df['Installs']=df['Installs'].str.replace('+','')\n",
|
| 281 |
+
"# df['Installs']=df['Installs'].str.replace(',','')"
|
| 282 |
]
|
| 283 |
},
|
| 284 |
{
|
| 285 |
"cell_type": "code",
|
| 286 |
+
"execution_count": null,
|
| 287 |
"metadata": {
|
| 288 |
"execution": {
|
| 289 |
"iopub.execute_input": "2023-10-22T12:45:34.207157Z",
|
|
|
|
| 295 |
},
|
| 296 |
"outputs": [],
|
| 297 |
"source": [
|
| 298 |
+
"# df['Installs']=df['Installs'].astype('int')"
|
| 299 |
]
|
| 300 |
},
|
| 301 |
{
|
| 302 |
"cell_type": "code",
|
| 303 |
+
"execution_count": null,
|
| 304 |
"metadata": {
|
| 305 |
"execution": {
|
| 306 |
"iopub.execute_input": "2023-10-22T12:45:37.326177Z",
|
|
|
|
| 310 |
"shell.execute_reply.started": "2023-10-22T12:45:37.326147Z"
|
| 311 |
}
|
| 312 |
},
|
| 313 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 314 |
"source": [
|
| 315 |
"df.dtypes"
|
| 316 |
]
|
| 317 |
},
|
| 318 |
{
|
| 319 |
"cell_type": "code",
|
| 320 |
+
"execution_count": null,
|
| 321 |
"metadata": {
|
| 322 |
"execution": {
|
| 323 |
"iopub.execute_input": "2023-10-22T12:45:40.288946Z",
|
|
|
|
| 329 |
},
|
| 330 |
"outputs": [],
|
| 331 |
"source": [
|
| 332 |
+
"# df['Price']=df['Price'].astype('float') # fix --- should be as in the following cells"
|
| 333 |
]
|
| 334 |
},
|
| 335 |
{
|
| 336 |
"cell_type": "code",
|
| 337 |
+
"execution_count": null,
|
| 338 |
"metadata": {
|
| 339 |
"execution": {
|
| 340 |
"iopub.execute_input": "2023-10-22T12:45:45.746481Z",
|
|
|
|
| 351 |
},
|
| 352 |
{
|
| 353 |
"cell_type": "code",
|
| 354 |
+
"execution_count": null,
|
| 355 |
"metadata": {
|
| 356 |
"execution": {
|
| 357 |
"iopub.execute_input": "2023-10-22T12:45:48.333300Z",
|
|
|
|
| 368 |
},
|
| 369 |
{
|
| 370 |
"cell_type": "code",
|
| 371 |
+
"execution_count": null,
|
| 372 |
"metadata": {
|
| 373 |
"execution": {
|
| 374 |
"iopub.status.busy": "2023-10-22T12:45:00.128119Z",
|
|
|
|
| 377 |
"shell.execute_reply.started": "2023-10-22T12:45:00.128407Z"
|
| 378 |
}
|
| 379 |
},
|
| 380 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 381 |
"source": [
|
| 382 |
"df.dtypes"
|
| 383 |
]
|
| 384 |
},
|
| 385 |
{
|
| 386 |
"cell_type": "code",
|
| 387 |
+
"execution_count": null,
|
| 388 |
"metadata": {
|
| 389 |
"execution": {
|
| 390 |
"iopub.execute_input": "2023-10-22T12:45:51.282739Z",
|
|
|
|
| 396 |
},
|
| 397 |
"outputs": [],
|
| 398 |
"source": [
|
| 399 |
+
"# df['Size']=df['Size'].astype('float') # fix --- should be as in the following cells"
|
| 400 |
]
|
| 401 |
},
|
| 402 |
{
|
| 403 |
"cell_type": "code",
|
| 404 |
+
"execution_count": null,
|
| 405 |
"metadata": {
|
| 406 |
"execution": {
|
| 407 |
"iopub.status.busy": "2023-10-22T12:45:00.134339Z",
|
|
|
|
| 410 |
"shell.execute_reply.started": "2023-10-22T12:45:00.135690Z"
|
| 411 |
}
|
| 412 |
},
|
| 413 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 414 |
"source": [
|
| 415 |
"df['Size'].value_counts()"
|
| 416 |
]
|
| 417 |
},
|
| 418 |
{
|
| 419 |
"cell_type": "code",
|
| 420 |
+
"execution_count": null,
|
| 421 |
"metadata": {
|
| 422 |
"execution": {
|
| 423 |
"iopub.execute_input": "2023-10-22T12:46:01.150574Z",
|
|
|
|
| 444 |
},
|
| 445 |
{
|
| 446 |
"cell_type": "code",
|
| 447 |
+
"execution_count": null,
|
| 448 |
"metadata": {
|
| 449 |
"execution": {
|
| 450 |
"iopub.execute_input": "2023-10-22T12:46:04.480910Z",
|
|
|
|
| 477 |
},
|
| 478 |
{
|
| 479 |
"cell_type": "code",
|
| 480 |
+
"execution_count": null,
|
| 481 |
"metadata": {
|
| 482 |
"execution": {
|
| 483 |
"iopub.execute_input": "2023-10-22T12:46:08.114585Z",
|
|
|
|
| 487 |
"shell.execute_reply.started": "2023-10-22T12:46:08.114556Z"
|
| 488 |
}
|
| 489 |
},
|
| 490 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 491 |
"source": [
|
| 492 |
"df.isnull().sum()"
|
| 493 |
]
|
| 494 |
},
|
| 495 |
{
|
| 496 |
"cell_type": "code",
|
| 497 |
+
"execution_count": null,
|
| 498 |
"metadata": {
|
| 499 |
"execution": {
|
| 500 |
"iopub.execute_input": "2023-10-22T12:46:13.768815Z",
|
|
|
|
| 504 |
"shell.execute_reply.started": "2023-10-22T12:46:13.768781Z"
|
| 505 |
}
|
| 506 |
},
|
| 507 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 508 |
"source": [
|
| 509 |
"df['Size'].fillna(method='ffill',inplace=True)"
|
| 510 |
]
|
benchmark/pandas_10/pandas_10_reproduced.ipynb
CHANGED
|
@@ -68,7 +68,7 @@
|
|
| 68 |
},
|
| 69 |
{
|
| 70 |
"cell_type": "code",
|
| 71 |
-
"execution_count":
|
| 72 |
"metadata": {
|
| 73 |
"execution": {
|
| 74 |
"iopub.execute_input": "2023-10-22T12:44:58.372979Z",
|
|
@@ -78,163 +78,14 @@
|
|
| 78 |
"shell.execute_reply.started": "2023-10-22T12:44:58.372945Z"
|
| 79 |
}
|
| 80 |
},
|
| 81 |
-
"outputs": [
|
| 82 |
-
{
|
| 83 |
-
"data": {
|
| 84 |
-
"text/html": [
|
| 85 |
-
"<div>\n",
|
| 86 |
-
"<style scoped>\n",
|
| 87 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 88 |
-
" vertical-align: middle;\n",
|
| 89 |
-
" }\n",
|
| 90 |
-
"\n",
|
| 91 |
-
" .dataframe tbody tr th {\n",
|
| 92 |
-
" vertical-align: top;\n",
|
| 93 |
-
" }\n",
|
| 94 |
-
"\n",
|
| 95 |
-
" .dataframe thead th {\n",
|
| 96 |
-
" text-align: right;\n",
|
| 97 |
-
" }\n",
|
| 98 |
-
"</style>\n",
|
| 99 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 100 |
-
" <thead>\n",
|
| 101 |
-
" <tr style=\"text-align: right;\">\n",
|
| 102 |
-
" <th></th>\n",
|
| 103 |
-
" <th>App</th>\n",
|
| 104 |
-
" <th>Category</th>\n",
|
| 105 |
-
" <th>Rating</th>\n",
|
| 106 |
-
" <th>Reviews</th>\n",
|
| 107 |
-
" <th>Size</th>\n",
|
| 108 |
-
" <th>Installs</th>\n",
|
| 109 |
-
" <th>Type</th>\n",
|
| 110 |
-
" <th>Price</th>\n",
|
| 111 |
-
" <th>Content Rating</th>\n",
|
| 112 |
-
" <th>Genres</th>\n",
|
| 113 |
-
" <th>Last Updated</th>\n",
|
| 114 |
-
" <th>Current Ver</th>\n",
|
| 115 |
-
" <th>Android Ver</th>\n",
|
| 116 |
-
" </tr>\n",
|
| 117 |
-
" </thead>\n",
|
| 118 |
-
" <tbody>\n",
|
| 119 |
-
" <tr>\n",
|
| 120 |
-
" <th>0</th>\n",
|
| 121 |
-
" <td>Photo Editor & Candy Camera & Grid & ScrapBook</td>\n",
|
| 122 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 123 |
-
" <td>4.1</td>\n",
|
| 124 |
-
" <td>159</td>\n",
|
| 125 |
-
" <td>19M</td>\n",
|
| 126 |
-
" <td>10,000+</td>\n",
|
| 127 |
-
" <td>Free</td>\n",
|
| 128 |
-
" <td>0</td>\n",
|
| 129 |
-
" <td>Everyone</td>\n",
|
| 130 |
-
" <td>Art & Design</td>\n",
|
| 131 |
-
" <td>7-Jan-18</td>\n",
|
| 132 |
-
" <td>1.0.0</td>\n",
|
| 133 |
-
" <td>4.0.3 and up</td>\n",
|
| 134 |
-
" </tr>\n",
|
| 135 |
-
" <tr>\n",
|
| 136 |
-
" <th>1</th>\n",
|
| 137 |
-
" <td>Coloring book moana</td>\n",
|
| 138 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 139 |
-
" <td>3.9</td>\n",
|
| 140 |
-
" <td>967</td>\n",
|
| 141 |
-
" <td>14M</td>\n",
|
| 142 |
-
" <td>500,000+</td>\n",
|
| 143 |
-
" <td>Free</td>\n",
|
| 144 |
-
" <td>0</td>\n",
|
| 145 |
-
" <td>Everyone</td>\n",
|
| 146 |
-
" <td>Art & Design;Pretend Play</td>\n",
|
| 147 |
-
" <td>15-Jan-18</td>\n",
|
| 148 |
-
" <td>2.0.0</td>\n",
|
| 149 |
-
" <td>4.0.3 and up</td>\n",
|
| 150 |
-
" </tr>\n",
|
| 151 |
-
" <tr>\n",
|
| 152 |
-
" <th>2</th>\n",
|
| 153 |
-
" <td>U Launcher Lite – FREE Live Cool Themes, Hide ...</td>\n",
|
| 154 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 155 |
-
" <td>4.7</td>\n",
|
| 156 |
-
" <td>87510</td>\n",
|
| 157 |
-
" <td>8.7M</td>\n",
|
| 158 |
-
" <td>5,000,000+</td>\n",
|
| 159 |
-
" <td>Free</td>\n",
|
| 160 |
-
" <td>0</td>\n",
|
| 161 |
-
" <td>Everyone</td>\n",
|
| 162 |
-
" <td>Art & Design</td>\n",
|
| 163 |
-
" <td>1-Aug-18</td>\n",
|
| 164 |
-
" <td>1.2.4</td>\n",
|
| 165 |
-
" <td>4.0.3 and up</td>\n",
|
| 166 |
-
" </tr>\n",
|
| 167 |
-
" <tr>\n",
|
| 168 |
-
" <th>3</th>\n",
|
| 169 |
-
" <td>Sketch - Draw & Paint</td>\n",
|
| 170 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 171 |
-
" <td>4.5</td>\n",
|
| 172 |
-
" <td>215644</td>\n",
|
| 173 |
-
" <td>25M</td>\n",
|
| 174 |
-
" <td>50,000,000+</td>\n",
|
| 175 |
-
" <td>Free</td>\n",
|
| 176 |
-
" <td>0</td>\n",
|
| 177 |
-
" <td>Teen</td>\n",
|
| 178 |
-
" <td>Art & Design</td>\n",
|
| 179 |
-
" <td>8-Jun-18</td>\n",
|
| 180 |
-
" <td>Varies with device</td>\n",
|
| 181 |
-
" <td>4.2 and up</td>\n",
|
| 182 |
-
" </tr>\n",
|
| 183 |
-
" <tr>\n",
|
| 184 |
-
" <th>4</th>\n",
|
| 185 |
-
" <td>Pixel Draw - Number Art Coloring Book</td>\n",
|
| 186 |
-
" <td>ART_AND_DESIGN</td>\n",
|
| 187 |
-
" <td>4.3</td>\n",
|
| 188 |
-
" <td>967</td>\n",
|
| 189 |
-
" <td>2.8M</td>\n",
|
| 190 |
-
" <td>100,000+</td>\n",
|
| 191 |
-
" <td>Free</td>\n",
|
| 192 |
-
" <td>0</td>\n",
|
| 193 |
-
" <td>Everyone</td>\n",
|
| 194 |
-
" <td>Art & Design;Creativity</td>\n",
|
| 195 |
-
" <td>20-Jun-18</td>\n",
|
| 196 |
-
" <td>1.1</td>\n",
|
| 197 |
-
" <td>4.4 and up</td>\n",
|
| 198 |
-
" </tr>\n",
|
| 199 |
-
" </tbody>\n",
|
| 200 |
-
"</table>\n",
|
| 201 |
-
"</div>"
|
| 202 |
-
],
|
| 203 |
-
"text/plain": [
|
| 204 |
-
" App Category Rating \\\n",
|
| 205 |
-
"0 Photo Editor & Candy Camera & Grid & ScrapBook ART_AND_DESIGN 4.1 \n",
|
| 206 |
-
"1 Coloring book moana ART_AND_DESIGN 3.9 \n",
|
| 207 |
-
"2 U Launcher Lite – FREE Live Cool Themes, Hide ... ART_AND_DESIGN 4.7 \n",
|
| 208 |
-
"3 Sketch - Draw & Paint ART_AND_DESIGN 4.5 \n",
|
| 209 |
-
"4 Pixel Draw - Number Art Coloring Book ART_AND_DESIGN 4.3 \n",
|
| 210 |
-
"\n",
|
| 211 |
-
" Reviews Size Installs Type Price Content Rating \\\n",
|
| 212 |
-
"0 159 19M 10,000+ Free 0 Everyone \n",
|
| 213 |
-
"1 967 14M 500,000+ Free 0 Everyone \n",
|
| 214 |
-
"2 87510 8.7M 5,000,000+ Free 0 Everyone \n",
|
| 215 |
-
"3 215644 25M 50,000,000+ Free 0 Teen \n",
|
| 216 |
-
"4 967 2.8M 100,000+ Free 0 Everyone \n",
|
| 217 |
-
"\n",
|
| 218 |
-
" Genres Last Updated Current Ver Android Ver \n",
|
| 219 |
-
"0 Art & Design 7-Jan-18 1.0.0 4.0.3 and up \n",
|
| 220 |
-
"1 Art & Design;Pretend Play 15-Jan-18 2.0.0 4.0.3 and up \n",
|
| 221 |
-
"2 Art & Design 1-Aug-18 1.2.4 4.0.3 and up \n",
|
| 222 |
-
"3 Art & Design 8-Jun-18 Varies with device 4.2 and up \n",
|
| 223 |
-
"4 Art & Design;Creativity 20-Jun-18 1.1 4.4 and up "
|
| 224 |
-
]
|
| 225 |
-
},
|
| 226 |
-
"execution_count": 3,
|
| 227 |
-
"metadata": {},
|
| 228 |
-
"output_type": "execute_result"
|
| 229 |
-
}
|
| 230 |
-
],
|
| 231 |
"source": [
|
| 232 |
"df.head()"
|
| 233 |
]
|
| 234 |
},
|
| 235 |
{
|
| 236 |
"cell_type": "code",
|
| 237 |
-
"execution_count":
|
| 238 |
"metadata": {
|
| 239 |
"execution": {
|
| 240 |
"iopub.execute_input": "2023-10-22T12:44:58.411513Z",
|
|
@@ -244,18 +95,7 @@
|
|
| 244 |
"shell.execute_reply.started": "2023-10-22T12:44:58.411466Z"
|
| 245 |
}
|
| 246 |
},
|
| 247 |
-
"outputs": [
|
| 248 |
-
{
|
| 249 |
-
"data": {
|
| 250 |
-
"text/plain": [
|
| 251 |
-
"(10841, 13)"
|
| 252 |
-
]
|
| 253 |
-
},
|
| 254 |
-
"execution_count": 4,
|
| 255 |
-
"metadata": {},
|
| 256 |
-
"output_type": "execute_result"
|
| 257 |
-
}
|
| 258 |
-
],
|
| 259 |
"source": [
|
| 260 |
"# print Rows and Col\n",
|
| 261 |
"df.shape"
|
|
@@ -263,7 +103,7 @@
|
|
| 263 |
},
|
| 264 |
{
|
| 265 |
"cell_type": "code",
|
| 266 |
-
"execution_count":
|
| 267 |
"metadata": {
|
| 268 |
"execution": {
|
| 269 |
"iopub.execute_input": "2023-10-22T12:44:58.424396Z",
|
|
@@ -273,34 +113,7 @@
|
|
| 273 |
"shell.execute_reply.started": "2023-10-22T12:44:58.424363Z"
|
| 274 |
}
|
| 275 |
},
|
| 276 |
-
"outputs": [
|
| 277 |
-
{
|
| 278 |
-
"name": "stdout",
|
| 279 |
-
"output_type": "stream",
|
| 280 |
-
"text": [
|
| 281 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 282 |
-
"RangeIndex: 10841 entries, 0 to 10840\n",
|
| 283 |
-
"Data columns (total 13 columns):\n",
|
| 284 |
-
" # Column Non-Null Count Dtype \n",
|
| 285 |
-
"--- ------ -------------- ----- \n",
|
| 286 |
-
" 0 App 10841 non-null object \n",
|
| 287 |
-
" 1 Category 10841 non-null object \n",
|
| 288 |
-
" 2 Rating 9367 non-null float64\n",
|
| 289 |
-
" 3 Reviews 10841 non-null object \n",
|
| 290 |
-
" 4 Size 10841 non-null object \n",
|
| 291 |
-
" 5 Installs 10841 non-null object \n",
|
| 292 |
-
" 6 Type 10840 non-null object \n",
|
| 293 |
-
" 7 Price 10841 non-null object \n",
|
| 294 |
-
" 8 Content Rating 10840 non-null object \n",
|
| 295 |
-
" 9 Genres 10841 non-null object \n",
|
| 296 |
-
" 10 Last Updated 10841 non-null object \n",
|
| 297 |
-
" 11 Current Ver 10833 non-null object \n",
|
| 298 |
-
" 12 Android Ver 10838 non-null object \n",
|
| 299 |
-
"dtypes: float64(1), object(12)\n",
|
| 300 |
-
"memory usage: 1.1+ MB\n"
|
| 301 |
-
]
|
| 302 |
-
}
|
| 303 |
-
],
|
| 304 |
"source": [
|
| 305 |
"# Information of Data\n",
|
| 306 |
"df.info()"
|
|
@@ -324,7 +137,7 @@
|
|
| 324 |
},
|
| 325 |
{
|
| 326 |
"cell_type": "code",
|
| 327 |
-
"execution_count":
|
| 328 |
"metadata": {
|
| 329 |
"execution": {
|
| 330 |
"iopub.execute_input": "2023-10-22T12:44:58.476239Z",
|
|
@@ -334,38 +147,14 @@
|
|
| 334 |
"shell.execute_reply.started": "2023-10-22T12:44:58.476193Z"
|
| 335 |
}
|
| 336 |
},
|
| 337 |
-
"outputs": [
|
| 338 |
-
{
|
| 339 |
-
"data": {
|
| 340 |
-
"text/plain": [
|
| 341 |
-
"App 0\n",
|
| 342 |
-
"Category 0\n",
|
| 343 |
-
"Rating 1474\n",
|
| 344 |
-
"Reviews 0\n",
|
| 345 |
-
"Size 0\n",
|
| 346 |
-
"Installs 0\n",
|
| 347 |
-
"Type 1\n",
|
| 348 |
-
"Price 0\n",
|
| 349 |
-
"Content Rating 1\n",
|
| 350 |
-
"Genres 0\n",
|
| 351 |
-
"Last Updated 0\n",
|
| 352 |
-
"Current Ver 8\n",
|
| 353 |
-
"Android Ver 3\n",
|
| 354 |
-
"dtype: int64"
|
| 355 |
-
]
|
| 356 |
-
},
|
| 357 |
-
"execution_count": 6,
|
| 358 |
-
"metadata": {},
|
| 359 |
-
"output_type": "execute_result"
|
| 360 |
-
}
|
| 361 |
-
],
|
| 362 |
"source": [
|
| 363 |
"df.isnull().sum()"
|
| 364 |
]
|
| 365 |
},
|
| 366 |
{
|
| 367 |
"cell_type": "code",
|
| 368 |
-
"execution_count":
|
| 369 |
"metadata": {
|
| 370 |
"execution": {
|
| 371 |
"iopub.execute_input": "2023-10-22T12:44:58.503907Z",
|
|
@@ -382,7 +171,7 @@
|
|
| 382 |
},
|
| 383 |
{
|
| 384 |
"cell_type": "code",
|
| 385 |
-
"execution_count":
|
| 386 |
"metadata": {
|
| 387 |
"execution": {
|
| 388 |
"iopub.execute_input": "2023-10-22T12:44:58.530211Z",
|
|
@@ -392,38 +181,14 @@
|
|
| 392 |
"shell.execute_reply.started": "2023-10-22T12:44:58.530124Z"
|
| 393 |
}
|
| 394 |
},
|
| 395 |
-
"outputs": [
|
| 396 |
-
{
|
| 397 |
-
"data": {
|
| 398 |
-
"text/plain": [
|
| 399 |
-
"App 0\n",
|
| 400 |
-
"Category 0\n",
|
| 401 |
-
"Rating 0\n",
|
| 402 |
-
"Reviews 0\n",
|
| 403 |
-
"Size 0\n",
|
| 404 |
-
"Installs 0\n",
|
| 405 |
-
"Type 0\n",
|
| 406 |
-
"Price 0\n",
|
| 407 |
-
"Content Rating 0\n",
|
| 408 |
-
"Genres 0\n",
|
| 409 |
-
"Last Updated 0\n",
|
| 410 |
-
"Current Ver 0\n",
|
| 411 |
-
"Android Ver 0\n",
|
| 412 |
-
"dtype: int64"
|
| 413 |
-
]
|
| 414 |
-
},
|
| 415 |
-
"execution_count": 8,
|
| 416 |
-
"metadata": {},
|
| 417 |
-
"output_type": "execute_result"
|
| 418 |
-
}
|
| 419 |
-
],
|
| 420 |
"source": [
|
| 421 |
"df.isnull().sum()"
|
| 422 |
]
|
| 423 |
},
|
| 424 |
{
|
| 425 |
"cell_type": "code",
|
| 426 |
-
"execution_count":
|
| 427 |
"metadata": {
|
| 428 |
"execution": {
|
| 429 |
"iopub.execute_input": "2023-10-22T12:44:58.556274Z",
|
|
@@ -433,31 +198,7 @@
|
|
| 433 |
"shell.execute_reply.started": "2023-10-22T12:44:58.556234Z"
|
| 434 |
}
|
| 435 |
},
|
| 436 |
-
"outputs": [
|
| 437 |
-
{
|
| 438 |
-
"data": {
|
| 439 |
-
"text/plain": [
|
| 440 |
-
"App object\n",
|
| 441 |
-
"Category object\n",
|
| 442 |
-
"Rating float64\n",
|
| 443 |
-
"Reviews object\n",
|
| 444 |
-
"Size object\n",
|
| 445 |
-
"Installs object\n",
|
| 446 |
-
"Type object\n",
|
| 447 |
-
"Price object\n",
|
| 448 |
-
"Content Rating object\n",
|
| 449 |
-
"Genres object\n",
|
| 450 |
-
"Last Updated object\n",
|
| 451 |
-
"Current Ver object\n",
|
| 452 |
-
"Android Ver object\n",
|
| 453 |
-
"dtype: object"
|
| 454 |
-
]
|
| 455 |
-
},
|
| 456 |
-
"execution_count": 9,
|
| 457 |
-
"metadata": {},
|
| 458 |
-
"output_type": "execute_result"
|
| 459 |
-
}
|
| 460 |
-
],
|
| 461 |
"source": [
|
| 462 |
"# Check Datatypes\n",
|
| 463 |
"df.dtypes"
|
|
@@ -472,7 +213,7 @@
|
|
| 472 |
},
|
| 473 |
{
|
| 474 |
"cell_type": "code",
|
| 475 |
-
"execution_count":
|
| 476 |
"metadata": {
|
| 477 |
"execution": {
|
| 478 |
"iopub.execute_input": "2023-10-22T12:44:58.568629Z",
|
|
@@ -489,7 +230,7 @@
|
|
| 489 |
},
|
| 490 |
{
|
| 491 |
"cell_type": "code",
|
| 492 |
-
"execution_count":
|
| 493 |
"metadata": {
|
| 494 |
"execution": {
|
| 495 |
"iopub.execute_input": "2023-10-22T12:44:58.584706Z",
|
|
@@ -499,38 +240,14 @@
|
|
| 499 |
"shell.execute_reply.started": "2023-10-22T12:44:58.584656Z"
|
| 500 |
}
|
| 501 |
},
|
| 502 |
-
"outputs": [
|
| 503 |
-
{
|
| 504 |
-
"data": {
|
| 505 |
-
"text/plain": [
|
| 506 |
-
"App object\n",
|
| 507 |
-
"Category object\n",
|
| 508 |
-
"Rating float64\n",
|
| 509 |
-
"Reviews int64\n",
|
| 510 |
-
"Size object\n",
|
| 511 |
-
"Installs object\n",
|
| 512 |
-
"Type object\n",
|
| 513 |
-
"Price object\n",
|
| 514 |
-
"Content Rating object\n",
|
| 515 |
-
"Genres object\n",
|
| 516 |
-
"Last Updated object\n",
|
| 517 |
-
"Current Ver object\n",
|
| 518 |
-
"Android Ver object\n",
|
| 519 |
-
"dtype: object"
|
| 520 |
-
]
|
| 521 |
-
},
|
| 522 |
-
"execution_count": 11,
|
| 523 |
-
"metadata": {},
|
| 524 |
-
"output_type": "execute_result"
|
| 525 |
-
}
|
| 526 |
-
],
|
| 527 |
"source": [
|
| 528 |
"df.dtypes"
|
| 529 |
]
|
| 530 |
},
|
| 531 |
{
|
| 532 |
"cell_type": "code",
|
| 533 |
-
"execution_count":
|
| 534 |
"metadata": {
|
| 535 |
"execution": {
|
| 536 |
"iopub.execute_input": "2023-10-22T12:44:58.607554Z",
|
|
@@ -548,14 +265,14 @@
|
|
| 548 |
"traceback": [
|
| 549 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 550 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 551 |
-
"
|
| 552 |
-
"
|
| 553 |
-
"
|
| 554 |
-
"
|
| 555 |
-
"
|
| 556 |
-
"
|
| 557 |
-
"
|
| 558 |
-
"
|
| 559 |
"\u001b[0;31mValueError\u001b[0m: invalid literal for int() with base 10: '10,000+'"
|
| 560 |
]
|
| 561 |
}
|
|
@@ -566,7 +283,7 @@
|
|
| 566 |
},
|
| 567 |
{
|
| 568 |
"cell_type": "code",
|
| 569 |
-
"execution_count":
|
| 570 |
"metadata": {
|
| 571 |
"execution": {
|
| 572 |
"iopub.execute_input": "2023-10-22T12:45:31.529064Z",
|
|
@@ -584,7 +301,7 @@
|
|
| 584 |
},
|
| 585 |
{
|
| 586 |
"cell_type": "code",
|
| 587 |
-
"execution_count":
|
| 588 |
"metadata": {
|
| 589 |
"execution": {
|
| 590 |
"iopub.execute_input": "2023-10-22T12:45:34.207157Z",
|
|
@@ -601,7 +318,7 @@
|
|
| 601 |
},
|
| 602 |
{
|
| 603 |
"cell_type": "code",
|
| 604 |
-
"execution_count":
|
| 605 |
"metadata": {
|
| 606 |
"execution": {
|
| 607 |
"iopub.execute_input": "2023-10-22T12:45:37.326177Z",
|
|
@@ -611,38 +328,14 @@
|
|
| 611 |
"shell.execute_reply.started": "2023-10-22T12:45:37.326147Z"
|
| 612 |
}
|
| 613 |
},
|
| 614 |
-
"outputs": [
|
| 615 |
-
{
|
| 616 |
-
"data": {
|
| 617 |
-
"text/plain": [
|
| 618 |
-
"App object\n",
|
| 619 |
-
"Category object\n",
|
| 620 |
-
"Rating float64\n",
|
| 621 |
-
"Reviews int64\n",
|
| 622 |
-
"Size object\n",
|
| 623 |
-
"Installs int64\n",
|
| 624 |
-
"Type object\n",
|
| 625 |
-
"Price object\n",
|
| 626 |
-
"Content Rating object\n",
|
| 627 |
-
"Genres object\n",
|
| 628 |
-
"Last Updated object\n",
|
| 629 |
-
"Current Ver object\n",
|
| 630 |
-
"Android Ver object\n",
|
| 631 |
-
"dtype: object"
|
| 632 |
-
]
|
| 633 |
-
},
|
| 634 |
-
"execution_count": 14,
|
| 635 |
-
"metadata": {},
|
| 636 |
-
"output_type": "execute_result"
|
| 637 |
-
}
|
| 638 |
-
],
|
| 639 |
"source": [
|
| 640 |
"df.dtypes"
|
| 641 |
]
|
| 642 |
},
|
| 643 |
{
|
| 644 |
"cell_type": "code",
|
| 645 |
-
"execution_count":
|
| 646 |
"metadata": {
|
| 647 |
"execution": {
|
| 648 |
"iopub.execute_input": "2023-10-22T12:45:40.288946Z",
|
|
@@ -652,33 +345,14 @@
|
|
| 652 |
"shell.execute_reply.started": "2023-10-22T12:45:40.288917Z"
|
| 653 |
}
|
| 654 |
},
|
| 655 |
-
"outputs": [
|
| 656 |
-
{
|
| 657 |
-
"ename": "ValueError",
|
| 658 |
-
"evalue": "could not convert string to float: '$4.99 '",
|
| 659 |
-
"output_type": "error",
|
| 660 |
-
"traceback": [
|
| 661 |
-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 662 |
-
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 663 |
-
"\u001b[0;32m<ipython-input-15-6b4285799748>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Price'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Price'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'float'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
| 664 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 6532\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6533\u001b[0m \u001b[0;31m# else, only a single dtype is given\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 6534\u001b[0;31m \u001b[0mnew_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6535\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_constructor_from_mgr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6536\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 665 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 412\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 414\u001b[0;31m return self.apply(\n\u001b[0m\u001b[1;32m 415\u001b[0m \u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 666 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, f, align_keys, **kwargs)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 354\u001b[0;31m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 355\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mextend_blocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_blocks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 667 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/blocks.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors, using_cow)\u001b[0m\n\u001b[1;32m 614\u001b[0m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 615\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 616\u001b[0;31m \u001b[0mnew_values\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mastype_array_safe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 617\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 618\u001b[0m \u001b[0mnew_values\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmaybe_coerce_values\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_values\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 668 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/dtypes/astype.py\u001b[0m in \u001b[0;36mastype_array_safe\u001b[0;34m(values, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 236\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 237\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 238\u001b[0;31m \u001b[0mnew_values\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mastype_array\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 239\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mValueError\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 240\u001b[0m \u001b[0;31m# e.g. _astype_nansafe can fail on object-dtype of strings\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 669 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/dtypes/astype.py\u001b[0m in \u001b[0;36mastype_array\u001b[0;34m(values, dtype, copy)\u001b[0m\n\u001b[1;32m 181\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 182\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 183\u001b[0;31m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_astype_nansafe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 184\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 185\u001b[0m \u001b[0;31m# in pandas we don't store numpy str dtypes, so convert to object\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 670 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/dtypes/astype.py\u001b[0m in \u001b[0;36m_astype_nansafe\u001b[0;34m(arr, dtype, copy, skipna)\u001b[0m\n\u001b[1;32m 132\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mobject\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mdtype\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mobject\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 133\u001b[0m \u001b[0;31m# Explicit copy, or required since NumPy can't view from / to object.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 134\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 135\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 136\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 671 |
-
"\u001b[0;31mValueError\u001b[0m: could not convert string to float: '$4.99 '"
|
| 672 |
-
]
|
| 673 |
-
}
|
| 674 |
-
],
|
| 675 |
"source": [
|
| 676 |
"df['Price']=df['Price'].astype('float')"
|
| 677 |
]
|
| 678 |
},
|
| 679 |
{
|
| 680 |
"cell_type": "code",
|
| 681 |
-
"execution_count":
|
| 682 |
"metadata": {
|
| 683 |
"execution": {
|
| 684 |
"iopub.execute_input": "2023-10-22T12:45:45.746481Z",
|
|
@@ -695,7 +369,7 @@
|
|
| 695 |
},
|
| 696 |
{
|
| 697 |
"cell_type": "code",
|
| 698 |
-
"execution_count":
|
| 699 |
"metadata": {
|
| 700 |
"execution": {
|
| 701 |
"iopub.execute_input": "2023-10-22T12:45:48.333300Z",
|
|
@@ -712,7 +386,7 @@
|
|
| 712 |
},
|
| 713 |
{
|
| 714 |
"cell_type": "code",
|
| 715 |
-
"execution_count":
|
| 716 |
"metadata": {
|
| 717 |
"execution": {
|
| 718 |
"iopub.status.busy": "2023-10-22T12:45:00.128119Z",
|
|
@@ -721,38 +395,14 @@
|
|
| 721 |
"shell.execute_reply.started": "2023-10-22T12:45:00.128407Z"
|
| 722 |
}
|
| 723 |
},
|
| 724 |
-
"outputs": [
|
| 725 |
-
{
|
| 726 |
-
"data": {
|
| 727 |
-
"text/plain": [
|
| 728 |
-
"App object\n",
|
| 729 |
-
"Category object\n",
|
| 730 |
-
"Rating float64\n",
|
| 731 |
-
"Reviews int64\n",
|
| 732 |
-
"Size object\n",
|
| 733 |
-
"Installs int64\n",
|
| 734 |
-
"Type object\n",
|
| 735 |
-
"Price float64\n",
|
| 736 |
-
"Content Rating object\n",
|
| 737 |
-
"Genres object\n",
|
| 738 |
-
"Last Updated object\n",
|
| 739 |
-
"Current Ver object\n",
|
| 740 |
-
"Android Ver object\n",
|
| 741 |
-
"dtype: object"
|
| 742 |
-
]
|
| 743 |
-
},
|
| 744 |
-
"execution_count": 18,
|
| 745 |
-
"metadata": {},
|
| 746 |
-
"output_type": "execute_result"
|
| 747 |
-
}
|
| 748 |
-
],
|
| 749 |
"source": [
|
| 750 |
"df.dtypes"
|
| 751 |
]
|
| 752 |
},
|
| 753 |
{
|
| 754 |
"cell_type": "code",
|
| 755 |
-
"execution_count":
|
| 756 |
"metadata": {
|
| 757 |
"execution": {
|
| 758 |
"iopub.execute_input": "2023-10-22T12:45:51.282739Z",
|
|
@@ -762,33 +412,14 @@
|
|
| 762 |
"shell.execute_reply.started": "2023-10-22T12:45:51.282704Z"
|
| 763 |
}
|
| 764 |
},
|
| 765 |
-
"outputs": [
|
| 766 |
-
{
|
| 767 |
-
"ename": "ValueError",
|
| 768 |
-
"evalue": "could not convert string to float: '19M'",
|
| 769 |
-
"output_type": "error",
|
| 770 |
-
"traceback": [
|
| 771 |
-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 772 |
-
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 773 |
-
"\u001b[0;32m<ipython-input-19-7b746e2217b8>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Size'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Size'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'float'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
| 774 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 6532\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6533\u001b[0m \u001b[0;31m# else, only a single dtype is given\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 6534\u001b[0;31m \u001b[0mnew_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6535\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_constructor_from_mgr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6536\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 775 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 412\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 414\u001b[0;31m return self.apply(\n\u001b[0m\u001b[1;32m 415\u001b[0m \u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 776 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, f, align_keys, **kwargs)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 354\u001b[0;31m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 355\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mextend_blocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_blocks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 777 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/blocks.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors, using_cow)\u001b[0m\n\u001b[1;32m 614\u001b[0m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 615\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 616\u001b[0;31m \u001b[0mnew_values\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mastype_array_safe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 617\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 618\u001b[0m \u001b[0mnew_values\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmaybe_coerce_values\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_values\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 778 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/dtypes/astype.py\u001b[0m in \u001b[0;36mastype_array_safe\u001b[0;34m(values, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 236\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 237\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 238\u001b[0;31m \u001b[0mnew_values\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mastype_array\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 239\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mValueError\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 240\u001b[0m \u001b[0;31m# e.g. _astype_nansafe can fail on object-dtype of strings\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 779 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/dtypes/astype.py\u001b[0m in \u001b[0;36mastype_array\u001b[0;34m(values, dtype, copy)\u001b[0m\n\u001b[1;32m 181\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 182\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 183\u001b[0;31m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_astype_nansafe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 184\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 185\u001b[0m \u001b[0;31m# in pandas we don't store numpy str dtypes, so convert to object\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 780 |
-
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/dtypes/astype.py\u001b[0m in \u001b[0;36m_astype_nansafe\u001b[0;34m(arr, dtype, copy, skipna)\u001b[0m\n\u001b[1;32m 132\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mobject\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mdtype\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mobject\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 133\u001b[0m \u001b[0;31m# Explicit copy, or required since NumPy can't view from / to object.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 134\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 135\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 136\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 781 |
-
"\u001b[0;31mValueError\u001b[0m: could not convert string to float: '19M'"
|
| 782 |
-
]
|
| 783 |
-
}
|
| 784 |
-
],
|
| 785 |
"source": [
|
| 786 |
"df['Size']=df['Size'].astype('float')"
|
| 787 |
]
|
| 788 |
},
|
| 789 |
{
|
| 790 |
"cell_type": "code",
|
| 791 |
-
"execution_count":
|
| 792 |
"metadata": {
|
| 793 |
"execution": {
|
| 794 |
"iopub.status.busy": "2023-10-22T12:45:00.134339Z",
|
|
@@ -797,37 +428,14 @@
|
|
| 797 |
"shell.execute_reply.started": "2023-10-22T12:45:00.135690Z"
|
| 798 |
}
|
| 799 |
},
|
| 800 |
-
"outputs": [
|
| 801 |
-
{
|
| 802 |
-
"data": {
|
| 803 |
-
"text/plain": [
|
| 804 |
-
"Size\n",
|
| 805 |
-
"Varies with device 1637\n",
|
| 806 |
-
"14M 165\n",
|
| 807 |
-
"12M 161\n",
|
| 808 |
-
"15M 159\n",
|
| 809 |
-
"11M 159\n",
|
| 810 |
-
" ... \n",
|
| 811 |
-
"383k 1\n",
|
| 812 |
-
"454k 1\n",
|
| 813 |
-
"812k 1\n",
|
| 814 |
-
"442k 1\n",
|
| 815 |
-
"619k 1\n",
|
| 816 |
-
"Name: count, Length: 413, dtype: int64"
|
| 817 |
-
]
|
| 818 |
-
},
|
| 819 |
-
"execution_count": 20,
|
| 820 |
-
"metadata": {},
|
| 821 |
-
"output_type": "execute_result"
|
| 822 |
-
}
|
| 823 |
-
],
|
| 824 |
"source": [
|
| 825 |
"df['Size'].value_counts()"
|
| 826 |
]
|
| 827 |
},
|
| 828 |
{
|
| 829 |
"cell_type": "code",
|
| 830 |
-
"execution_count":
|
| 831 |
"metadata": {
|
| 832 |
"execution": {
|
| 833 |
"iopub.execute_input": "2023-10-22T12:46:01.150574Z",
|
|
@@ -854,7 +462,7 @@
|
|
| 854 |
},
|
| 855 |
{
|
| 856 |
"cell_type": "code",
|
| 857 |
-
"execution_count":
|
| 858 |
"metadata": {
|
| 859 |
"execution": {
|
| 860 |
"iopub.execute_input": "2023-10-22T12:46:04.480910Z",
|
|
@@ -887,7 +495,7 @@
|
|
| 887 |
},
|
| 888 |
{
|
| 889 |
"cell_type": "code",
|
| 890 |
-
"execution_count":
|
| 891 |
"metadata": {
|
| 892 |
"execution": {
|
| 893 |
"iopub.execute_input": "2023-10-22T12:46:08.114585Z",
|
|
@@ -897,38 +505,14 @@
|
|
| 897 |
"shell.execute_reply.started": "2023-10-22T12:46:08.114556Z"
|
| 898 |
}
|
| 899 |
},
|
| 900 |
-
"outputs": [
|
| 901 |
-
{
|
| 902 |
-
"data": {
|
| 903 |
-
"text/plain": [
|
| 904 |
-
"App 0\n",
|
| 905 |
-
"Category 0\n",
|
| 906 |
-
"Rating 0\n",
|
| 907 |
-
"Reviews 0\n",
|
| 908 |
-
"Size 1637\n",
|
| 909 |
-
"Installs 0\n",
|
| 910 |
-
"Type 0\n",
|
| 911 |
-
"Price 0\n",
|
| 912 |
-
"Content Rating 0\n",
|
| 913 |
-
"Genres 0\n",
|
| 914 |
-
"Last Updated 0\n",
|
| 915 |
-
"Current Ver 0\n",
|
| 916 |
-
"Android Ver 0\n",
|
| 917 |
-
"dtype: int64"
|
| 918 |
-
]
|
| 919 |
-
},
|
| 920 |
-
"execution_count": 23,
|
| 921 |
-
"metadata": {},
|
| 922 |
-
"output_type": "execute_result"
|
| 923 |
-
}
|
| 924 |
-
],
|
| 925 |
"source": [
|
| 926 |
"df.isnull().sum()"
|
| 927 |
]
|
| 928 |
},
|
| 929 |
{
|
| 930 |
"cell_type": "code",
|
| 931 |
-
"execution_count":
|
| 932 |
"metadata": {
|
| 933 |
"execution": {
|
| 934 |
"iopub.execute_input": "2023-10-22T12:46:13.768815Z",
|
|
@@ -938,16 +522,7 @@
|
|
| 938 |
"shell.execute_reply.started": "2023-10-22T12:46:13.768781Z"
|
| 939 |
}
|
| 940 |
},
|
| 941 |
-
"outputs": [
|
| 942 |
-
{
|
| 943 |
-
"name": "stderr",
|
| 944 |
-
"output_type": "stream",
|
| 945 |
-
"text": [
|
| 946 |
-
"<ipython-input-24-3323fbc28fc2>:1: FutureWarning: Series.fillna with 'method' is deprecated and will raise in a future version. Use obj.ffill() or obj.bfill() instead.\n",
|
| 947 |
-
" df['Size'].fillna(method='ffill',inplace=True)\n"
|
| 948 |
-
]
|
| 949 |
-
}
|
| 950 |
-
],
|
| 951 |
"source": [
|
| 952 |
"df['Size'].fillna(method='ffill',inplace=True)"
|
| 953 |
]
|
|
|
|
| 68 |
},
|
| 69 |
{
|
| 70 |
"cell_type": "code",
|
| 71 |
+
"execution_count": null,
|
| 72 |
"metadata": {
|
| 73 |
"execution": {
|
| 74 |
"iopub.execute_input": "2023-10-22T12:44:58.372979Z",
|
|
|
|
| 78 |
"shell.execute_reply.started": "2023-10-22T12:44:58.372945Z"
|
| 79 |
}
|
| 80 |
},
|
| 81 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
"source": [
|
| 83 |
"df.head()"
|
| 84 |
]
|
| 85 |
},
|
| 86 |
{
|
| 87 |
"cell_type": "code",
|
| 88 |
+
"execution_count": null,
|
| 89 |
"metadata": {
|
| 90 |
"execution": {
|
| 91 |
"iopub.execute_input": "2023-10-22T12:44:58.411513Z",
|
|
|
|
| 95 |
"shell.execute_reply.started": "2023-10-22T12:44:58.411466Z"
|
| 96 |
}
|
| 97 |
},
|
| 98 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
"source": [
|
| 100 |
"# print Rows and Col\n",
|
| 101 |
"df.shape"
|
|
|
|
| 103 |
},
|
| 104 |
{
|
| 105 |
"cell_type": "code",
|
| 106 |
+
"execution_count": null,
|
| 107 |
"metadata": {
|
| 108 |
"execution": {
|
| 109 |
"iopub.execute_input": "2023-10-22T12:44:58.424396Z",
|
|
|
|
| 113 |
"shell.execute_reply.started": "2023-10-22T12:44:58.424363Z"
|
| 114 |
}
|
| 115 |
},
|
| 116 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
"source": [
|
| 118 |
"# Information of Data\n",
|
| 119 |
"df.info()"
|
|
|
|
| 137 |
},
|
| 138 |
{
|
| 139 |
"cell_type": "code",
|
| 140 |
+
"execution_count": null,
|
| 141 |
"metadata": {
|
| 142 |
"execution": {
|
| 143 |
"iopub.execute_input": "2023-10-22T12:44:58.476239Z",
|
|
|
|
| 147 |
"shell.execute_reply.started": "2023-10-22T12:44:58.476193Z"
|
| 148 |
}
|
| 149 |
},
|
| 150 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
"source": [
|
| 152 |
"df.isnull().sum()"
|
| 153 |
]
|
| 154 |
},
|
| 155 |
{
|
| 156 |
"cell_type": "code",
|
| 157 |
+
"execution_count": 3,
|
| 158 |
"metadata": {
|
| 159 |
"execution": {
|
| 160 |
"iopub.execute_input": "2023-10-22T12:44:58.503907Z",
|
|
|
|
| 171 |
},
|
| 172 |
{
|
| 173 |
"cell_type": "code",
|
| 174 |
+
"execution_count": null,
|
| 175 |
"metadata": {
|
| 176 |
"execution": {
|
| 177 |
"iopub.execute_input": "2023-10-22T12:44:58.530211Z",
|
|
|
|
| 181 |
"shell.execute_reply.started": "2023-10-22T12:44:58.530124Z"
|
| 182 |
}
|
| 183 |
},
|
| 184 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
"source": [
|
| 186 |
"df.isnull().sum()"
|
| 187 |
]
|
| 188 |
},
|
| 189 |
{
|
| 190 |
"cell_type": "code",
|
| 191 |
+
"execution_count": null,
|
| 192 |
"metadata": {
|
| 193 |
"execution": {
|
| 194 |
"iopub.execute_input": "2023-10-22T12:44:58.556274Z",
|
|
|
|
| 198 |
"shell.execute_reply.started": "2023-10-22T12:44:58.556234Z"
|
| 199 |
}
|
| 200 |
},
|
| 201 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
"source": [
|
| 203 |
"# Check Datatypes\n",
|
| 204 |
"df.dtypes"
|
|
|
|
| 213 |
},
|
| 214 |
{
|
| 215 |
"cell_type": "code",
|
| 216 |
+
"execution_count": 4,
|
| 217 |
"metadata": {
|
| 218 |
"execution": {
|
| 219 |
"iopub.execute_input": "2023-10-22T12:44:58.568629Z",
|
|
|
|
| 230 |
},
|
| 231 |
{
|
| 232 |
"cell_type": "code",
|
| 233 |
+
"execution_count": null,
|
| 234 |
"metadata": {
|
| 235 |
"execution": {
|
| 236 |
"iopub.execute_input": "2023-10-22T12:44:58.584706Z",
|
|
|
|
| 240 |
"shell.execute_reply.started": "2023-10-22T12:44:58.584656Z"
|
| 241 |
}
|
| 242 |
},
|
| 243 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
"source": [
|
| 245 |
"df.dtypes"
|
| 246 |
]
|
| 247 |
},
|
| 248 |
{
|
| 249 |
"cell_type": "code",
|
| 250 |
+
"execution_count": 5,
|
| 251 |
"metadata": {
|
| 252 |
"execution": {
|
| 253 |
"iopub.execute_input": "2023-10-22T12:44:58.607554Z",
|
|
|
|
| 265 |
"traceback": [
|
| 266 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 267 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 268 |
+
"\u001b[0;32m<ipython-input-5-169a23801569>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Installs'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Installs'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'int'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
| 269 |
+
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 6532\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6533\u001b[0m \u001b[0;31m# else, only a single dtype is given\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 6534\u001b[0;31m \u001b[0mnew_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6535\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_constructor_from_mgr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6536\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 270 |
+
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 412\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 414\u001b[0;31m return self.apply(\n\u001b[0m\u001b[1;32m 415\u001b[0m \u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 271 |
+
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, f, align_keys, **kwargs)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 354\u001b[0;31m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 355\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mextend_blocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_blocks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 272 |
+
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/blocks.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors, using_cow)\u001b[0m\n\u001b[1;32m 614\u001b[0m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 615\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 616\u001b[0;31m \u001b[0mnew_values\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mastype_array_safe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 617\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 618\u001b[0m \u001b[0mnew_values\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmaybe_coerce_values\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_values\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 273 |
+
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/dtypes/astype.py\u001b[0m in \u001b[0;36mastype_array_safe\u001b[0;34m(values, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 236\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 237\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 238\u001b[0;31m \u001b[0mnew_values\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mastype_array\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 239\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mValueError\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 240\u001b[0m \u001b[0;31m# e.g. _astype_nansafe can fail on object-dtype of strings\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 274 |
+
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/dtypes/astype.py\u001b[0m in \u001b[0;36mastype_array\u001b[0;34m(values, dtype, copy)\u001b[0m\n\u001b[1;32m 181\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 182\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 183\u001b[0;31m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_astype_nansafe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 184\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 185\u001b[0m \u001b[0;31m# in pandas we don't store numpy str dtypes, so convert to object\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 275 |
+
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/dtypes/astype.py\u001b[0m in \u001b[0;36m_astype_nansafe\u001b[0;34m(arr, dtype, copy, skipna)\u001b[0m\n\u001b[1;32m 132\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mobject\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mdtype\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mobject\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 133\u001b[0m \u001b[0;31m# Explicit copy, or required since NumPy can't view from / to object.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 134\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 135\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 136\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0marr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 276 |
"\u001b[0;31mValueError\u001b[0m: invalid literal for int() with base 10: '10,000+'"
|
| 277 |
]
|
| 278 |
}
|
|
|
|
| 283 |
},
|
| 284 |
{
|
| 285 |
"cell_type": "code",
|
| 286 |
+
"execution_count": null,
|
| 287 |
"metadata": {
|
| 288 |
"execution": {
|
| 289 |
"iopub.execute_input": "2023-10-22T12:45:31.529064Z",
|
|
|
|
| 301 |
},
|
| 302 |
{
|
| 303 |
"cell_type": "code",
|
| 304 |
+
"execution_count": null,
|
| 305 |
"metadata": {
|
| 306 |
"execution": {
|
| 307 |
"iopub.execute_input": "2023-10-22T12:45:34.207157Z",
|
|
|
|
| 318 |
},
|
| 319 |
{
|
| 320 |
"cell_type": "code",
|
| 321 |
+
"execution_count": null,
|
| 322 |
"metadata": {
|
| 323 |
"execution": {
|
| 324 |
"iopub.execute_input": "2023-10-22T12:45:37.326177Z",
|
|
|
|
| 328 |
"shell.execute_reply.started": "2023-10-22T12:45:37.326147Z"
|
| 329 |
}
|
| 330 |
},
|
| 331 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
"source": [
|
| 333 |
"df.dtypes"
|
| 334 |
]
|
| 335 |
},
|
| 336 |
{
|
| 337 |
"cell_type": "code",
|
| 338 |
+
"execution_count": null,
|
| 339 |
"metadata": {
|
| 340 |
"execution": {
|
| 341 |
"iopub.execute_input": "2023-10-22T12:45:40.288946Z",
|
|
|
|
| 345 |
"shell.execute_reply.started": "2023-10-22T12:45:40.288917Z"
|
| 346 |
}
|
| 347 |
},
|
| 348 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 349 |
"source": [
|
| 350 |
"df['Price']=df['Price'].astype('float')"
|
| 351 |
]
|
| 352 |
},
|
| 353 |
{
|
| 354 |
"cell_type": "code",
|
| 355 |
+
"execution_count": null,
|
| 356 |
"metadata": {
|
| 357 |
"execution": {
|
| 358 |
"iopub.execute_input": "2023-10-22T12:45:45.746481Z",
|
|
|
|
| 369 |
},
|
| 370 |
{
|
| 371 |
"cell_type": "code",
|
| 372 |
+
"execution_count": null,
|
| 373 |
"metadata": {
|
| 374 |
"execution": {
|
| 375 |
"iopub.execute_input": "2023-10-22T12:45:48.333300Z",
|
|
|
|
| 386 |
},
|
| 387 |
{
|
| 388 |
"cell_type": "code",
|
| 389 |
+
"execution_count": null,
|
| 390 |
"metadata": {
|
| 391 |
"execution": {
|
| 392 |
"iopub.status.busy": "2023-10-22T12:45:00.128119Z",
|
|
|
|
| 395 |
"shell.execute_reply.started": "2023-10-22T12:45:00.128407Z"
|
| 396 |
}
|
| 397 |
},
|
| 398 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 399 |
"source": [
|
| 400 |
"df.dtypes"
|
| 401 |
]
|
| 402 |
},
|
| 403 |
{
|
| 404 |
"cell_type": "code",
|
| 405 |
+
"execution_count": null,
|
| 406 |
"metadata": {
|
| 407 |
"execution": {
|
| 408 |
"iopub.execute_input": "2023-10-22T12:45:51.282739Z",
|
|
|
|
| 412 |
"shell.execute_reply.started": "2023-10-22T12:45:51.282704Z"
|
| 413 |
}
|
| 414 |
},
|
| 415 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 416 |
"source": [
|
| 417 |
"df['Size']=df['Size'].astype('float')"
|
| 418 |
]
|
| 419 |
},
|
| 420 |
{
|
| 421 |
"cell_type": "code",
|
| 422 |
+
"execution_count": null,
|
| 423 |
"metadata": {
|
| 424 |
"execution": {
|
| 425 |
"iopub.status.busy": "2023-10-22T12:45:00.134339Z",
|
|
|
|
| 428 |
"shell.execute_reply.started": "2023-10-22T12:45:00.135690Z"
|
| 429 |
}
|
| 430 |
},
|
| 431 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
"source": [
|
| 433 |
"df['Size'].value_counts()"
|
| 434 |
]
|
| 435 |
},
|
| 436 |
{
|
| 437 |
"cell_type": "code",
|
| 438 |
+
"execution_count": null,
|
| 439 |
"metadata": {
|
| 440 |
"execution": {
|
| 441 |
"iopub.execute_input": "2023-10-22T12:46:01.150574Z",
|
|
|
|
| 462 |
},
|
| 463 |
{
|
| 464 |
"cell_type": "code",
|
| 465 |
+
"execution_count": null,
|
| 466 |
"metadata": {
|
| 467 |
"execution": {
|
| 468 |
"iopub.execute_input": "2023-10-22T12:46:04.480910Z",
|
|
|
|
| 495 |
},
|
| 496 |
{
|
| 497 |
"cell_type": "code",
|
| 498 |
+
"execution_count": null,
|
| 499 |
"metadata": {
|
| 500 |
"execution": {
|
| 501 |
"iopub.execute_input": "2023-10-22T12:46:08.114585Z",
|
|
|
|
| 505 |
"shell.execute_reply.started": "2023-10-22T12:46:08.114556Z"
|
| 506 |
}
|
| 507 |
},
|
| 508 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 509 |
"source": [
|
| 510 |
"df.isnull().sum()"
|
| 511 |
]
|
| 512 |
},
|
| 513 |
{
|
| 514 |
"cell_type": "code",
|
| 515 |
+
"execution_count": null,
|
| 516 |
"metadata": {
|
| 517 |
"execution": {
|
| 518 |
"iopub.execute_input": "2023-10-22T12:46:13.768815Z",
|
|
|
|
| 522 |
"shell.execute_reply.started": "2023-10-22T12:46:13.768781Z"
|
| 523 |
}
|
| 524 |
},
|
| 525 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 526 |
"source": [
|
| 527 |
"df['Size'].fillna(method='ffill',inplace=True)"
|
| 528 |
]
|
benchmark/pandas_11/pandas_11_fixed.ipynb
CHANGED
|
@@ -331,7 +331,7 @@
|
|
| 331 |
},
|
| 332 |
{
|
| 333 |
"cell_type": "code",
|
| 334 |
-
"execution_count":
|
| 335 |
"metadata": {
|
| 336 |
"execution": {
|
| 337 |
"iopub.execute_input": "2023-07-13T08:43:31.099091Z",
|
|
@@ -341,18 +341,7 @@
|
|
| 341 |
"shell.execute_reply.started": "2023-07-13T08:43:31.099063Z"
|
| 342 |
}
|
| 343 |
},
|
| 344 |
-
"outputs": [
|
| 345 |
-
{
|
| 346 |
-
"data": {
|
| 347 |
-
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAlUAAAHeCAYAAACymf40AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABGBUlEQVR4nO3deXhN5/7//9dOyGBIImSsmClKOTVEjllzRKU9otqavq25U3CIuTVEqx+tnhYt5as9RM+pGtpDP6VNG0M4CNqgRcsxNloSMSSblARZvz/6zfrZdkyx2AnPx3Xt65J7vdda770j8rLWve9tMwzDEAAAAG6Lm6sbAAAAuBcQqgAAACxAqAIAALAAoQoAAMAChCoAAAALEKoAAAAsQKgCAACwAKEKAADAAoQqAAAACxCqADiIj4+XzWZTcnKyq1u549q1ayebzeaScyckJMhmsykhIcFh3GazqV27di7pSZL69u0rm82mI0eOuKwHoKQiVAH3gdTUVA0YMEC1a9dW2bJl5e3trZo1a+rZZ59VUlKSq9u7LQUhoOBRqlQpVahQQfXr11fv3r312WefKS8vz/LzJicny2azKT4+3vJj30nXCnMAbl8pVzcA4M7Jz8/XyJEjNX36dJUqVUodOnTQX//6V5UuXVqHDh3SqlWr9K9//UuvvfaaJkyY4Op2b8uAAQNUuXJlGYYhu92u/fv368svv9SiRYtUr149LV68WA8//LDDPh9//LF+//13l/TbtWtXtWjRQiEhIS45/7VMnTpVY8eO1QMPPODqVoASh1AF3MPGjx+v6dOnq3Hjxvrss89Us2ZNh+3nz5/XrFmzdOrUKRd1aJ2BAweqRYsWDmNnz57VpEmTNH36dHXs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6+etm3bdtu9FSw6WtiijD4+Pvrwww918eJFhYeHa8CAARo7dqyaNWumTz/9VM2bN9eoUaNuu4eb1bx5czVv3lxLly5VmzZtNHr0aPXo0UPNmjW75grZcXFxstls6ty5swYOHKihQ4eqUaNGOn78eKHvinvzzTf1wAMPaPz48Xrsscf0yiuvqGvXrhoyZEiha4ndTSNHjlTfvn3Vt29f7dq1y2ns6rA5btw41atXT8uXL7+rfQ4ZMkR2u11/+tOfNHToUL388stq2LChdu/ebV5lulKXLl1Us2ZNJSQkKDIyUqNGjdLjjz+u5557Tp07d3aqb9++vfr166cffvhBDRs21IgRIzR48GA1btz4uqv1/+c//1Fubq7ThHvgRghVQDHSpk0b1a9fX5988kmh21999VX961//UkBAgObMmaOlS5eqdevW2rx58x1/x1nFihU1ZsyYa25/+umntW7dOrVp00b//ve/NX36dJ09e1YTJkzQ2rVr7+rnwbm7u2vlypXq37+/Dh48qPfff18//fST/v73v2vatGmF7tOxY0ctXbpUNWvWNOeP/eUvf1FSUpI8PDyc6kNCQrR582Z1797dnKd16tQpJSUlKSIi4k4/xev67LPPtHDhQi1cuNB8B93nn39ujh04cMCl/RWIjY3V3Llz5e/vby7W2rZtW6WkpBT6Llhvb2+tXr1aMTEx2rZtm+bMmaMLFy5ow4YN5lWsq3344YeaOnWqbDabZs2apa+//lpxcXGaMWPGNfv617/+JQ8PD/Xr18+iZ4r7hc0wDMPVTQD4//3jH//QwIEDtXHjxhL31nwUTXJystq3b68FCxY43Sbt27evFi5cKP6pvjvOnDmjqlWr6qmnntL8+fNd3Q5KGK5UAcVM37599dBDD2ny5MmubgW477z77ru6fPmyXn/9dVe3ghKIUAUUM+7u7po/f75atmx5S4tlArh9/v7++vjjj/XAAw+4uhWUQKxTBRRDBROtAdxdw4cPd3ULKMEIVQDgYtWqVdOkSZMK/ZDfmJgYVatW7a73BODWMVEdAADAAlypuovy8/N17NgxlS9f/pof2wAAAIoXwzB09uxZhYaGOq0HeCVC1V107NgxhYWFuboNAABQBEePH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AwAKEKgAAAAsQqgAAACxAqAIAALAAoQoAAMAChCoAAAALEKoAAAAsQKgCAACwAKEKAADAAoQqAAAACxCqAAAALECoAgAAsAChCgAAwAKEKgAAAAsQqgAAACxAqAIAALAAoQoAAMAChCoAAAALFClUdejQQVlZWU7jdrtdHTp0uN2eAAAASpwihark5GTl5eU5jV+4cEH/+c9/brspAACAkqbUrRT/+OOP5p9/+uknpaenm19fvnxZiYmJeuCBB6zrDgAAoIS4pVDVuHFj2Ww22Wy2Qm/zeXt76/3337esOQAAgJLilkLV4cOHZRiGatSooW3btikgIMDc5uHhocDAQLm7u1veJAAAQHF3S6GqatWqkqT8/Pw70gwAAEBJdUuh6kr79+/XunXrdOLECaeQNXHixNtuDAAAoCQpUqj68MMP9dJLL6lSpUoKDg6WzWYzt9lsNkIVAAC47xQpVE2ZMkVvvPGGxowZY3U/AAAAJVKR1qk6c+aMnn76aat7AQAAKLGKFKqefvppffvtt1b3AgAAUGIV6fZfrVq1NGHCBG3ZskUNGzZU6dKlHbYPHTrUkuYAAABKiiJdqZo3b57KlSun9evXa9asWZo+fbr5mDFjxk0fZ8OGDXriiScUGhoqm82mFStWOGzv27evudhowaNTp04ONadPn1bv3r3l4+MjPz8/DRgwQOfOnXOo+fHHH9W6dWt5eXkpLCxM06ZNc+pl2bJlqlu3rry8vNSwYUN99dVXDtsNw9DEiRMVEhIib29vRUZGav/+/Tf9XAEAwL2tSKHq8OHD13wcOnTopo+Tk5OjRo0aafbs2des6dSpk44fP24+Pv30U4ftvXv31p49e5SUlKSVK1dqw4YNev75583tdrtdHTt2VNWqVZWamqq3335b8fHxmjdvnlmzefNm9ezZUwMGDNCOHTsUExOjmJgY7d6926yZNm2a3nvvPc2dO1dbt25V2bJlFRUVpQsXLtz08wUAAPcum2EYhqubkP5YimH58uWKiYkxx/r27ausrCynK1gFfv75Z9WvX1/fffedmjZtKklKTExU586d9euvvyo0NFRz5szRq6++qvT0dHl4eEiSxo4dqxUrVmjv3r2SpO7duysnJ0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PzK3S/8uXLKyEhQaGhodq1a5cGDRqk8uXLa/To0ZKk3r17609/+pPmzJkjd3d37dy5U6VLl5YkxcbGKi8vTxs2bFDZsmX1008/qVy5cnfsOQK48whVAO57Bw4ckGEYqlu37i3tN378ePPP1apV08iRI7V48WIzVKWlpWnUqFHmcWvXrm3Wp6WlqVu3bmrYsKEkqUaNGrf7NAC4GLf/ANz3DMMo0n5LlixRy5YtFRwcrHLlymn8+PFKS0szt8fFxWngwIGKjIzUm2++qYMHD5rbhg4dqilTpqhly5aaNGmSfvzxx9t+HgBci1AF4L5Xu3Zt2Wy2W5qMnpKSot69e6tz585auXKlduzYoVdffVV5eXlmTXx8vPbs2aPo6GitXbtW9evX1/LlyyVJAwcO1KFDh/Tss89q165datq0qd5//33LnxuAu8dmFPW/aABwD3nssce0a9cu7du3z2leVVZWlvz8/GSz2bR8+XLFxMTonXfe0QcffOBw9WngwIH67LPPlJWVVeg5evbsqZycHP3v//6v07Zx48Zp1apVXLECSjCuVAGApNmzZ+vy5ctq3ry5Pv/8c+3fv18///yz3nvvPUVERDjV165dW2lpaVq8eLEOHjyo9957z7wKJUnnz5/X4MGDlZycrF9++UWbNm3Sd999p3r16kmShg0bpm+++UaHDx/W9u3btW7dOnMbgJKJieoAoD8mim/fvl1vvPGGRowYoePHjysgIEBNmjTRnDlznOr/+te/avjw4Ro8eLByc3MVHR2tCRMmKD4+XpLk7u6uU6dO6bnnnlNGRoYqVaqkJ598UpMnT5YkXb58WbGxsfr111/l4+OjTp06afr06XfzKQOwGLf/AAAALMDtPwAAAAsQqgAAACxAqAIAALAAoQoAAMAChCoAAAALEKoAAAAsQKgCAACwAKEKAADAAoQqAAAACxCqAAAALECoAgAAsAChCgAAwAL/H/hX4bTXp01yAAAAAElFTkSuQmCC\n",
|
| 348 |
-
"text/plain": [
|
| 349 |
-
"<Figure size 640x480 with 1 Axes>"
|
| 350 |
-
]
|
| 351 |
-
},
|
| 352 |
-
"metadata": {},
|
| 353 |
-
"output_type": "display_data"
|
| 354 |
-
}
|
| 355 |
-
],
|
| 356 |
"source": [
|
| 357 |
"colors = [\"#0101DF\", \"#DF0101\"]\n",
|
| 358 |
"\n",
|
|
@@ -420,7 +409,7 @@
|
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"cell_type": "code",
|
| 423 |
-
"execution_count":
|
| 424 |
"metadata": {
|
| 425 |
"execution": {
|
| 426 |
"iopub.execute_input": "2023-07-13T08:43:35.113910Z",
|
|
@@ -544,7 +533,7 @@
|
|
| 544 |
"4 45355.430437 "
|
| 545 |
]
|
| 546 |
},
|
| 547 |
-
"execution_count":
|
| 548 |
"metadata": {},
|
| 549 |
"output_type": "execute_result"
|
| 550 |
}
|
|
@@ -840,7 +829,7 @@
|
|
| 840 |
},
|
| 841 |
{
|
| 842 |
"cell_type": "code",
|
| 843 |
-
"execution_count":
|
| 844 |
"metadata": {
|
| 845 |
"execution": {
|
| 846 |
"iopub.execute_input": "2023-07-13T08:52:28.333770Z",
|
|
@@ -907,7 +896,7 @@
|
|
| 907 |
},
|
| 908 |
{
|
| 909 |
"cell_type": "code",
|
| 910 |
-
"execution_count":
|
| 911 |
"metadata": {
|
| 912 |
"execution": {
|
| 913 |
"iopub.execute_input": "2023-07-13T08:56:56.658604Z",
|
|
@@ -924,11 +913,11 @@
|
|
| 924 |
"text": [
|
| 925 |
"No Frauds 99.83 % of the dataset\n",
|
| 926 |
"Frauds 0.17 % of the dataset\n",
|
| 927 |
-
"Train: [
|
| 928 |
-
"Train: [ 0 1 2 ... 284804 284805 284806] Test: [
|
| 929 |
-
"Train: [ 0 1 2 ... 284804 284805 284806] Test: [
|
| 930 |
-
"Train: [ 0 1 2 ... 284804 284805 284806] Test: [
|
| 931 |
-
"Train: [ 0 1 2 ...
|
| 932 |
"----------------------------------------------------------------------------------------------------\n",
|
| 933 |
"Label Distributions: \n",
|
| 934 |
"\n",
|
|
@@ -978,7 +967,7 @@
|
|
| 978 |
},
|
| 979 |
{
|
| 980 |
"cell_type": "code",
|
| 981 |
-
"execution_count":
|
| 982 |
"metadata": {
|
| 983 |
"execution": {
|
| 984 |
"iopub.execute_input": "2023-07-13T08:56:56.989037Z",
|
|
@@ -1035,122 +1024,122 @@
|
|
| 1035 |
" </thead>\n",
|
| 1036 |
" <tbody>\n",
|
| 1037 |
" <tr>\n",
|
| 1038 |
-
" <th>
|
| 1039 |
-
" <td>
|
| 1040 |
-
" <td
|
| 1041 |
-
" <td
|
| 1042 |
-
" <td
|
| 1043 |
-
" <td
|
| 1044 |
-
" <td>-0.
|
| 1045 |
-
" <td
|
| 1046 |
-
" <td
|
| 1047 |
-
" <td>0.
|
| 1048 |
-
" <td
|
| 1049 |
" <td>...</td>\n",
|
| 1050 |
-
" <td>0.
|
| 1051 |
-
" <td>0.
|
| 1052 |
-
" <td
|
| 1053 |
-
" <td>-0.
|
| 1054 |
-
" <td>-0.
|
| 1055 |
-
" <td
|
| 1056 |
-
" <td
|
| 1057 |
-
" <td>-0.
|
| 1058 |
-
" <td>
|
| 1059 |
" <td>0</td>\n",
|
| 1060 |
" </tr>\n",
|
| 1061 |
" <tr>\n",
|
| 1062 |
-
" <th>
|
| 1063 |
-
" <td>
|
| 1064 |
-
" <td
|
| 1065 |
-
" <td>
|
| 1066 |
-
" <td>-
|
| 1067 |
-
" <td>
|
| 1068 |
-
" <td>-
|
| 1069 |
-
" <td>-
|
| 1070 |
-
" <td>-3.
|
| 1071 |
-
" <td>1.
|
| 1072 |
-
" <td>-
|
| 1073 |
" <td>...</td>\n",
|
| 1074 |
-
" <td>
|
| 1075 |
-
" <td>0.
|
| 1076 |
-
" <td
|
| 1077 |
-
" <td>-0.
|
| 1078 |
-
" <td
|
| 1079 |
-
" <td
|
| 1080 |
-
" <td>0.
|
| 1081 |
-
" <td>0.
|
| 1082 |
-
" <td>
|
| 1083 |
" <td>1</td>\n",
|
| 1084 |
" </tr>\n",
|
| 1085 |
" <tr>\n",
|
| 1086 |
-
" <th>
|
| 1087 |
-
" <td>
|
| 1088 |
-
" <td>-
|
| 1089 |
-
" <td>0.
|
| 1090 |
-
" <td>1.
|
| 1091 |
-
" <td
|
| 1092 |
-
" <td
|
| 1093 |
-
" <td>-0.
|
| 1094 |
-
" <td
|
| 1095 |
-
" <td
|
| 1096 |
-
" <td
|
| 1097 |
" <td>...</td>\n",
|
| 1098 |
-
" <td
|
| 1099 |
-
" <td>0.
|
| 1100 |
-
" <td>-0.
|
| 1101 |
-
" <td>0.
|
| 1102 |
-
" <td
|
| 1103 |
-
" <td
|
| 1104 |
-
" <td
|
| 1105 |
-
" <td
|
| 1106 |
-
" <td>
|
| 1107 |
" <td>0</td>\n",
|
| 1108 |
" </tr>\n",
|
| 1109 |
" <tr>\n",
|
| 1110 |
-
" <th>
|
| 1111 |
-
" <td>
|
| 1112 |
-
" <td>-
|
| 1113 |
-
" <td>
|
| 1114 |
-
" <td>-
|
| 1115 |
-
" <td
|
| 1116 |
-
" <td>
|
| 1117 |
-
" <td>-
|
| 1118 |
-
" <td
|
| 1119 |
-
" <td
|
| 1120 |
-
" <td>-
|
| 1121 |
" <td>...</td>\n",
|
| 1122 |
-
" <td>0.
|
| 1123 |
-
" <td
|
| 1124 |
-
" <td>-0.
|
| 1125 |
-
" <td>-0.
|
| 1126 |
-
" <td>1.
|
| 1127 |
-
" <td
|
| 1128 |
-
" <td
|
| 1129 |
-
" <td
|
| 1130 |
-
" <td>
|
| 1131 |
" <td>1</td>\n",
|
| 1132 |
" </tr>\n",
|
| 1133 |
" <tr>\n",
|
| 1134 |
-
" <th>
|
| 1135 |
-
" <td>
|
| 1136 |
-
" <td>-
|
| 1137 |
-
" <td>
|
| 1138 |
-
" <td>-
|
| 1139 |
-
" <td>
|
| 1140 |
-
" <td>-
|
| 1141 |
-
" <td>-
|
| 1142 |
-
" <td>-
|
| 1143 |
-
" <td>
|
| 1144 |
-
" <td>-2.
|
| 1145 |
" <td>...</td>\n",
|
| 1146 |
-
" <td>
|
| 1147 |
-
" <td>-
|
| 1148 |
-
" <td>-0.
|
| 1149 |
-
" <td
|
| 1150 |
-
" <td>0.
|
| 1151 |
-
" <td>-0.
|
| 1152 |
-
" <td>1.
|
| 1153 |
-
" <td>0.
|
| 1154 |
" <td>99.99</td>\n",
|
| 1155 |
" <td>1</td>\n",
|
| 1156 |
" </tr>\n",
|
|
@@ -1160,31 +1149,38 @@
|
|
| 1160 |
"</div>"
|
| 1161 |
],
|
| 1162 |
"text/plain": [
|
| 1163 |
-
" Time
|
| 1164 |
-
"
|
| 1165 |
-
"
|
| 1166 |
-
"
|
| 1167 |
-
"
|
| 1168 |
-
"
|
| 1169 |
"\n",
|
| 1170 |
-
" V7
|
| 1171 |
-
"
|
| 1172 |
-
"
|
| 1173 |
-
"
|
| 1174 |
-
"
|
| 1175 |
-
"
|
| 1176 |
"\n",
|
| 1177 |
-
" V24 V25 V26 V27 V28 Amount
|
| 1178 |
-
"
|
| 1179 |
-
"
|
| 1180 |
-
"
|
| 1181 |
-
"
|
| 1182 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1183 |
"\n",
|
| 1184 |
"[5 rows x 31 columns]"
|
| 1185 |
]
|
| 1186 |
},
|
| 1187 |
-
"execution_count":
|
| 1188 |
"metadata": {},
|
| 1189 |
"output_type": "execute_result"
|
| 1190 |
}
|
|
@@ -1204,7 +1200,7 @@
|
|
| 1204 |
},
|
| 1205 |
{
|
| 1206 |
"cell_type": "code",
|
| 1207 |
-
"execution_count":
|
| 1208 |
"metadata": {
|
| 1209 |
"execution": {
|
| 1210 |
"iopub.execute_input": "2023-07-13T08:56:58.495789Z",
|
|
@@ -1242,8 +1238,9 @@
|
|
| 1242 |
"print(new_df['Class'].value_counts()/len(new_df))\n",
|
| 1243 |
"\n",
|
| 1244 |
"\n",
|
| 1245 |
-
"# fix --- need keyword of arguments\n",
|
| 1246 |
"# sns.countplot('Class', data=new_df, palette=colors)\n",
|
|
|
|
| 1247 |
"sns.countplot(data=new_df,x='Class', palette=colors)\n",
|
| 1248 |
"\n",
|
| 1249 |
"plt.title('Equally Distributed Classes', fontsize=14)\n",
|
|
|
|
| 331 |
},
|
| 332 |
{
|
| 333 |
"cell_type": "code",
|
| 334 |
+
"execution_count": null,
|
| 335 |
"metadata": {
|
| 336 |
"execution": {
|
| 337 |
"iopub.execute_input": "2023-07-13T08:43:31.099091Z",
|
|
|
|
| 341 |
"shell.execute_reply.started": "2023-07-13T08:43:31.099063Z"
|
| 342 |
}
|
| 343 |
},
|
| 344 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 345 |
"source": [
|
| 346 |
"colors = [\"#0101DF\", \"#DF0101\"]\n",
|
| 347 |
"\n",
|
|
|
|
| 409 |
},
|
| 410 |
{
|
| 411 |
"cell_type": "code",
|
| 412 |
+
"execution_count": 3,
|
| 413 |
"metadata": {
|
| 414 |
"execution": {
|
| 415 |
"iopub.execute_input": "2023-07-13T08:43:35.113910Z",
|
|
|
|
| 533 |
"4 45355.430437 "
|
| 534 |
]
|
| 535 |
},
|
| 536 |
+
"execution_count": 3,
|
| 537 |
"metadata": {},
|
| 538 |
"output_type": "execute_result"
|
| 539 |
}
|
|
|
|
| 829 |
},
|
| 830 |
{
|
| 831 |
"cell_type": "code",
|
| 832 |
+
"execution_count": 4,
|
| 833 |
"metadata": {
|
| 834 |
"execution": {
|
| 835 |
"iopub.execute_input": "2023-07-13T08:52:28.333770Z",
|
|
|
|
| 896 |
},
|
| 897 |
{
|
| 898 |
"cell_type": "code",
|
| 899 |
+
"execution_count": 5,
|
| 900 |
"metadata": {
|
| 901 |
"execution": {
|
| 902 |
"iopub.execute_input": "2023-07-13T08:56:56.658604Z",
|
|
|
|
| 913 |
"text": [
|
| 914 |
"No Frauds 99.83 % of the dataset\n",
|
| 915 |
"Frauds 0.17 % of the dataset\n",
|
| 916 |
+
"Train: [ 30473 30496 31002 ... 284804 284805 284806] Test: [ 0 1 2 ... 57017 57018 57019]\n",
|
| 917 |
+
"Train: [ 0 1 2 ... 284804 284805 284806] Test: [ 30473 30496 31002 ... 113964 113965 113966]\n",
|
| 918 |
+
"Train: [ 0 1 2 ... 284804 284805 284806] Test: [ 81609 82400 83053 ... 170946 170947 170948]\n",
|
| 919 |
+
"Train: [ 0 1 2 ... 284804 284805 284806] Test: [150654 150660 150661 ... 227866 227867 227868]\n",
|
| 920 |
+
"Train: [ 0 1 2 ... 227866 227867 227868] Test: [212516 212644 213092 ... 284804 284805 284806]\n",
|
| 921 |
"----------------------------------------------------------------------------------------------------\n",
|
| 922 |
"Label Distributions: \n",
|
| 923 |
"\n",
|
|
|
|
| 967 |
},
|
| 968 |
{
|
| 969 |
"cell_type": "code",
|
| 970 |
+
"execution_count": 6,
|
| 971 |
"metadata": {
|
| 972 |
"execution": {
|
| 973 |
"iopub.execute_input": "2023-07-13T08:56:56.989037Z",
|
|
|
|
| 1024 |
" </thead>\n",
|
| 1025 |
" <tbody>\n",
|
| 1026 |
" <tr>\n",
|
| 1027 |
+
" <th>217092</th>\n",
|
| 1028 |
+
" <td>140758.0</td>\n",
|
| 1029 |
+
" <td>2.096099</td>\n",
|
| 1030 |
+
" <td>-0.844180</td>\n",
|
| 1031 |
+
" <td>-1.203557</td>\n",
|
| 1032 |
+
" <td>-0.712270</td>\n",
|
| 1033 |
+
" <td>-0.800583</td>\n",
|
| 1034 |
+
" <td>-0.561321</td>\n",
|
| 1035 |
+
" <td>-1.091436</td>\n",
|
| 1036 |
+
" <td>0.097218</td>\n",
|
| 1037 |
+
" <td>0.041781</td>\n",
|
| 1038 |
" <td>...</td>\n",
|
| 1039 |
+
" <td>0.262719</td>\n",
|
| 1040 |
+
" <td>0.741864</td>\n",
|
| 1041 |
+
" <td>0.069487</td>\n",
|
| 1042 |
+
" <td>-0.532429</td>\n",
|
| 1043 |
+
" <td>-0.202224</td>\n",
|
| 1044 |
+
" <td>-0.077787</td>\n",
|
| 1045 |
+
" <td>0.017431</td>\n",
|
| 1046 |
+
" <td>-0.027308</td>\n",
|
| 1047 |
+
" <td>24.99</td>\n",
|
| 1048 |
" <td>0</td>\n",
|
| 1049 |
" </tr>\n",
|
| 1050 |
" <tr>\n",
|
| 1051 |
+
" <th>208651</th>\n",
|
| 1052 |
+
" <td>137211.0</td>\n",
|
| 1053 |
+
" <td>0.630579</td>\n",
|
| 1054 |
+
" <td>1.183631</td>\n",
|
| 1055 |
+
" <td>-5.066283</td>\n",
|
| 1056 |
+
" <td>2.179903</td>\n",
|
| 1057 |
+
" <td>-0.703376</td>\n",
|
| 1058 |
+
" <td>-0.103614</td>\n",
|
| 1059 |
+
" <td>-3.490350</td>\n",
|
| 1060 |
+
" <td>1.094734</td>\n",
|
| 1061 |
+
" <td>-0.717418</td>\n",
|
| 1062 |
" <td>...</td>\n",
|
| 1063 |
+
" <td>0.621622</td>\n",
|
| 1064 |
+
" <td>0.043807</td>\n",
|
| 1065 |
+
" <td>0.102711</td>\n",
|
| 1066 |
+
" <td>-0.601505</td>\n",
|
| 1067 |
+
" <td>0.127371</td>\n",
|
| 1068 |
+
" <td>-0.163009</td>\n",
|
| 1069 |
+
" <td>0.853792</td>\n",
|
| 1070 |
+
" <td>0.356503</td>\n",
|
| 1071 |
+
" <td>39.45</td>\n",
|
| 1072 |
" <td>1</td>\n",
|
| 1073 |
" </tr>\n",
|
| 1074 |
" <tr>\n",
|
| 1075 |
+
" <th>71974</th>\n",
|
| 1076 |
+
" <td>54515.0</td>\n",
|
| 1077 |
+
" <td>-1.502966</td>\n",
|
| 1078 |
+
" <td>0.066880</td>\n",
|
| 1079 |
+
" <td>1.481635</td>\n",
|
| 1080 |
+
" <td>1.299962</td>\n",
|
| 1081 |
+
" <td>1.302369</td>\n",
|
| 1082 |
+
" <td>-0.793982</td>\n",
|
| 1083 |
+
" <td>0.655119</td>\n",
|
| 1084 |
+
" <td>-0.525607</td>\n",
|
| 1085 |
+
" <td>-0.432044</td>\n",
|
| 1086 |
" <td>...</td>\n",
|
| 1087 |
+
" <td>-0.139194</td>\n",
|
| 1088 |
+
" <td>0.208491</td>\n",
|
| 1089 |
+
" <td>-0.781711</td>\n",
|
| 1090 |
+
" <td>0.143014</td>\n",
|
| 1091 |
+
" <td>0.623358</td>\n",
|
| 1092 |
+
" <td>-0.113667</td>\n",
|
| 1093 |
+
" <td>-0.109330</td>\n",
|
| 1094 |
+
" <td>-0.190860</td>\n",
|
| 1095 |
+
" <td>80.00</td>\n",
|
| 1096 |
" <td>0</td>\n",
|
| 1097 |
" </tr>\n",
|
| 1098 |
" <tr>\n",
|
| 1099 |
+
" <th>6717</th>\n",
|
| 1100 |
+
" <td>8408.0</td>\n",
|
| 1101 |
+
" <td>-1.813280</td>\n",
|
| 1102 |
+
" <td>4.917851</td>\n",
|
| 1103 |
+
" <td>-5.926130</td>\n",
|
| 1104 |
+
" <td>5.701500</td>\n",
|
| 1105 |
+
" <td>1.204393</td>\n",
|
| 1106 |
+
" <td>-3.035138</td>\n",
|
| 1107 |
+
" <td>-1.713402</td>\n",
|
| 1108 |
+
" <td>0.561257</td>\n",
|
| 1109 |
+
" <td>-3.796354</td>\n",
|
| 1110 |
" <td>...</td>\n",
|
| 1111 |
+
" <td>0.615642</td>\n",
|
| 1112 |
+
" <td>-0.406427</td>\n",
|
| 1113 |
+
" <td>-0.737018</td>\n",
|
| 1114 |
+
" <td>-0.279642</td>\n",
|
| 1115 |
+
" <td>1.106766</td>\n",
|
| 1116 |
+
" <td>0.323885</td>\n",
|
| 1117 |
+
" <td>0.894767</td>\n",
|
| 1118 |
+
" <td>0.569519</td>\n",
|
| 1119 |
+
" <td>1.00</td>\n",
|
| 1120 |
" <td>1</td>\n",
|
| 1121 |
" </tr>\n",
|
| 1122 |
" <tr>\n",
|
| 1123 |
+
" <th>14170</th>\n",
|
| 1124 |
+
" <td>25198.0</td>\n",
|
| 1125 |
+
" <td>-15.903635</td>\n",
|
| 1126 |
+
" <td>10.393917</td>\n",
|
| 1127 |
+
" <td>-19.133602</td>\n",
|
| 1128 |
+
" <td>6.185969</td>\n",
|
| 1129 |
+
" <td>-12.538021</td>\n",
|
| 1130 |
+
" <td>-4.027030</td>\n",
|
| 1131 |
+
" <td>-13.897827</td>\n",
|
| 1132 |
+
" <td>10.662252</td>\n",
|
| 1133 |
+
" <td>-2.844954</td>\n",
|
| 1134 |
" <td>...</td>\n",
|
| 1135 |
+
" <td>1.577548</td>\n",
|
| 1136 |
+
" <td>-1.280137</td>\n",
|
| 1137 |
+
" <td>-0.601295</td>\n",
|
| 1138 |
+
" <td>0.040404</td>\n",
|
| 1139 |
+
" <td>0.995502</td>\n",
|
| 1140 |
+
" <td>-0.273743</td>\n",
|
| 1141 |
+
" <td>1.688136</td>\n",
|
| 1142 |
+
" <td>0.527831</td>\n",
|
| 1143 |
" <td>99.99</td>\n",
|
| 1144 |
" <td>1</td>\n",
|
| 1145 |
" </tr>\n",
|
|
|
|
| 1149 |
"</div>"
|
| 1150 |
],
|
| 1151 |
"text/plain": [
|
| 1152 |
+
" Time V1 V2 V3 V4 V5 \\\n",
|
| 1153 |
+
"217092 140758.0 2.096099 -0.844180 -1.203557 -0.712270 -0.800583 \n",
|
| 1154 |
+
"208651 137211.0 0.630579 1.183631 -5.066283 2.179903 -0.703376 \n",
|
| 1155 |
+
"71974 54515.0 -1.502966 0.066880 1.481635 1.299962 1.302369 \n",
|
| 1156 |
+
"6717 8408.0 -1.813280 4.917851 -5.926130 5.701500 1.204393 \n",
|
| 1157 |
+
"14170 25198.0 -15.903635 10.393917 -19.133602 6.185969 -12.538021 \n",
|
| 1158 |
"\n",
|
| 1159 |
+
" V6 V7 V8 V9 ... V21 V22 \\\n",
|
| 1160 |
+
"217092 -0.561321 -1.091436 0.097218 0.041781 ... 0.262719 0.741864 \n",
|
| 1161 |
+
"208651 -0.103614 -3.490350 1.094734 -0.717418 ... 0.621622 0.043807 \n",
|
| 1162 |
+
"71974 -0.793982 0.655119 -0.525607 -0.432044 ... -0.139194 0.208491 \n",
|
| 1163 |
+
"6717 -3.035138 -1.713402 0.561257 -3.796354 ... 0.615642 -0.406427 \n",
|
| 1164 |
+
"14170 -4.027030 -13.897827 10.662252 -2.844954 ... 1.577548 -1.280137 \n",
|
| 1165 |
"\n",
|
| 1166 |
+
" V23 V24 V25 V26 V27 V28 Amount \\\n",
|
| 1167 |
+
"217092 0.069487 -0.532429 -0.202224 -0.077787 0.017431 -0.027308 24.99 \n",
|
| 1168 |
+
"208651 0.102711 -0.601505 0.127371 -0.163009 0.853792 0.356503 39.45 \n",
|
| 1169 |
+
"71974 -0.781711 0.143014 0.623358 -0.113667 -0.109330 -0.190860 80.00 \n",
|
| 1170 |
+
"6717 -0.737018 -0.279642 1.106766 0.323885 0.894767 0.569519 1.00 \n",
|
| 1171 |
+
"14170 -0.601295 0.040404 0.995502 -0.273743 1.688136 0.527831 99.99 \n",
|
| 1172 |
+
"\n",
|
| 1173 |
+
" Class \n",
|
| 1174 |
+
"217092 0 \n",
|
| 1175 |
+
"208651 1 \n",
|
| 1176 |
+
"71974 0 \n",
|
| 1177 |
+
"6717 1 \n",
|
| 1178 |
+
"14170 1 \n",
|
| 1179 |
"\n",
|
| 1180 |
"[5 rows x 31 columns]"
|
| 1181 |
]
|
| 1182 |
},
|
| 1183 |
+
"execution_count": 6,
|
| 1184 |
"metadata": {},
|
| 1185 |
"output_type": "execute_result"
|
| 1186 |
}
|
|
|
|
| 1200 |
},
|
| 1201 |
{
|
| 1202 |
"cell_type": "code",
|
| 1203 |
+
"execution_count": 8,
|
| 1204 |
"metadata": {
|
| 1205 |
"execution": {
|
| 1206 |
"iopub.execute_input": "2023-07-13T08:56:58.495789Z",
|
|
|
|
| 1238 |
"print(new_df['Class'].value_counts()/len(new_df))\n",
|
| 1239 |
"\n",
|
| 1240 |
"\n",
|
| 1241 |
+
"# fix 2 --- need keyword of arguments\n",
|
| 1242 |
"# sns.countplot('Class', data=new_df, palette=colors)\n",
|
| 1243 |
+
"colors = [\"#0101DF\", \"#DF0101\"]\n",
|
| 1244 |
"sns.countplot(data=new_df,x='Class', palette=colors)\n",
|
| 1245 |
"\n",
|
| 1246 |
"plt.title('Equally Distributed Classes', fontsize=14)\n",
|
benchmark/pandas_11/pandas_11_reproduced.ipynb
CHANGED
|
@@ -331,7 +331,7 @@
|
|
| 331 |
},
|
| 332 |
{
|
| 333 |
"cell_type": "code",
|
| 334 |
-
"execution_count":
|
| 335 |
"metadata": {
|
| 336 |
"execution": {
|
| 337 |
"iopub.execute_input": "2023-07-13T08:43:31.099091Z",
|
|
@@ -341,18 +341,7 @@
|
|
| 341 |
"shell.execute_reply.started": "2023-07-13T08:43:31.099063Z"
|
| 342 |
}
|
| 343 |
},
|
| 344 |
-
"outputs": [
|
| 345 |
-
{
|
| 346 |
-
"data": {
|
| 347 |
-
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAlUAAAHeCAYAAACymf40AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABGBUlEQVR4nO3deXhN5/7//9dOyGBIImSsmClKOTVEjllzRKU9otqavq25U3CIuTVEqx+tnhYt5as9RM+pGtpDP6VNG0M4CNqgRcsxNloSMSSblARZvz/6zfrZdkyx2AnPx3Xt65J7vdda770j8rLWve9tMwzDEAAAAG6Lm6sbAAAAuBcQqgAAACxAqAIAALAAoQoAAMAChCoAAAALEKoAAAAsQKgCAACwAKEKAADAAoQqAAAACxCqADiIj4+XzWZTcnKyq1u549q1ayebzeaScyckJMhmsykhIcFh3GazqV27di7pSZL69u0rm82mI0eOuKwHoKQiVAH3gdTUVA0YMEC1a9dW2bJl5e3trZo1a+rZZ59VUlKSq9u7LQUhoOBRqlQpVahQQfXr11fv3r312WefKS8vz/LzJicny2azKT4+3vJj30nXCnMAbl8pVzcA4M7Jz8/XyJEjNX36dJUqVUodOnTQX//6V5UuXVqHDh3SqlWr9K9//UuvvfaaJkyY4Op2b8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ucf6b///e/tPoW76vjx49q7d+81by/fKVWrVtWBAwccrhpduHBBL730UqFriTVr1kyS8/pRn332WaFz/p599llJ0muvvaacnBxz/Lfffiv0amWBvLw87dixQ02bNuX2H24JoQooRrp27SpJSkpKctpWp04dxcfH67///a8aNWqkESNG6Pnnn1ebNm0k/bEu09WrqT/33HOqV6+etm3bdtu9FSw6WtiijD4+Pvrwww918eJFhYeHa8CAARo7dqyaNWumTz/9VM2bN9eoUaNuu4eb1bx5czVv3lxLly5VmzZtNHr0aPXo0UPNmjW75grZcXFxstls6ty5swYOHKihQ4eqUaNGOn78eKHvinvzzTf1wAMPaPz48Xrsscf0yiuvqGvXrhoyZEiha4ndTSNHjlTfvn3Vt29f7dq1y2ns6rA5btw41atXT8uXL7+rfQ4ZMkR2u11/+tOfNHToUL388stq2LChdu/ebV5lulKXLl1Us2ZNJSQkKDIyUqNGjdLjjz+u5557Tp07d3aqb9++vfr166cffvhBDRs21IgRIzR48GA1btz4uqv1/+c//1Fubq7ThHvgRghVQDHSpk0b1a9fX5988kmh21999VX961//UkBAgObMmaOlS5eqdevW2rx58x1/x1nFihU1ZsyYa25/+umntW7dOrVp00b//ve/NX36dJ09e1YTJkzQ2rVr7+rnwbm7u2vlypXq37+/Dh48qPfff18//fST/v73v2vatGmF7tOxY0ctXbpUNWvWNOeP/eUvf1FSUpI8PDyc6kNCQrR582Z1797dnKd16tQpJSUlKSIi4k4/xev67LPPtHDhQi1cuNB8B93nn39ujh04cMCl/RWIjY3V3Llz5e/vby7W2rZtW6WkpBT6Llhvb2+tXr1aMTEx2rZtm+bMmaMLFy5ow4YN5lWsq3344YeaOnWqbDabZs2apa+//lpxcXGaMWPGNfv617/+JQ8PD/Xr18+iZ4r7hc0wDMPVTQD4//3jH//QwIEDtXHjxhL31nwUTXJystq3b68FCxY43Sbt27evFi5cKP6pvjvOnDmjqlWr6qmnntL8+fNd3Q5KGK5UAcVM37599dBDD2ny5MmubgW477z77ru6fPmyXn/9dVe3ghKIUAUU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AADAAoQqAAAACxCqAAAALECoAgAAsAChCgAAwAL/H/hX4bTXp01yAAAAAElFTkSuQmCC\n",
|
| 348 |
-
"text/plain": [
|
| 349 |
-
"<Figure size 640x480 with 1 Axes>"
|
| 350 |
-
]
|
| 351 |
-
},
|
| 352 |
-
"metadata": {},
|
| 353 |
-
"output_type": "display_data"
|
| 354 |
-
}
|
| 355 |
-
],
|
| 356 |
"source": [
|
| 357 |
"colors = [\"#0101DF\", \"#DF0101\"]\n",
|
| 358 |
"\n",
|
|
@@ -420,7 +409,7 @@
|
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"cell_type": "code",
|
| 423 |
-
"execution_count":
|
| 424 |
"metadata": {
|
| 425 |
"execution": {
|
| 426 |
"iopub.execute_input": "2023-07-13T08:43:35.113910Z",
|
|
@@ -544,7 +533,7 @@
|
|
| 544 |
"4 45355.430437 "
|
| 545 |
]
|
| 546 |
},
|
| 547 |
-
"execution_count":
|
| 548 |
"metadata": {},
|
| 549 |
"output_type": "execute_result"
|
| 550 |
}
|
|
@@ -840,7 +829,7 @@
|
|
| 840 |
},
|
| 841 |
{
|
| 842 |
"cell_type": "code",
|
| 843 |
-
"execution_count":
|
| 844 |
"metadata": {
|
| 845 |
"execution": {
|
| 846 |
"iopub.execute_input": "2023-07-13T08:52:28.333770Z",
|
|
@@ -867,7 +856,7 @@
|
|
| 867 |
"\u001b[0;31mKeyError\u001b[0m: 'Hour'",
|
| 868 |
"\nThe above exception was the direct cause of the following exception:\n",
|
| 869 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 870 |
-
"\u001b[0;32m<ipython-input-
|
| 871 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3891\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnlevels\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3892\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_getitem_multilevel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3893\u001b[0;31m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3894\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mis_integer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mindexer\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3895\u001b[0m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mindexer\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 872 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36mget_loc\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3796\u001b[0m ):\n\u001b[1;32m 3797\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mInvalidIndexError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3798\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3799\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3800\u001b[0m \u001b[0;31m# If we have a listlike key, _check_indexing_error will raise\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 873 |
"\u001b[0;31mKeyError\u001b[0m: 'Hour'"
|
|
@@ -924,7 +913,7 @@
|
|
| 924 |
},
|
| 925 |
{
|
| 926 |
"cell_type": "code",
|
| 927 |
-
"execution_count":
|
| 928 |
"metadata": {
|
| 929 |
"execution": {
|
| 930 |
"iopub.execute_input": "2023-07-13T08:56:56.658604Z",
|
|
@@ -934,26 +923,7 @@
|
|
| 934 |
"shell.execute_reply.started": "2023-07-13T08:56:56.658531Z"
|
| 935 |
}
|
| 936 |
},
|
| 937 |
-
"outputs": [
|
| 938 |
-
{
|
| 939 |
-
"name": "stdout",
|
| 940 |
-
"output_type": "stream",
|
| 941 |
-
"text": [
|
| 942 |
-
"No Frauds 99.83 % of the dataset\n",
|
| 943 |
-
"Frauds 0.17 % of the dataset\n",
|
| 944 |
-
"Train: [ 30473 30496 31002 ... 284804 284805 284806] Test: [ 0 1 2 ... 57017 57018 57019]\n",
|
| 945 |
-
"Train: [ 0 1 2 ... 284804 284805 284806] Test: [ 30473 30496 31002 ... 113964 113965 113966]\n",
|
| 946 |
-
"Train: [ 0 1 2 ... 284804 284805 284806] Test: [ 81609 82400 83053 ... 170946 170947 170948]\n",
|
| 947 |
-
"Train: [ 0 1 2 ... 284804 284805 284806] Test: [150654 150660 150661 ... 227866 227867 227868]\n",
|
| 948 |
-
"Train: [ 0 1 2 ... 227866 227867 227868] Test: [212516 212644 213092 ... 284804 284805 284806]\n",
|
| 949 |
-
"----------------------------------------------------------------------------------------------------\n",
|
| 950 |
-
"Label Distributions: \n",
|
| 951 |
-
"\n",
|
| 952 |
-
"[0.99827076 0.00172924]\n",
|
| 953 |
-
"[0.99827952 0.00172048]\n"
|
| 954 |
-
]
|
| 955 |
-
}
|
| 956 |
-
],
|
| 957 |
"source": [
|
| 958 |
"from sklearn.model_selection import train_test_split\n",
|
| 959 |
"from sklearn.model_selection import StratifiedShuffleSplit\n",
|
|
@@ -995,7 +965,7 @@
|
|
| 995 |
},
|
| 996 |
{
|
| 997 |
"cell_type": "code",
|
| 998 |
-
"execution_count":
|
| 999 |
"metadata": {
|
| 1000 |
"execution": {
|
| 1001 |
"iopub.execute_input": "2023-07-13T08:56:56.989037Z",
|
|
@@ -1005,207 +975,7 @@
|
|
| 1005 |
"shell.execute_reply.started": "2023-07-13T08:56:56.989005Z"
|
| 1006 |
}
|
| 1007 |
},
|
| 1008 |
-
"outputs": [
|
| 1009 |
-
{
|
| 1010 |
-
"data": {
|
| 1011 |
-
"text/html": [
|
| 1012 |
-
"<div>\n",
|
| 1013 |
-
"<style scoped>\n",
|
| 1014 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 1015 |
-
" vertical-align: middle;\n",
|
| 1016 |
-
" }\n",
|
| 1017 |
-
"\n",
|
| 1018 |
-
" .dataframe tbody tr th {\n",
|
| 1019 |
-
" vertical-align: top;\n",
|
| 1020 |
-
" }\n",
|
| 1021 |
-
"\n",
|
| 1022 |
-
" .dataframe thead th {\n",
|
| 1023 |
-
" text-align: right;\n",
|
| 1024 |
-
" }\n",
|
| 1025 |
-
"</style>\n",
|
| 1026 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 1027 |
-
" <thead>\n",
|
| 1028 |
-
" <tr style=\"text-align: right;\">\n",
|
| 1029 |
-
" <th></th>\n",
|
| 1030 |
-
" <th>Time</th>\n",
|
| 1031 |
-
" <th>V1</th>\n",
|
| 1032 |
-
" <th>V2</th>\n",
|
| 1033 |
-
" <th>V3</th>\n",
|
| 1034 |
-
" <th>V4</th>\n",
|
| 1035 |
-
" <th>V5</th>\n",
|
| 1036 |
-
" <th>V6</th>\n",
|
| 1037 |
-
" <th>V7</th>\n",
|
| 1038 |
-
" <th>V8</th>\n",
|
| 1039 |
-
" <th>V9</th>\n",
|
| 1040 |
-
" <th>...</th>\n",
|
| 1041 |
-
" <th>V21</th>\n",
|
| 1042 |
-
" <th>V22</th>\n",
|
| 1043 |
-
" <th>V23</th>\n",
|
| 1044 |
-
" <th>V24</th>\n",
|
| 1045 |
-
" <th>V25</th>\n",
|
| 1046 |
-
" <th>V26</th>\n",
|
| 1047 |
-
" <th>V27</th>\n",
|
| 1048 |
-
" <th>V28</th>\n",
|
| 1049 |
-
" <th>Amount</th>\n",
|
| 1050 |
-
" <th>Class</th>\n",
|
| 1051 |
-
" </tr>\n",
|
| 1052 |
-
" </thead>\n",
|
| 1053 |
-
" <tbody>\n",
|
| 1054 |
-
" <tr>\n",
|
| 1055 |
-
" <th>105142</th>\n",
|
| 1056 |
-
" <td>69383.0</td>\n",
|
| 1057 |
-
" <td>-0.142983</td>\n",
|
| 1058 |
-
" <td>-0.664989</td>\n",
|
| 1059 |
-
" <td>1.738824</td>\n",
|
| 1060 |
-
" <td>-1.850861</td>\n",
|
| 1061 |
-
" <td>-1.700378</td>\n",
|
| 1062 |
-
" <td>-0.533451</td>\n",
|
| 1063 |
-
" <td>-0.289359</td>\n",
|
| 1064 |
-
" <td>-0.081633</td>\n",
|
| 1065 |
-
" <td>-2.168893</td>\n",
|
| 1066 |
-
" <td>...</td>\n",
|
| 1067 |
-
" <td>0.065756</td>\n",
|
| 1068 |
-
" <td>0.391033</td>\n",
|
| 1069 |
-
" <td>0.104155</td>\n",
|
| 1070 |
-
" <td>0.366195</td>\n",
|
| 1071 |
-
" <td>-0.057220</td>\n",
|
| 1072 |
-
" <td>-0.145840</td>\n",
|
| 1073 |
-
" <td>0.042170</td>\n",
|
| 1074 |
-
" <td>0.038780</td>\n",
|
| 1075 |
-
" <td>107.00</td>\n",
|
| 1076 |
-
" <td>0</td>\n",
|
| 1077 |
-
" </tr>\n",
|
| 1078 |
-
" <tr>\n",
|
| 1079 |
-
" <th>263274</th>\n",
|
| 1080 |
-
" <td>160870.0</td>\n",
|
| 1081 |
-
" <td>-0.644278</td>\n",
|
| 1082 |
-
" <td>5.002352</td>\n",
|
| 1083 |
-
" <td>-8.252739</td>\n",
|
| 1084 |
-
" <td>7.756915</td>\n",
|
| 1085 |
-
" <td>-0.216267</td>\n",
|
| 1086 |
-
" <td>-2.751496</td>\n",
|
| 1087 |
-
" <td>-3.358857</td>\n",
|
| 1088 |
-
" <td>1.406268</td>\n",
|
| 1089 |
-
" <td>-4.403852</td>\n",
|
| 1090 |
-
" <td>...</td>\n",
|
| 1091 |
-
" <td>0.587728</td>\n",
|
| 1092 |
-
" <td>-0.605759</td>\n",
|
| 1093 |
-
" <td>0.033746</td>\n",
|
| 1094 |
-
" <td>-0.756170</td>\n",
|
| 1095 |
-
" <td>-0.008172</td>\n",
|
| 1096 |
-
" <td>0.532772</td>\n",
|
| 1097 |
-
" <td>0.663970</td>\n",
|
| 1098 |
-
" <td>0.192067</td>\n",
|
| 1099 |
-
" <td>0.77</td>\n",
|
| 1100 |
-
" <td>1</td>\n",
|
| 1101 |
-
" </tr>\n",
|
| 1102 |
-
" <tr>\n",
|
| 1103 |
-
" <th>199062</th>\n",
|
| 1104 |
-
" <td>132793.0</td>\n",
|
| 1105 |
-
" <td>-1.200649</td>\n",
|
| 1106 |
-
" <td>0.859778</td>\n",
|
| 1107 |
-
" <td>-1.414095</td>\n",
|
| 1108 |
-
" <td>-1.148850</td>\n",
|
| 1109 |
-
" <td>0.680327</td>\n",
|
| 1110 |
-
" <td>-0.177575</td>\n",
|
| 1111 |
-
" <td>0.525039</td>\n",
|
| 1112 |
-
" <td>0.614912</td>\n",
|
| 1113 |
-
" <td>0.021296</td>\n",
|
| 1114 |
-
" <td>...</td>\n",
|
| 1115 |
-
" <td>-0.140027</td>\n",
|
| 1116 |
-
" <td>-0.345108</td>\n",
|
| 1117 |
-
" <td>-0.205411</td>\n",
|
| 1118 |
-
" <td>-0.106861</td>\n",
|
| 1119 |
-
" <td>0.157973</td>\n",
|
| 1120 |
-
" <td>-0.148159</td>\n",
|
| 1121 |
-
" <td>-0.168336</td>\n",
|
| 1122 |
-
" <td>-0.403640</td>\n",
|
| 1123 |
-
" <td>49.00</td>\n",
|
| 1124 |
-
" <td>0</td>\n",
|
| 1125 |
-
" </tr>\n",
|
| 1126 |
-
" <tr>\n",
|
| 1127 |
-
" <th>86155</th>\n",
|
| 1128 |
-
" <td>61108.0</td>\n",
|
| 1129 |
-
" <td>-2.756007</td>\n",
|
| 1130 |
-
" <td>0.683821</td>\n",
|
| 1131 |
-
" <td>-1.390169</td>\n",
|
| 1132 |
-
" <td>1.501887</td>\n",
|
| 1133 |
-
" <td>-1.165614</td>\n",
|
| 1134 |
-
" <td>-0.131207</td>\n",
|
| 1135 |
-
" <td>-1.478741</td>\n",
|
| 1136 |
-
" <td>-0.246922</td>\n",
|
| 1137 |
-
" <td>-0.100523</td>\n",
|
| 1138 |
-
" <td>...</td>\n",
|
| 1139 |
-
" <td>0.320474</td>\n",
|
| 1140 |
-
" <td>0.611027</td>\n",
|
| 1141 |
-
" <td>0.174864</td>\n",
|
| 1142 |
-
" <td>-0.502151</td>\n",
|
| 1143 |
-
" <td>-0.174713</td>\n",
|
| 1144 |
-
" <td>1.179242</td>\n",
|
| 1145 |
-
" <td>-1.166315</td>\n",
|
| 1146 |
-
" <td>0.821215</td>\n",
|
| 1147 |
-
" <td>101.50</td>\n",
|
| 1148 |
-
" <td>1</td>\n",
|
| 1149 |
-
" </tr>\n",
|
| 1150 |
-
" <tr>\n",
|
| 1151 |
-
" <th>140786</th>\n",
|
| 1152 |
-
" <td>83934.0</td>\n",
|
| 1153 |
-
" <td>-0.433222</td>\n",
|
| 1154 |
-
" <td>2.428379</td>\n",
|
| 1155 |
-
" <td>-3.996454</td>\n",
|
| 1156 |
-
" <td>4.871299</td>\n",
|
| 1157 |
-
" <td>-1.796308</td>\n",
|
| 1158 |
-
" <td>-0.586868</td>\n",
|
| 1159 |
-
" <td>-4.654543</td>\n",
|
| 1160 |
-
" <td>1.285230</td>\n",
|
| 1161 |
-
" <td>-2.743539</td>\n",
|
| 1162 |
-
" <td>...</td>\n",
|
| 1163 |
-
" <td>0.713559</td>\n",
|
| 1164 |
-
" <td>-0.408954</td>\n",
|
| 1165 |
-
" <td>-0.320890</td>\n",
|
| 1166 |
-
" <td>-0.804230</td>\n",
|
| 1167 |
-
" <td>0.962852</td>\n",
|
| 1168 |
-
" <td>0.199558</td>\n",
|
| 1169 |
-
" <td>1.094533</td>\n",
|
| 1170 |
-
" <td>0.541148</td>\n",
|
| 1171 |
-
" <td>1.00</td>\n",
|
| 1172 |
-
" <td>1</td>\n",
|
| 1173 |
-
" </tr>\n",
|
| 1174 |
-
" </tbody>\n",
|
| 1175 |
-
"</table>\n",
|
| 1176 |
-
"<p>5 rows × 31 columns</p>\n",
|
| 1177 |
-
"</div>"
|
| 1178 |
-
],
|
| 1179 |
-
"text/plain": [
|
| 1180 |
-
" Time V1 V2 V3 V4 V5 V6 \\\n",
|
| 1181 |
-
"105142 69383.0 -0.142983 -0.664989 1.738824 -1.850861 -1.700378 -0.533451 \n",
|
| 1182 |
-
"263274 160870.0 -0.644278 5.002352 -8.252739 7.756915 -0.216267 -2.751496 \n",
|
| 1183 |
-
"199062 132793.0 -1.200649 0.859778 -1.414095 -1.148850 0.680327 -0.177575 \n",
|
| 1184 |
-
"86155 61108.0 -2.756007 0.683821 -1.390169 1.501887 -1.165614 -0.131207 \n",
|
| 1185 |
-
"140786 83934.0 -0.433222 2.428379 -3.996454 4.871299 -1.796308 -0.586868 \n",
|
| 1186 |
-
"\n",
|
| 1187 |
-
" V7 V8 V9 ... V21 V22 V23 \\\n",
|
| 1188 |
-
"105142 -0.289359 -0.081633 -2.168893 ... 0.065756 0.391033 0.104155 \n",
|
| 1189 |
-
"263274 -3.358857 1.406268 -4.403852 ... 0.587728 -0.605759 0.033746 \n",
|
| 1190 |
-
"199062 0.525039 0.614912 0.021296 ... -0.140027 -0.345108 -0.205411 \n",
|
| 1191 |
-
"86155 -1.478741 -0.246922 -0.100523 ... 0.320474 0.611027 0.174864 \n",
|
| 1192 |
-
"140786 -4.654543 1.285230 -2.743539 ... 0.713559 -0.408954 -0.320890 \n",
|
| 1193 |
-
"\n",
|
| 1194 |
-
" V24 V25 V26 V27 V28 Amount Class \n",
|
| 1195 |
-
"105142 0.366195 -0.057220 -0.145840 0.042170 0.038780 107.00 0 \n",
|
| 1196 |
-
"263274 -0.756170 -0.008172 0.532772 0.663970 0.192067 0.77 1 \n",
|
| 1197 |
-
"199062 -0.106861 0.157973 -0.148159 -0.168336 -0.403640 49.00 0 \n",
|
| 1198 |
-
"86155 -0.502151 -0.174713 1.179242 -1.166315 0.821215 101.50 1 \n",
|
| 1199 |
-
"140786 -0.804230 0.962852 0.199558 1.094533 0.541148 1.00 1 \n",
|
| 1200 |
-
"\n",
|
| 1201 |
-
"[5 rows x 31 columns]"
|
| 1202 |
-
]
|
| 1203 |
-
},
|
| 1204 |
-
"execution_count": 7,
|
| 1205 |
-
"metadata": {},
|
| 1206 |
-
"output_type": "execute_result"
|
| 1207 |
-
}
|
| 1208 |
-
],
|
| 1209 |
"source": [
|
| 1210 |
"df = df.sample(frac=1)\n",
|
| 1211 |
"\n",
|
|
@@ -1221,7 +991,7 @@
|
|
| 1221 |
},
|
| 1222 |
{
|
| 1223 |
"cell_type": "code",
|
| 1224 |
-
"execution_count":
|
| 1225 |
"metadata": {
|
| 1226 |
"execution": {
|
| 1227 |
"iopub.execute_input": "2023-07-13T08:56:58.495789Z",
|
|
@@ -1231,30 +1001,7 @@
|
|
| 1231 |
"shell.execute_reply.started": "2023-07-13T08:56:58.495748Z"
|
| 1232 |
}
|
| 1233 |
},
|
| 1234 |
-
"outputs": [
|
| 1235 |
-
{
|
| 1236 |
-
"name": "stdout",
|
| 1237 |
-
"output_type": "stream",
|
| 1238 |
-
"text": [
|
| 1239 |
-
"Distribution of the Classes in the subsample dataset\n",
|
| 1240 |
-
"Class\n",
|
| 1241 |
-
"0 0.5\n",
|
| 1242 |
-
"1 0.5\n",
|
| 1243 |
-
"Name: count, dtype: float64\n"
|
| 1244 |
-
]
|
| 1245 |
-
},
|
| 1246 |
-
{
|
| 1247 |
-
"ename": "TypeError",
|
| 1248 |
-
"evalue": "countplot() got multiple values for argument 'data'",
|
| 1249 |
-
"output_type": "error",
|
| 1250 |
-
"traceback": [
|
| 1251 |
-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1252 |
-
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
|
| 1253 |
-
"\u001b[0;32m<ipython-input-8-ca6a74a77f36>\u001b[0m in \u001b[0;36m<cell line: 6>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0msns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcountplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Class'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_df\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpalette\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcolors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtitle\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Equally Distributed Classes'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfontsize\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m14\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshow\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1254 |
-
"\u001b[0;31mTypeError\u001b[0m: countplot() got multiple values for argument 'data'"
|
| 1255 |
-
]
|
| 1256 |
-
}
|
| 1257 |
-
],
|
| 1258 |
"source": [
|
| 1259 |
"print('Distribution of the Classes in the subsample dataset')\n",
|
| 1260 |
"print(new_df['Class'].value_counts()/len(new_df))\n",
|
|
|
|
| 331 |
},
|
| 332 |
{
|
| 333 |
"cell_type": "code",
|
| 334 |
+
"execution_count": null,
|
| 335 |
"metadata": {
|
| 336 |
"execution": {
|
| 337 |
"iopub.execute_input": "2023-07-13T08:43:31.099091Z",
|
|
|
|
| 341 |
"shell.execute_reply.started": "2023-07-13T08:43:31.099063Z"
|
| 342 |
}
|
| 343 |
},
|
| 344 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 345 |
"source": [
|
| 346 |
"colors = [\"#0101DF\", \"#DF0101\"]\n",
|
| 347 |
"\n",
|
|
|
|
| 409 |
},
|
| 410 |
{
|
| 411 |
"cell_type": "code",
|
| 412 |
+
"execution_count": 3,
|
| 413 |
"metadata": {
|
| 414 |
"execution": {
|
| 415 |
"iopub.execute_input": "2023-07-13T08:43:35.113910Z",
|
|
|
|
| 533 |
"4 45355.430437 "
|
| 534 |
]
|
| 535 |
},
|
| 536 |
+
"execution_count": 3,
|
| 537 |
"metadata": {},
|
| 538 |
"output_type": "execute_result"
|
| 539 |
}
|
|
|
|
| 829 |
},
|
| 830 |
{
|
| 831 |
"cell_type": "code",
|
| 832 |
+
"execution_count": 4,
|
| 833 |
"metadata": {
|
| 834 |
"execution": {
|
| 835 |
"iopub.execute_input": "2023-07-13T08:52:28.333770Z",
|
|
|
|
| 856 |
"\u001b[0;31mKeyError\u001b[0m: 'Hour'",
|
| 857 |
"\nThe above exception was the direct cause of the following exception:\n",
|
| 858 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 859 |
+
"\u001b[0;32m<ipython-input-4-1bc6ab312785>\u001b[0m in \u001b[0;36m<cell line: 11>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0mi\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msubplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m8\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0msns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkdeplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt0\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mfeature\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbw\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.5\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mlabel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"Class = 0\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 15\u001b[0m \u001b[0msns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkdeplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt1\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mfeature\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbw\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.5\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mlabel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"Class = 1\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mxlabel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfeature\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfontsize\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m12\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 860 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3891\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnlevels\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3892\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_getitem_multilevel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3893\u001b[0;31m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3894\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mis_integer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mindexer\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3895\u001b[0m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mindexer\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 861 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36mget_loc\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3796\u001b[0m ):\n\u001b[1;32m 3797\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mInvalidIndexError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3798\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3799\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3800\u001b[0m \u001b[0;31m# If we have a listlike key, _check_indexing_error will raise\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 862 |
"\u001b[0;31mKeyError\u001b[0m: 'Hour'"
|
|
|
|
| 913 |
},
|
| 914 |
{
|
| 915 |
"cell_type": "code",
|
| 916 |
+
"execution_count": null,
|
| 917 |
"metadata": {
|
| 918 |
"execution": {
|
| 919 |
"iopub.execute_input": "2023-07-13T08:56:56.658604Z",
|
|
|
|
| 923 |
"shell.execute_reply.started": "2023-07-13T08:56:56.658531Z"
|
| 924 |
}
|
| 925 |
},
|
| 926 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 927 |
"source": [
|
| 928 |
"from sklearn.model_selection import train_test_split\n",
|
| 929 |
"from sklearn.model_selection import StratifiedShuffleSplit\n",
|
|
|
|
| 965 |
},
|
| 966 |
{
|
| 967 |
"cell_type": "code",
|
| 968 |
+
"execution_count": null,
|
| 969 |
"metadata": {
|
| 970 |
"execution": {
|
| 971 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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 979 |
"source": [
|
| 980 |
"df = df.sample(frac=1)\n",
|
| 981 |
"\n",
|
|
|
|
| 991 |
},
|
| 992 |
{
|
| 993 |
"cell_type": "code",
|
| 994 |
+
"execution_count": null,
|
| 995 |
"metadata": {
|
| 996 |
"execution": {
|
| 997 |
"iopub.execute_input": "2023-07-13T08:56:58.495789Z",
|
|
|
|
| 1001 |
"shell.execute_reply.started": "2023-07-13T08:56:58.495748Z"
|
| 1002 |
}
|
| 1003 |
},
|
| 1004 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1005 |
"source": [
|
| 1006 |
"print('Distribution of the Classes in the subsample dataset')\n",
|
| 1007 |
"print(new_df['Class'].value_counts()/len(new_df))\n",
|
benchmark/pandas_12/pandas_12_fixed.ipynb
CHANGED
|
@@ -222,7 +222,7 @@
|
|
| 222 |
},
|
| 223 |
{
|
| 224 |
"cell_type": "code",
|
| 225 |
-
"execution_count":
|
| 226 |
"metadata": {
|
| 227 |
"execution": {
|
| 228 |
"iopub.execute_input": "2023-12-15T14:49:11.184383Z",
|
|
@@ -232,18 +232,7 @@
|
|
| 232 |
"shell.execute_reply.started": "2023-12-15T14:49:11.184259Z"
|
| 233 |
}
|
| 234 |
},
|
| 235 |
-
"outputs": [
|
| 236 |
-
{
|
| 237 |
-
"data": {
|
| 238 |
-
"text/plain": [
|
| 239 |
-
"(375703, 16)"
|
| 240 |
-
]
|
| 241 |
-
},
|
| 242 |
-
"execution_count": 3,
|
| 243 |
-
"metadata": {},
|
| 244 |
-
"output_type": "execute_result"
|
| 245 |
-
}
|
| 246 |
-
],
|
| 247 |
"source": [
|
| 248 |
"df.shape"
|
| 249 |
]
|
|
@@ -294,7 +283,7 @@
|
|
| 294 |
},
|
| 295 |
{
|
| 296 |
"cell_type": "code",
|
| 297 |
-
"execution_count":
|
| 298 |
"metadata": {
|
| 299 |
"execution": {
|
| 300 |
"iopub.execute_input": "2023-12-15T15:07:27.714708Z",
|
|
@@ -331,7 +320,7 @@
|
|
| 331 |
},
|
| 332 |
{
|
| 333 |
"cell_type": "code",
|
| 334 |
-
"execution_count":
|
| 335 |
"metadata": {
|
| 336 |
"execution": {
|
| 337 |
"iopub.execute_input": "2023-12-15T15:07:30.113075Z",
|
|
@@ -400,7 +389,7 @@
|
|
| 400 |
},
|
| 401 |
{
|
| 402 |
"cell_type": "code",
|
| 403 |
-
"execution_count":
|
| 404 |
"metadata": {
|
| 405 |
"execution": {
|
| 406 |
"iopub.execute_input": "2023-12-15T15:07:37.208238Z",
|
|
@@ -457,7 +446,7 @@
|
|
| 457 |
},
|
| 458 |
{
|
| 459 |
"cell_type": "code",
|
| 460 |
-
"execution_count":
|
| 461 |
"metadata": {
|
| 462 |
"execution": {
|
| 463 |
"iopub.execute_input": "2023-12-15T15:07:49.912389Z",
|
|
@@ -480,7 +469,7 @@
|
|
| 480 |
},
|
| 481 |
{
|
| 482 |
"cell_type": "code",
|
| 483 |
-
"execution_count":
|
| 484 |
"metadata": {
|
| 485 |
"execution": {
|
| 486 |
"iopub.execute_input": "2023-12-15T15:07:53.138237Z",
|
|
@@ -497,7 +486,7 @@
|
|
| 497 |
"False"
|
| 498 |
]
|
| 499 |
},
|
| 500 |
-
"execution_count":
|
| 501 |
"metadata": {},
|
| 502 |
"output_type": "execute_result"
|
| 503 |
}
|
|
@@ -904,7 +893,7 @@
|
|
| 904 |
},
|
| 905 |
{
|
| 906 |
"cell_type": "code",
|
| 907 |
-
"execution_count":
|
| 908 |
"metadata": {
|
| 909 |
"execution": {
|
| 910 |
"iopub.execute_input": "2023-12-15T15:08:08.362107Z",
|
|
@@ -914,160 +903,7 @@
|
|
| 914 |
"shell.execute_reply.started": "2023-12-15T15:08:08.362069Z"
|
| 915 |
}
|
| 916 |
},
|
| 917 |
-
"outputs": [
|
| 918 |
-
{
|
| 919 |
-
"data": {
|
| 920 |
-
"text/html": [
|
| 921 |
-
"<div>\n",
|
| 922 |
-
"<style scoped>\n",
|
| 923 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 924 |
-
" vertical-align: middle;\n",
|
| 925 |
-
" }\n",
|
| 926 |
-
"\n",
|
| 927 |
-
" .dataframe tbody tr th {\n",
|
| 928 |
-
" vertical-align: top;\n",
|
| 929 |
-
" }\n",
|
| 930 |
-
"\n",
|
| 931 |
-
" .dataframe thead th {\n",
|
| 932 |
-
" text-align: right;\n",
|
| 933 |
-
" }\n",
|
| 934 |
-
"</style>\n",
|
| 935 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 936 |
-
" <thead>\n",
|
| 937 |
-
" <tr style=\"text-align: right;\">\n",
|
| 938 |
-
" <th></th>\n",
|
| 939 |
-
" <th>RecipeId</th>\n",
|
| 940 |
-
" <th>Name</th>\n",
|
| 941 |
-
" <th>CookTime</th>\n",
|
| 942 |
-
" <th>PrepTime</th>\n",
|
| 943 |
-
" <th>TotalTime</th>\n",
|
| 944 |
-
" <th>RecipeIngredientParts</th>\n",
|
| 945 |
-
" <th>Calories</th>\n",
|
| 946 |
-
" <th>FatContent</th>\n",
|
| 947 |
-
" <th>SaturatedFatContent</th>\n",
|
| 948 |
-
" <th>CholesterolContent</th>\n",
|
| 949 |
-
" <th>SodiumContent</th>\n",
|
| 950 |
-
" <th>CarbohydrateContent</th>\n",
|
| 951 |
-
" <th>FiberContent</th>\n",
|
| 952 |
-
" <th>SugarContent</th>\n",
|
| 953 |
-
" <th>ProteinContent</th>\n",
|
| 954 |
-
" <th>RecipeInstructions</th>\n",
|
| 955 |
-
" </tr>\n",
|
| 956 |
-
" </thead>\n",
|
| 957 |
-
" <tbody>\n",
|
| 958 |
-
" <tr>\n",
|
| 959 |
-
" <th>0</th>\n",
|
| 960 |
-
" <td>38.00</td>\n",
|
| 961 |
-
" <td>Low-Fat Berry Blue Frozen Dessert</td>\n",
|
| 962 |
-
" <td>1200</td>\n",
|
| 963 |
-
" <td>45</td>\n",
|
| 964 |
-
" <td>1485.00</td>\n",
|
| 965 |
-
" <td>c(\"blueberries\", \"granulated sugar\", \"vanilla ...</td>\n",
|
| 966 |
-
" <td>170.90</td>\n",
|
| 967 |
-
" <td>2.50</td>\n",
|
| 968 |
-
" <td>1.30</td>\n",
|
| 969 |
-
" <td>8.00</td>\n",
|
| 970 |
-
" <td>29.80</td>\n",
|
| 971 |
-
" <td>37.10</td>\n",
|
| 972 |
-
" <td>3.60</td>\n",
|
| 973 |
-
" <td>30.20</td>\n",
|
| 974 |
-
" <td>3.20</td>\n",
|
| 975 |
-
" <td>c(\"Toss 2 cups berries with sugar.\", \"Let stan...</td>\n",
|
| 976 |
-
" </tr>\n",
|
| 977 |
-
" <tr>\n",
|
| 978 |
-
" <th>1</th>\n",
|
| 979 |
-
" <td>41.00</td>\n",
|
| 980 |
-
" <td>Carina's Tofu-Vegetable Kebabs</td>\n",
|
| 981 |
-
" <td>20</td>\n",
|
| 982 |
-
" <td>600</td>\n",
|
| 983 |
-
" <td>1460.00</td>\n",
|
| 984 |
-
" <td>c(\"extra firm tofu\", \"eggplant\", \"zucchini\", \"...</td>\n",
|
| 985 |
-
" <td>536.10</td>\n",
|
| 986 |
-
" <td>24.00</td>\n",
|
| 987 |
-
" <td>3.80</td>\n",
|
| 988 |
-
" <td>0.00</td>\n",
|
| 989 |
-
" <td>1558.60</td>\n",
|
| 990 |
-
" <td>64.20</td>\n",
|
| 991 |
-
" <td>17.30</td>\n",
|
| 992 |
-
" <td>32.10</td>\n",
|
| 993 |
-
" <td>29.30</td>\n",
|
| 994 |
-
" <td>c(\"Drain the tofu, carefully squeezing out exc...</td>\n",
|
| 995 |
-
" </tr>\n",
|
| 996 |
-
" <tr>\n",
|
| 997 |
-
" <th>2</th>\n",
|
| 998 |
-
" <td>42.00</td>\n",
|
| 999 |
-
" <td>Cabbage Soup</td>\n",
|
| 1000 |
-
" <td>30</td>\n",
|
| 1001 |
-
" <td>20</td>\n",
|
| 1002 |
-
" <td>50.00</td>\n",
|
| 1003 |
-
" <td>c(\"plain tomato juice\", \"cabbage\", \"onion\", \"c...</td>\n",
|
| 1004 |
-
" <td>103.60</td>\n",
|
| 1005 |
-
" <td>0.40</td>\n",
|
| 1006 |
-
" <td>0.10</td>\n",
|
| 1007 |
-
" <td>0.00</td>\n",
|
| 1008 |
-
" <td>959.30</td>\n",
|
| 1009 |
-
" <td>25.10</td>\n",
|
| 1010 |
-
" <td>4.80</td>\n",
|
| 1011 |
-
" <td>17.70</td>\n",
|
| 1012 |
-
" <td>4.30</td>\n",
|
| 1013 |
-
" <td>c(\"Mix everything together and bring to a boil...</td>\n",
|
| 1014 |
-
" </tr>\n",
|
| 1015 |
-
" <tr>\n",
|
| 1016 |
-
" <th>3</th>\n",
|
| 1017 |
-
" <td>45.00</td>\n",
|
| 1018 |
-
" <td>Buttermilk Pie With Gingersnap Crumb Crust</td>\n",
|
| 1019 |
-
" <td>50</td>\n",
|
| 1020 |
-
" <td>30</td>\n",
|
| 1021 |
-
" <td>80.00</td>\n",
|
| 1022 |
-
" <td>c(\"sugar\", \"margarine\", \"egg\", \"flour\", \"salt\"...</td>\n",
|
| 1023 |
-
" <td>228.00</td>\n",
|
| 1024 |
-
" <td>7.10</td>\n",
|
| 1025 |
-
" <td>1.70</td>\n",
|
| 1026 |
-
" <td>24.50</td>\n",
|
| 1027 |
-
" <td>281.80</td>\n",
|
| 1028 |
-
" <td>37.50</td>\n",
|
| 1029 |
-
" <td>0.50</td>\n",
|
| 1030 |
-
" <td>24.70</td>\n",
|
| 1031 |
-
" <td>4.20</td>\n",
|
| 1032 |
-
" <td>c(\"Preheat oven to 350°F.\", \"Make pie crust, u...</td>\n",
|
| 1033 |
-
" </tr>\n",
|
| 1034 |
-
" <tr>\n",
|
| 1035 |
-
" <th>4</th>\n",
|
| 1036 |
-
" <td>46.00</td>\n",
|
| 1037 |
-
" <td>A Jad - Cucumber Pickle</td>\n",
|
| 1038 |
-
" <td>0</td>\n",
|
| 1039 |
-
" <td>25</td>\n",
|
| 1040 |
-
" <td>25.00</td>\n",
|
| 1041 |
-
" <td>c(\"rice vinegar\", \"haeo\")</td>\n",
|
| 1042 |
-
" <td>4.30</td>\n",
|
| 1043 |
-
" <td>0.00</td>\n",
|
| 1044 |
-
" <td>0.00</td>\n",
|
| 1045 |
-
" <td>0.00</td>\n",
|
| 1046 |
-
" <td>0.70</td>\n",
|
| 1047 |
-
" <td>1.10</td>\n",
|
| 1048 |
-
" <td>0.20</td>\n",
|
| 1049 |
-
" <td>0.20</td>\n",
|
| 1050 |
-
" <td>0.10</td>\n",
|
| 1051 |
-
" <td>c(\"Slice the cucumber in four lengthwise, then...</td>\n",
|
| 1052 |
-
" </tr>\n",
|
| 1053 |
-
" </tbody>\n",
|
| 1054 |
-
"</table>\n",
|
| 1055 |
-
"</div>"
|
| 1056 |
-
],
|
| 1057 |
-
"text/plain": [
|
| 1058 |
-
" RecipeId Name CookTime PrepTime TotalTime RecipeIngredientParts Calories FatContent SaturatedFatContent CholesterolContent SodiumContent CarbohydrateContent FiberContent SugarContent ProteinContent RecipeInstructions\n",
|
| 1059 |
-
"0 38.00 Low-Fat Berry Blue Frozen Dessert 1200 45 1485.00 c(\"blueberries\", \"granulated sugar\", \"vanilla ... 170.90 2.50 1.30 8.00 29.80 37.10 3.60 30.20 3.20 c(\"Toss 2 cups berries with sugar.\", \"Let stan...\n",
|
| 1060 |
-
"1 41.00 Carina's Tofu-Vegetable Kebabs 20 600 1460.00 c(\"extra firm tofu\", \"eggplant\", \"zucchini\", \"... 536.10 24.00 3.80 0.00 1558.60 64.20 17.30 32.10 29.30 c(\"Drain the tofu, carefully squeezing out exc...\n",
|
| 1061 |
-
"2 42.00 Cabbage Soup 30 20 50.00 c(\"plain tomato juice\", \"cabbage\", \"onion\", \"c... 103.60 0.40 0.10 0.00 959.30 25.10 4.80 17.70 4.30 c(\"Mix everything together and bring to a boil...\n",
|
| 1062 |
-
"3 45.00 Buttermilk Pie With Gingersnap Crumb Crust 50 30 80.00 c(\"sugar\", \"margarine\", \"egg\", \"flour\", \"salt\"... 228.00 7.10 1.70 24.50 281.80 37.50 0.50 24.70 4.20 c(\"Preheat oven to 350°F.\", \"Make pie crust, u...\n",
|
| 1063 |
-
"4 46.00 A Jad - Cucumber Pickle 0 25 25.00 c(\"rice vinegar\", \"haeo\") 4.30 0.00 0.00 0.00 0.70 1.10 0.20 0.20 0.10 c(\"Slice the cucumber in four lengthwise, then..."
|
| 1064 |
-
]
|
| 1065 |
-
},
|
| 1066 |
-
"execution_count": 9,
|
| 1067 |
-
"metadata": {},
|
| 1068 |
-
"output_type": "execute_result"
|
| 1069 |
-
}
|
| 1070 |
-
],
|
| 1071 |
"source": [
|
| 1072 |
"df.head()"
|
| 1073 |
]
|
|
@@ -1091,7 +927,7 @@
|
|
| 1091 |
},
|
| 1092 |
{
|
| 1093 |
"cell_type": "code",
|
| 1094 |
-
"execution_count":
|
| 1095 |
"metadata": {
|
| 1096 |
"execution": {
|
| 1097 |
"iopub.execute_input": "2023-12-15T15:08:16.614139Z",
|
|
@@ -1115,7 +951,7 @@
|
|
| 1115 |
},
|
| 1116 |
{
|
| 1117 |
"cell_type": "code",
|
| 1118 |
-
"execution_count":
|
| 1119 |
"metadata": {
|
| 1120 |
"execution": {
|
| 1121 |
"iopub.execute_input": "2023-12-15T15:08:11.060002Z",
|
|
@@ -1141,7 +977,7 @@
|
|
| 1141 |
},
|
| 1142 |
{
|
| 1143 |
"cell_type": "code",
|
| 1144 |
-
"execution_count":
|
| 1145 |
"metadata": {
|
| 1146 |
"execution": {
|
| 1147 |
"iopub.execute_input": "2023-12-15T15:08:20.283538Z",
|
|
@@ -1171,7 +1007,7 @@
|
|
| 1171 |
},
|
| 1172 |
{
|
| 1173 |
"cell_type": "code",
|
| 1174 |
-
"execution_count":
|
| 1175 |
"metadata": {
|
| 1176 |
"execution": {
|
| 1177 |
"iopub.execute_input": "2023-12-15T15:33:42.657241Z",
|
|
@@ -1205,7 +1041,7 @@
|
|
| 1205 |
},
|
| 1206 |
{
|
| 1207 |
"cell_type": "code",
|
| 1208 |
-
"execution_count":
|
| 1209 |
"metadata": {
|
| 1210 |
"execution": {
|
| 1211 |
"iopub.execute_input": "2023-12-15T15:12:35.466716Z",
|
|
@@ -1328,7 +1164,7 @@
|
|
| 1328 |
},
|
| 1329 |
{
|
| 1330 |
"cell_type": "code",
|
| 1331 |
-
"execution_count":
|
| 1332 |
"metadata": {
|
| 1333 |
"execution": {
|
| 1334 |
"iopub.execute_input": "2023-12-15T15:39:26.995591Z",
|
|
@@ -1345,7 +1181,7 @@
|
|
| 1345 |
},
|
| 1346 |
{
|
| 1347 |
"cell_type": "code",
|
| 1348 |
-
"execution_count":
|
| 1349 |
"metadata": {
|
| 1350 |
"execution": {
|
| 1351 |
"iopub.execute_input": "2023-12-15T15:39:30.884915Z",
|
|
@@ -1359,10 +1195,10 @@
|
|
| 1359 |
{
|
| 1360 |
"data": {
|
| 1361 |
"text/plain": [
|
| 1362 |
-
"array([
|
| 1363 |
]
|
| 1364 |
},
|
| 1365 |
-
"execution_count":
|
| 1366 |
"metadata": {},
|
| 1367 |
"output_type": "execute_result"
|
| 1368 |
}
|
|
@@ -1374,7 +1210,7 @@
|
|
| 1374 |
},
|
| 1375 |
{
|
| 1376 |
"cell_type": "code",
|
| 1377 |
-
"execution_count":
|
| 1378 |
"metadata": {
|
| 1379 |
"execution": {
|
| 1380 |
"iopub.execute_input": "2023-12-15T15:39:33.957001Z",
|
|
@@ -1442,7 +1278,7 @@
|
|
| 1442 |
" <td>30.20</td>\n",
|
| 1443 |
" <td>3.20</td>\n",
|
| 1444 |
" <td>c(\"Toss 2 cups berries with sugar.\", \"Let stan...</td>\n",
|
| 1445 |
-
" <td>
|
| 1446 |
" </tr>\n",
|
| 1447 |
" <tr>\n",
|
| 1448 |
" <th>1</th>\n",
|
|
@@ -1461,7 +1297,7 @@
|
|
| 1461 |
" <td>32.10</td>\n",
|
| 1462 |
" <td>29.30</td>\n",
|
| 1463 |
" <td>c(\"Drain the tofu, carefully squeezing out exc...</td>\n",
|
| 1464 |
-
" <td>
|
| 1465 |
" </tr>\n",
|
| 1466 |
" <tr>\n",
|
| 1467 |
" <th>2</th>\n",
|
|
@@ -1480,7 +1316,7 @@
|
|
| 1480 |
" <td>17.70</td>\n",
|
| 1481 |
" <td>4.30</td>\n",
|
| 1482 |
" <td>c(\"Mix everything together and bring to a boil...</td>\n",
|
| 1483 |
-
" <td>
|
| 1484 |
" </tr>\n",
|
| 1485 |
" <tr>\n",
|
| 1486 |
" <th>3</th>\n",
|
|
@@ -1499,7 +1335,7 @@
|
|
| 1499 |
" <td>24.70</td>\n",
|
| 1500 |
" <td>4.20</td>\n",
|
| 1501 |
" <td>c(\"Preheat oven to 350°F.\", \"Make pie crust, u...</td>\n",
|
| 1502 |
-
" <td>
|
| 1503 |
" </tr>\n",
|
| 1504 |
" <tr>\n",
|
| 1505 |
" <th>4</th>\n",
|
|
@@ -1518,7 +1354,7 @@
|
|
| 1518 |
" <td>0.20</td>\n",
|
| 1519 |
" <td>0.10</td>\n",
|
| 1520 |
" <td>c(\"Slice the cucumber in four lengthwise, then...</td>\n",
|
| 1521 |
-
" <td>
|
| 1522 |
" </tr>\n",
|
| 1523 |
" </tbody>\n",
|
| 1524 |
"</table>\n",
|
|
@@ -1526,14 +1362,14 @@
|
|
| 1526 |
],
|
| 1527 |
"text/plain": [
|
| 1528 |
" Name CookTime PrepTime TotalTime RecipeIngredientParts Calories FatContent SaturatedFatContent CholesterolContent SodiumContent CarbohydrateContent FiberContent SugarContent ProteinContent RecipeInstructions kmeans_cluster\n",
|
| 1529 |
-
"0 Low-Fat Berry Blue Frozen Dessert 1200 45 1485.00 c(\"blueberries\", \"granulated sugar\", \"vanilla ... 170.90 2.50 1.30 8.00 29.80 37.10 3.60 30.20 3.20 c(\"Toss 2 cups berries with sugar.\", \"Let stan...
|
| 1530 |
-
"1 Carina's Tofu-Vegetable Kebabs 20 600 1460.00 c(\"extra firm tofu\", \"eggplant\", \"zucchini\", \"... 536.10 24.00 3.80 0.00 1558.60 64.20 17.30 32.10 29.30 c(\"Drain the tofu, carefully squeezing out exc...
|
| 1531 |
-
"2 Cabbage Soup 30 20 50.00 c(\"plain tomato juice\", \"cabbage\", \"onion\", \"c... 103.60 0.40 0.10 0.00 959.30 25.10 4.80 17.70 4.30 c(\"Mix everything together and bring to a boil...
|
| 1532 |
-
"3 Buttermilk Pie With Gingersnap Crumb Crust 50 30 80.00 c(\"sugar\", \"margarine\", \"egg\", \"flour\", \"salt\"... 228.00 7.10 1.70 24.50 281.80 37.50 0.50 24.70 4.20 c(\"Preheat oven to 350°F.\", \"Make pie crust, u...
|
| 1533 |
-
"4 A Jad - Cucumber Pickle 0 25 25.00 c(\"rice vinegar\", \"haeo\") 4.30 0.00 0.00 0.00 0.70 1.10 0.20 0.20 0.10 c(\"Slice the cucumber in four lengthwise, then...
|
| 1534 |
]
|
| 1535 |
},
|
| 1536 |
-
"execution_count":
|
| 1537 |
"metadata": {},
|
| 1538 |
"output_type": "execute_result"
|
| 1539 |
}
|
|
@@ -1563,7 +1399,7 @@
|
|
| 1563 |
},
|
| 1564 |
{
|
| 1565 |
"cell_type": "code",
|
| 1566 |
-
"execution_count":
|
| 1567 |
"metadata": {
|
| 1568 |
"execution": {
|
| 1569 |
"iopub.execute_input": "2023-12-15T15:39:45.812785Z",
|
|
@@ -1573,49 +1409,7 @@
|
|
| 1573 |
"shell.execute_reply.started": "2023-12-15T15:39:45.812755Z"
|
| 1574 |
}
|
| 1575 |
},
|
| 1576 |
-
"outputs": [
|
| 1577 |
-
{
|
| 1578 |
-
"data": {
|
| 1579 |
-
"text/plain": [
|
| 1580 |
-
"kmeans_cluster\n",
|
| 1581 |
-
"1 39609\n",
|
| 1582 |
-
"17 37812\n",
|
| 1583 |
-
"14 28694\n",
|
| 1584 |
-
"25 28350\n",
|
| 1585 |
-
"16 28011\n",
|
| 1586 |
-
"11 22610\n",
|
| 1587 |
-
"8 19120\n",
|
| 1588 |
-
"5 18189\n",
|
| 1589 |
-
"28 17199\n",
|
| 1590 |
-
"18 17199\n",
|
| 1591 |
-
"9 15456\n",
|
| 1592 |
-
"21 12824\n",
|
| 1593 |
-
"24 12747\n",
|
| 1594 |
-
"12 11706\n",
|
| 1595 |
-
"3 10654\n",
|
| 1596 |
-
"15 10040\n",
|
| 1597 |
-
"6 8629\n",
|
| 1598 |
-
"20 6746\n",
|
| 1599 |
-
"27 6377\n",
|
| 1600 |
-
"7 5329\n",
|
| 1601 |
-
"10 3543\n",
|
| 1602 |
-
"30 2921\n",
|
| 1603 |
-
"23 2587\n",
|
| 1604 |
-
"19 2454\n",
|
| 1605 |
-
"2 2453\n",
|
| 1606 |
-
"29 1298\n",
|
| 1607 |
-
"26 1263\n",
|
| 1608 |
-
"4 807\n",
|
| 1609 |
-
"22 663\n",
|
| 1610 |
-
"13 413\n",
|
| 1611 |
-
"Name: count, dtype: int64"
|
| 1612 |
-
]
|
| 1613 |
-
},
|
| 1614 |
-
"execution_count": 18,
|
| 1615 |
-
"metadata": {},
|
| 1616 |
-
"output_type": "execute_result"
|
| 1617 |
-
}
|
| 1618 |
-
],
|
| 1619 |
"source": [
|
| 1620 |
"df[\"kmeans_cluster\"].value_counts()"
|
| 1621 |
]
|
|
@@ -1717,7 +1511,7 @@
|
|
| 1717 |
},
|
| 1718 |
{
|
| 1719 |
"cell_type": "code",
|
| 1720 |
-
"execution_count":
|
| 1721 |
"metadata": {
|
| 1722 |
"execution": {
|
| 1723 |
"iopub.execute_input": "2023-12-15T15:03:01.714109Z",
|
|
@@ -1800,615 +1594,615 @@
|
|
| 1800 |
" <tbody>\n",
|
| 1801 |
" <tr>\n",
|
| 1802 |
" <th>1</th>\n",
|
| 1803 |
-
" <td>
|
| 1804 |
-
" <td>
|
| 1805 |
-
" <td>
|
| 1806 |
-
" <td>
|
| 1807 |
-
" <td>
|
| 1808 |
-
" <td>
|
| 1809 |
-
" <td>
|
| 1810 |
-
" <td>
|
| 1811 |
-
" <td>
|
| 1812 |
-
" <td>
|
| 1813 |
-
" <td>
|
| 1814 |
-
" <td>
|
| 1815 |
-
" <td>
|
| 1816 |
-
" <td>11.
|
| 1817 |
-
" <td>11.
|
| 1818 |
-
" <td>
|
| 1819 |
" </tr>\n",
|
| 1820 |
" <tr>\n",
|
| 1821 |
" <th>2</th>\n",
|
| 1822 |
-
" <td>
|
| 1823 |
-
" <td>
|
| 1824 |
" <td>15.00</td>\n",
|
| 1825 |
-
" <td>
|
| 1826 |
-
" <td>
|
| 1827 |
-
" <td>
|
| 1828 |
-
" <td>
|
| 1829 |
-
" <td>
|
| 1830 |
-
" <td>
|
| 1831 |
-
" <td>
|
| 1832 |
-
" <td>
|
| 1833 |
-
" <td>
|
| 1834 |
-
" <td>
|
| 1835 |
-
" <td>
|
| 1836 |
-
" <td>
|
| 1837 |
-
" <td>
|
| 1838 |
" </tr>\n",
|
| 1839 |
" <tr>\n",
|
| 1840 |
" <th>3</th>\n",
|
| 1841 |
-
" <td>
|
| 1842 |
-
" <td>
|
| 1843 |
" <td>15.00</td>\n",
|
| 1844 |
-
" <td>
|
| 1845 |
-
" <td>
|
| 1846 |
-
" <td>
|
| 1847 |
" <td>45.00</td>\n",
|
| 1848 |
-
" <td>
|
| 1849 |
-
" <td>
|
| 1850 |
-
" <td>
|
| 1851 |
-
" <td>
|
| 1852 |
-
" <td>
|
| 1853 |
-
" <td>
|
| 1854 |
-
" <td>
|
| 1855 |
-
" <td>
|
| 1856 |
-
" <td>
|
| 1857 |
" </tr>\n",
|
| 1858 |
" <tr>\n",
|
| 1859 |
" <th>4</th>\n",
|
| 1860 |
-
" <td>
|
| 1861 |
-
" <td>
|
| 1862 |
-
" <td>
|
| 1863 |
-
" <td>
|
| 1864 |
-
" <td>
|
| 1865 |
-
" <td>
|
| 1866 |
-
" <td>
|
| 1867 |
-
" <td>
|
| 1868 |
-
" <td>
|
| 1869 |
-
" <td>
|
| 1870 |
-
" <td>
|
| 1871 |
-
" <td>
|
| 1872 |
-
" <td>
|
| 1873 |
-
" <td>
|
| 1874 |
-
" <td>
|
| 1875 |
-
" <td>
|
| 1876 |
" </tr>\n",
|
| 1877 |
" <tr>\n",
|
| 1878 |
" <th>5</th>\n",
|
| 1879 |
-
" <td>
|
| 1880 |
-
" <td>16.
|
| 1881 |
" <td>15.00</td>\n",
|
| 1882 |
-
" <td>
|
| 1883 |
-
" <td>
|
| 1884 |
-
" <td>
|
| 1885 |
" <td>30.00</td>\n",
|
| 1886 |
-
" <td>
|
| 1887 |
-
" <td>
|
| 1888 |
-
" <td>
|
| 1889 |
-
" <td>
|
| 1890 |
-
" <td>
|
| 1891 |
-
" <td>
|
| 1892 |
-
" <td>5.
|
| 1893 |
-
" <td>
|
| 1894 |
-
" <td>
|
| 1895 |
" </tr>\n",
|
| 1896 |
" <tr>\n",
|
| 1897 |
" <th>6</th>\n",
|
| 1898 |
-
" <td>
|
| 1899 |
-
" <td>
|
| 1900 |
" <td>15.00</td>\n",
|
| 1901 |
-
" <td>
|
| 1902 |
-
" <td>
|
| 1903 |
-
" <td>
|
| 1904 |
-
" <td>
|
| 1905 |
-
" <td>
|
| 1906 |
-
" <td>
|
| 1907 |
-
" <td>
|
| 1908 |
-
" <td>
|
| 1909 |
-
" <td>
|
| 1910 |
-
" <td>
|
| 1911 |
-
" <td>14.
|
| 1912 |
-
" <td>
|
| 1913 |
-
" <td>
|
| 1914 |
" </tr>\n",
|
| 1915 |
" <tr>\n",
|
| 1916 |
" <th>7</th>\n",
|
| 1917 |
-
" <td>
|
| 1918 |
-
" <td>
|
| 1919 |
" <td>15.00</td>\n",
|
| 1920 |
-
" <td>
|
| 1921 |
-
" <td>
|
| 1922 |
-
" <td>
|
| 1923 |
-
" <td>
|
| 1924 |
-
" <td>
|
| 1925 |
-
" <td>
|
| 1926 |
-
" <td>
|
| 1927 |
-
" <td>
|
| 1928 |
-
" <td>
|
| 1929 |
-
" <td>
|
| 1930 |
-
" <td>
|
| 1931 |
-
" <td>
|
| 1932 |
-
" <td>
|
| 1933 |
" </tr>\n",
|
| 1934 |
" <tr>\n",
|
| 1935 |
" <th>8</th>\n",
|
| 1936 |
-
" <td>
|
| 1937 |
-
" <td>
|
| 1938 |
" <td>15.00</td>\n",
|
| 1939 |
-
" <td>
|
| 1940 |
-
" <td>
|
| 1941 |
-
" <td>
|
| 1942 |
-
" <td>
|
| 1943 |
-
" <td>
|
| 1944 |
-
" <td>
|
| 1945 |
-
" <td>
|
| 1946 |
-
" <td>
|
| 1947 |
-
" <td>
|
| 1948 |
-
" <td>
|
| 1949 |
-
" <td>
|
| 1950 |
-
" <td>
|
| 1951 |
-
" <td>
|
| 1952 |
" </tr>\n",
|
| 1953 |
" <tr>\n",
|
| 1954 |
" <th>9</th>\n",
|
| 1955 |
-
" <td>
|
| 1956 |
-
" <td>
|
| 1957 |
" <td>15.00</td>\n",
|
| 1958 |
-
" <td>
|
| 1959 |
-
" <td>
|
| 1960 |
-
" <td>
|
| 1961 |
-
" <td>
|
| 1962 |
-
" <td>
|
| 1963 |
-
" <td>
|
| 1964 |
-
" <td>
|
| 1965 |
-
" <td>
|
| 1966 |
-
" <td>
|
| 1967 |
-
" <td>
|
| 1968 |
-
" <td>
|
| 1969 |
-
" <td>
|
| 1970 |
-
" <td>
|
| 1971 |
" </tr>\n",
|
| 1972 |
" <tr>\n",
|
| 1973 |
" <th>10</th>\n",
|
| 1974 |
-
" <td>
|
| 1975 |
-
" <td>
|
| 1976 |
" <td>15.00</td>\n",
|
| 1977 |
-
" <td>
|
| 1978 |
-
" <td>
|
| 1979 |
-
" <td>
|
| 1980 |
-
" <td>
|
| 1981 |
-
" <td>
|
| 1982 |
-
" <td>
|
| 1983 |
-
" <td>
|
| 1984 |
-
" <td>
|
| 1985 |
-
" <td>
|
| 1986 |
-
" <td>
|
| 1987 |
-
" <td>
|
| 1988 |
-
" <td>
|
| 1989 |
-
" <td>
|
| 1990 |
" </tr>\n",
|
| 1991 |
" <tr>\n",
|
| 1992 |
" <th>11</th>\n",
|
| 1993 |
-
" <td>
|
| 1994 |
-
" <td>16.
|
| 1995 |
" <td>15.00</td>\n",
|
| 1996 |
-
" <td>
|
| 1997 |
-
" <td>
|
| 1998 |
-
" <td>
|
| 1999 |
-
" <td>
|
| 2000 |
-
" <td>
|
| 2001 |
-
" <td>
|
| 2002 |
-
" <td>
|
| 2003 |
-
" <td>
|
| 2004 |
-
" <td>
|
| 2005 |
-
" <td>
|
| 2006 |
-
" <td>
|
| 2007 |
-
" <td>
|
| 2008 |
-
" <td>
|
| 2009 |
" </tr>\n",
|
| 2010 |
" <tr>\n",
|
| 2011 |
" <th>12</th>\n",
|
| 2012 |
-
" <td>
|
| 2013 |
-
" <td>
|
| 2014 |
-
" <td>
|
| 2015 |
-
" <td>
|
| 2016 |
-
" <td>
|
| 2017 |
-
" <td>
|
| 2018 |
-
" <td>
|
| 2019 |
-
" <td>
|
| 2020 |
-
" <td>
|
| 2021 |
-
" <td>
|
| 2022 |
-
" <td>
|
| 2023 |
-
" <td>
|
| 2024 |
-
" <td>
|
| 2025 |
-
" <td>28
|
| 2026 |
-
" <td>
|
| 2027 |
-
" <td>
|
| 2028 |
" </tr>\n",
|
| 2029 |
" <tr>\n",
|
| 2030 |
" <th>13</th>\n",
|
| 2031 |
-
" <td>
|
| 2032 |
-
" <td>
|
| 2033 |
-
" <td>
|
| 2034 |
-
" <td>
|
| 2035 |
-
" <td>
|
| 2036 |
-
" <td>
|
| 2037 |
" <td>1470.00</td>\n",
|
| 2038 |
-
" <td>
|
| 2039 |
-
" <td>
|
| 2040 |
-
" <td>
|
| 2041 |
-
" <td>
|
| 2042 |
-
" <td>
|
| 2043 |
-
" <td>
|
| 2044 |
-
" <td>
|
| 2045 |
-
" <td>
|
| 2046 |
-
" <td>
|
| 2047 |
" </tr>\n",
|
| 2048 |
" <tr>\n",
|
| 2049 |
" <th>14</th>\n",
|
| 2050 |
-
" <td>
|
| 2051 |
-
" <td>
|
| 2052 |
" <td>15.00</td>\n",
|
| 2053 |
-
" <td>
|
| 2054 |
-
" <td>
|
| 2055 |
-
" <td>
|
| 2056 |
" <td>40.00</td>\n",
|
| 2057 |
-
" <td>
|
| 2058 |
-
" <td>
|
| 2059 |
-
" <td>
|
| 2060 |
-
" <td>
|
| 2061 |
-
" <td>
|
| 2062 |
-
" <td>
|
| 2063 |
-
" <td>
|
| 2064 |
-
" <td>
|
| 2065 |
-
" <td>
|
| 2066 |
" </tr>\n",
|
| 2067 |
" <tr>\n",
|
| 2068 |
" <th>15</th>\n",
|
| 2069 |
-
" <td>
|
| 2070 |
-
" <td>
|
| 2071 |
" <td>15.00</td>\n",
|
| 2072 |
-
" <td>
|
| 2073 |
-
" <td>
|
| 2074 |
-
" <td>
|
| 2075 |
" <td>45.00</td>\n",
|
| 2076 |
-
" <td>
|
| 2077 |
-
" <td>
|
| 2078 |
-
" <td>
|
| 2079 |
-
" <td>
|
| 2080 |
-
" <td>
|
| 2081 |
-
" <td>
|
| 2082 |
-
" <td>
|
| 2083 |
-
" <td>
|
| 2084 |
-
" <td>
|
| 2085 |
" </tr>\n",
|
| 2086 |
" <tr>\n",
|
| 2087 |
" <th>16</th>\n",
|
| 2088 |
-
" <td>
|
| 2089 |
-
" <td>
|
| 2090 |
" <td>15.00</td>\n",
|
| 2091 |
-
" <td>
|
| 2092 |
-
" <td>
|
| 2093 |
-
" <td>
|
| 2094 |
-
" <td>
|
| 2095 |
-
" <td>
|
| 2096 |
-
" <td>
|
| 2097 |
-
" <td>
|
| 2098 |
-
" <td>
|
| 2099 |
-
" <td>
|
| 2100 |
-
" <td>
|
| 2101 |
-
" <td>
|
| 2102 |
-
" <td>
|
| 2103 |
-
" <td>
|
| 2104 |
" </tr>\n",
|
| 2105 |
" <tr>\n",
|
| 2106 |
" <th>17</th>\n",
|
| 2107 |
-
" <td>
|
| 2108 |
-
" <td>
|
| 2109 |
" <td>10.00</td>\n",
|
| 2110 |
-
" <td>
|
| 2111 |
-
" <td>
|
| 2112 |
-
" <td>
|
| 2113 |
-
" <td>
|
| 2114 |
-
" <td>
|
| 2115 |
-
" <td>
|
| 2116 |
-
" <td>
|
| 2117 |
-
" <td>
|
| 2118 |
-
" <td>
|
| 2119 |
-
" <td>
|
| 2120 |
-
" <td>
|
| 2121 |
-
" <td>
|
| 2122 |
-
" <td>
|
| 2123 |
" </tr>\n",
|
| 2124 |
" <tr>\n",
|
| 2125 |
" <th>18</th>\n",
|
| 2126 |
-
" <td>
|
| 2127 |
-
" <td>19.
|
| 2128 |
" <td>15.00</td>\n",
|
| 2129 |
-
" <td>
|
| 2130 |
-
" <td>
|
| 2131 |
-
" <td>55.
|
| 2132 |
-
" <td>
|
| 2133 |
-
" <td>
|
| 2134 |
-
" <td>
|
| 2135 |
-
" <td>
|
| 2136 |
-
" <td>
|
| 2137 |
-
" <td>
|
| 2138 |
-
" <td>
|
| 2139 |
-
" <td>
|
| 2140 |
-
" <td>
|
| 2141 |
-
" <td>
|
| 2142 |
" </tr>\n",
|
| 2143 |
" <tr>\n",
|
| 2144 |
" <th>19</th>\n",
|
| 2145 |
-
" <td>
|
| 2146 |
-
" <td>
|
| 2147 |
" <td>15.00</td>\n",
|
| 2148 |
-
" <td>
|
| 2149 |
-
" <td>
|
| 2150 |
-
" <td>
|
| 2151 |
-
" <td>
|
| 2152 |
-
" <td>
|
| 2153 |
-
" <td>
|
| 2154 |
-
" <td>
|
| 2155 |
-
" <td>
|
| 2156 |
-
" <td>
|
| 2157 |
-
" <td>
|
| 2158 |
-
" <td>
|
| 2159 |
-
" <td>
|
| 2160 |
-
" <td>
|
| 2161 |
" </tr>\n",
|
| 2162 |
" <tr>\n",
|
| 2163 |
" <th>20</th>\n",
|
| 2164 |
-
" <td>
|
| 2165 |
-
" <td>
|
| 2166 |
" <td>15.00</td>\n",
|
| 2167 |
-
" <td>
|
| 2168 |
-
" <td>
|
| 2169 |
-
" <td>
|
| 2170 |
-
" <td>
|
| 2171 |
-
" <td>
|
| 2172 |
-
" <td>
|
| 2173 |
-
" <td>
|
| 2174 |
-
" <td>
|
| 2175 |
-
" <td>
|
| 2176 |
-
" <td>
|
| 2177 |
-
" <td>
|
| 2178 |
-
" <td>
|
| 2179 |
-
" <td>
|
| 2180 |
" </tr>\n",
|
| 2181 |
" <tr>\n",
|
| 2182 |
" <th>21</th>\n",
|
| 2183 |
-
" <td>
|
| 2184 |
-
" <td>17.
|
| 2185 |
" <td>15.00</td>\n",
|
| 2186 |
-
" <td>
|
| 2187 |
-
" <td>
|
| 2188 |
-
" <td>
|
| 2189 |
" <td>40.00</td>\n",
|
| 2190 |
-
" <td>
|
| 2191 |
-
" <td>
|
| 2192 |
-
" <td>
|
| 2193 |
-
" <td>
|
| 2194 |
-
" <td>
|
| 2195 |
-
" <td>
|
| 2196 |
-
" <td>
|
| 2197 |
-
" <td>
|
| 2198 |
-
" <td>
|
| 2199 |
" </tr>\n",
|
| 2200 |
" <tr>\n",
|
| 2201 |
" <th>22</th>\n",
|
| 2202 |
-
" <td>
|
| 2203 |
-
" <td>
|
| 2204 |
-
" <td>
|
| 2205 |
-
" <td>
|
| 2206 |
-
" <td>
|
| 2207 |
-
" <td>
|
| 2208 |
-
" <td>
|
| 2209 |
-
" <td>
|
| 2210 |
-
" <td>
|
| 2211 |
-
" <td>
|
| 2212 |
-
" <td>
|
| 2213 |
-
" <td>
|
| 2214 |
-
" <td>
|
| 2215 |
-
" <td>
|
| 2216 |
-
" <td>
|
| 2217 |
-
" <td>
|
| 2218 |
" </tr>\n",
|
| 2219 |
" <tr>\n",
|
| 2220 |
" <th>23</th>\n",
|
| 2221 |
-
" <td>
|
| 2222 |
-
" <td>
|
| 2223 |
-
" <td>
|
| 2224 |
-
" <td>
|
| 2225 |
-
" <td>
|
| 2226 |
-
" <td>
|
| 2227 |
-
" <td>
|
| 2228 |
-
" <td>
|
| 2229 |
-
" <td>
|
| 2230 |
-
" <td>
|
| 2231 |
-
" <td>
|
| 2232 |
-
" <td>
|
| 2233 |
-
" <td>
|
| 2234 |
-
" <td>
|
| 2235 |
-
" <td>
|
| 2236 |
-
" <td>
|
| 2237 |
" </tr>\n",
|
| 2238 |
" <tr>\n",
|
| 2239 |
" <th>24</th>\n",
|
| 2240 |
-
" <td>
|
| 2241 |
-
" <td>
|
| 2242 |
-
" <td>
|
| 2243 |
-
" <td>
|
| 2244 |
-
" <td>
|
| 2245 |
-
" <td>
|
| 2246 |
-
" <td>
|
| 2247 |
-
" <td>
|
| 2248 |
-
" <td>
|
| 2249 |
-
" <td>
|
| 2250 |
-
" <td>
|
| 2251 |
-
" <td>
|
| 2252 |
-
" <td>
|
| 2253 |
-
" <td>
|
| 2254 |
-
" <td>
|
| 2255 |
-
" <td>
|
| 2256 |
" </tr>\n",
|
| 2257 |
" <tr>\n",
|
| 2258 |
" <th>25</th>\n",
|
| 2259 |
-
" <td>
|
| 2260 |
-
" <td>
|
| 2261 |
-
" <td>
|
| 2262 |
-
" <td>
|
| 2263 |
-
" <td>
|
| 2264 |
-
" <td>
|
| 2265 |
-
" <td>
|
| 2266 |
-
" <td>
|
| 2267 |
-
" <td>
|
| 2268 |
-
" <td>
|
| 2269 |
-
" <td>
|
| 2270 |
-
" <td>
|
| 2271 |
-
" <td>
|
| 2272 |
-
" <td>
|
| 2273 |
-
" <td>
|
| 2274 |
-
" <td>
|
| 2275 |
" </tr>\n",
|
| 2276 |
" <tr>\n",
|
| 2277 |
" <th>26</th>\n",
|
| 2278 |
-
" <td>
|
| 2279 |
-
" <td>
|
| 2280 |
-
" <td>
|
| 2281 |
-
" <td>
|
| 2282 |
-
" <td>
|
| 2283 |
-
" <td>
|
| 2284 |
-
" <td>
|
| 2285 |
-
" <td>
|
| 2286 |
-
" <td>
|
| 2287 |
-
" <td>
|
| 2288 |
-
" <td>
|
| 2289 |
-
" <td>
|
| 2290 |
-
" <td>
|
| 2291 |
-
" <td>
|
| 2292 |
-
" <td>
|
| 2293 |
-
" <td>
|
| 2294 |
" </tr>\n",
|
| 2295 |
" <tr>\n",
|
| 2296 |
" <th>27</th>\n",
|
| 2297 |
-
" <td>
|
| 2298 |
-
" <td>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2299 |
" <td>20.00</td>\n",
|
| 2300 |
-
" <td>
|
| 2301 |
-
" <td>
|
| 2302 |
-
" <td>
|
| 2303 |
-
" <td>
|
| 2304 |
-
" <td>
|
| 2305 |
-
" <td>
|
| 2306 |
-
" <td>
|
| 2307 |
-
" <td>
|
| 2308 |
-
" <td>
|
| 2309 |
-
" <td>6377</td>\n",
|
| 2310 |
-
" <td>6.97</td>\n",
|
| 2311 |
-
" <td>5.30</td>\n",
|
| 2312 |
-
" <td>44450.60</td>\n",
|
| 2313 |
" </tr>\n",
|
| 2314 |
" <tr>\n",
|
| 2315 |
" <th>28</th>\n",
|
| 2316 |
-
" <td>
|
| 2317 |
-
" <td>
|
| 2318 |
-
" <td>
|
| 2319 |
-
" <td>
|
| 2320 |
-
" <td>
|
| 2321 |
-
" <td>
|
| 2322 |
-
" <td>
|
| 2323 |
-
" <td>
|
| 2324 |
-
" <td>
|
| 2325 |
-
" <td>
|
| 2326 |
-
" <td>
|
| 2327 |
-
" <td>
|
| 2328 |
-
" <td>
|
| 2329 |
-
" <td>
|
| 2330 |
-
" <td>
|
| 2331 |
-
" <td>
|
| 2332 |
" </tr>\n",
|
| 2333 |
" <tr>\n",
|
| 2334 |
" <th>29</th>\n",
|
| 2335 |
-
" <td>
|
| 2336 |
-
" <td>
|
| 2337 |
-
" <td>
|
| 2338 |
-
" <td>
|
| 2339 |
-
" <td>
|
| 2340 |
-
" <td>
|
| 2341 |
-
" <td>
|
| 2342 |
-
" <td>
|
| 2343 |
-
" <td>
|
| 2344 |
-
" <td>
|
| 2345 |
-
" <td>
|
| 2346 |
-
" <td>
|
| 2347 |
-
" <td>
|
| 2348 |
-
" <td>11.
|
| 2349 |
-
" <td>
|
| 2350 |
-
" <td>
|
| 2351 |
" </tr>\n",
|
| 2352 |
" <tr>\n",
|
| 2353 |
" <th>30</th>\n",
|
| 2354 |
-
" <td>
|
| 2355 |
-
" <td>
|
| 2356 |
" <td>20.00</td>\n",
|
| 2357 |
-
" <td>
|
| 2358 |
-
" <td>
|
| 2359 |
-
" <td>
|
| 2360 |
-
" <td>
|
| 2361 |
-
" <td>
|
| 2362 |
-
" <td>
|
| 2363 |
-
" <td>
|
| 2364 |
-
" <td>
|
| 2365 |
-
" <td>
|
| 2366 |
-
" <td>
|
| 2367 |
-
" <td>
|
| 2368 |
-
" <td>
|
| 2369 |
-
" <td>
|
| 2370 |
" </tr>\n",
|
| 2371 |
" </tbody>\n",
|
| 2372 |
"</table>\n",
|
| 2373 |
"</div>"
|
| 2374 |
],
|
| 2375 |
"text/plain": [
|
| 2376 |
-
" PrepTime TotalTime Calories
|
| 2377 |
-
" count mean median sum count mean median sum count mean median
|
| 2378 |
-
"kmeans_cluster
|
| 2379 |
-
"1
|
| 2380 |
-
"2
|
| 2381 |
-
"3
|
| 2382 |
-
"4
|
| 2383 |
-
"5
|
| 2384 |
-
"6
|
| 2385 |
-
"7
|
| 2386 |
-
"8
|
| 2387 |
-
"9
|
| 2388 |
-
"10
|
| 2389 |
-
"11
|
| 2390 |
-
"12
|
| 2391 |
-
"13
|
| 2392 |
-
"14
|
| 2393 |
-
"15
|
| 2394 |
-
"16
|
| 2395 |
-
"17
|
| 2396 |
-
"18
|
| 2397 |
-
"19
|
| 2398 |
-
"20
|
| 2399 |
-
"21
|
| 2400 |
-
"22
|
| 2401 |
-
"23
|
| 2402 |
-
"24
|
| 2403 |
-
"25
|
| 2404 |
-
"26
|
| 2405 |
-
"27
|
| 2406 |
-
"28
|
| 2407 |
-
"29
|
| 2408 |
-
"30
|
| 2409 |
]
|
| 2410 |
},
|
| 2411 |
-
"execution_count":
|
| 2412 |
"metadata": {},
|
| 2413 |
"output_type": "execute_result"
|
| 2414 |
}
|
|
|
|
| 222 |
},
|
| 223 |
{
|
| 224 |
"cell_type": "code",
|
| 225 |
+
"execution_count": null,
|
| 226 |
"metadata": {
|
| 227 |
"execution": {
|
| 228 |
"iopub.execute_input": "2023-12-15T14:49:11.184383Z",
|
|
|
|
| 232 |
"shell.execute_reply.started": "2023-12-15T14:49:11.184259Z"
|
| 233 |
}
|
| 234 |
},
|
| 235 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
"source": [
|
| 237 |
"df.shape"
|
| 238 |
]
|
|
|
|
| 283 |
},
|
| 284 |
{
|
| 285 |
"cell_type": "code",
|
| 286 |
+
"execution_count": 3,
|
| 287 |
"metadata": {
|
| 288 |
"execution": {
|
| 289 |
"iopub.execute_input": "2023-12-15T15:07:27.714708Z",
|
|
|
|
| 320 |
},
|
| 321 |
{
|
| 322 |
"cell_type": "code",
|
| 323 |
+
"execution_count": 4,
|
| 324 |
"metadata": {
|
| 325 |
"execution": {
|
| 326 |
"iopub.execute_input": "2023-12-15T15:07:30.113075Z",
|
|
|
|
| 389 |
},
|
| 390 |
{
|
| 391 |
"cell_type": "code",
|
| 392 |
+
"execution_count": 5,
|
| 393 |
"metadata": {
|
| 394 |
"execution": {
|
| 395 |
"iopub.execute_input": "2023-12-15T15:07:37.208238Z",
|
|
|
|
| 446 |
},
|
| 447 |
{
|
| 448 |
"cell_type": "code",
|
| 449 |
+
"execution_count": 6,
|
| 450 |
"metadata": {
|
| 451 |
"execution": {
|
| 452 |
"iopub.execute_input": "2023-12-15T15:07:49.912389Z",
|
|
|
|
| 469 |
},
|
| 470 |
{
|
| 471 |
"cell_type": "code",
|
| 472 |
+
"execution_count": 7,
|
| 473 |
"metadata": {
|
| 474 |
"execution": {
|
| 475 |
"iopub.execute_input": "2023-12-15T15:07:53.138237Z",
|
|
|
|
| 486 |
"False"
|
| 487 |
]
|
| 488 |
},
|
| 489 |
+
"execution_count": 7,
|
| 490 |
"metadata": {},
|
| 491 |
"output_type": "execute_result"
|
| 492 |
}
|
|
|
|
| 893 |
},
|
| 894 |
{
|
| 895 |
"cell_type": "code",
|
| 896 |
+
"execution_count": null,
|
| 897 |
"metadata": {
|
| 898 |
"execution": {
|
| 899 |
"iopub.execute_input": "2023-12-15T15:08:08.362107Z",
|
|
|
|
| 903 |
"shell.execute_reply.started": "2023-12-15T15:08:08.362069Z"
|
| 904 |
}
|
| 905 |
},
|
| 906 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 907 |
"source": [
|
| 908 |
"df.head()"
|
| 909 |
]
|
|
|
|
| 927 |
},
|
| 928 |
{
|
| 929 |
"cell_type": "code",
|
| 930 |
+
"execution_count": 8,
|
| 931 |
"metadata": {
|
| 932 |
"execution": {
|
| 933 |
"iopub.execute_input": "2023-12-15T15:08:16.614139Z",
|
|
|
|
| 951 |
},
|
| 952 |
{
|
| 953 |
"cell_type": "code",
|
| 954 |
+
"execution_count": 9,
|
| 955 |
"metadata": {
|
| 956 |
"execution": {
|
| 957 |
"iopub.execute_input": "2023-12-15T15:08:11.060002Z",
|
|
|
|
| 977 |
},
|
| 978 |
{
|
| 979 |
"cell_type": "code",
|
| 980 |
+
"execution_count": 10,
|
| 981 |
"metadata": {
|
| 982 |
"execution": {
|
| 983 |
"iopub.execute_input": "2023-12-15T15:08:20.283538Z",
|
|
|
|
| 1007 |
},
|
| 1008 |
{
|
| 1009 |
"cell_type": "code",
|
| 1010 |
+
"execution_count": 11,
|
| 1011 |
"metadata": {
|
| 1012 |
"execution": {
|
| 1013 |
"iopub.execute_input": "2023-12-15T15:33:42.657241Z",
|
|
|
|
| 1041 |
},
|
| 1042 |
{
|
| 1043 |
"cell_type": "code",
|
| 1044 |
+
"execution_count": 12,
|
| 1045 |
"metadata": {
|
| 1046 |
"execution": {
|
| 1047 |
"iopub.execute_input": "2023-12-15T15:12:35.466716Z",
|
|
|
|
| 1164 |
},
|
| 1165 |
{
|
| 1166 |
"cell_type": "code",
|
| 1167 |
+
"execution_count": 13,
|
| 1168 |
"metadata": {
|
| 1169 |
"execution": {
|
| 1170 |
"iopub.execute_input": "2023-12-15T15:39:26.995591Z",
|
|
|
|
| 1181 |
},
|
| 1182 |
{
|
| 1183 |
"cell_type": "code",
|
| 1184 |
+
"execution_count": 14,
|
| 1185 |
"metadata": {
|
| 1186 |
"execution": {
|
| 1187 |
"iopub.execute_input": "2023-12-15T15:39:30.884915Z",
|
|
|
|
| 1195 |
{
|
| 1196 |
"data": {
|
| 1197 |
"text/plain": [
|
| 1198 |
+
"array([28, 28, 6, ..., 18, 20, 26], dtype=int32)"
|
| 1199 |
]
|
| 1200 |
},
|
| 1201 |
+
"execution_count": 14,
|
| 1202 |
"metadata": {},
|
| 1203 |
"output_type": "execute_result"
|
| 1204 |
}
|
|
|
|
| 1210 |
},
|
| 1211 |
{
|
| 1212 |
"cell_type": "code",
|
| 1213 |
+
"execution_count": 15,
|
| 1214 |
"metadata": {
|
| 1215 |
"execution": {
|
| 1216 |
"iopub.execute_input": "2023-12-15T15:39:33.957001Z",
|
|
|
|
| 1278 |
" <td>30.20</td>\n",
|
| 1279 |
" <td>3.20</td>\n",
|
| 1280 |
" <td>c(\"Toss 2 cups berries with sugar.\", \"Let stan...</td>\n",
|
| 1281 |
+
" <td>29</td>\n",
|
| 1282 |
" </tr>\n",
|
| 1283 |
" <tr>\n",
|
| 1284 |
" <th>1</th>\n",
|
|
|
|
| 1297 |
" <td>32.10</td>\n",
|
| 1298 |
" <td>29.30</td>\n",
|
| 1299 |
" <td>c(\"Drain the tofu, carefully squeezing out exc...</td>\n",
|
| 1300 |
+
" <td>29</td>\n",
|
| 1301 |
" </tr>\n",
|
| 1302 |
" <tr>\n",
|
| 1303 |
" <th>2</th>\n",
|
|
|
|
| 1316 |
" <td>17.70</td>\n",
|
| 1317 |
" <td>4.30</td>\n",
|
| 1318 |
" <td>c(\"Mix everything together and bring to a boil...</td>\n",
|
| 1319 |
+
" <td>7</td>\n",
|
| 1320 |
" </tr>\n",
|
| 1321 |
" <tr>\n",
|
| 1322 |
" <th>3</th>\n",
|
|
|
|
| 1335 |
" <td>24.70</td>\n",
|
| 1336 |
" <td>4.20</td>\n",
|
| 1337 |
" <td>c(\"Preheat oven to 350°F.\", \"Make pie crust, u...</td>\n",
|
| 1338 |
+
" <td>11</td>\n",
|
| 1339 |
" </tr>\n",
|
| 1340 |
" <tr>\n",
|
| 1341 |
" <th>4</th>\n",
|
|
|
|
| 1354 |
" <td>0.20</td>\n",
|
| 1355 |
" <td>0.10</td>\n",
|
| 1356 |
" <td>c(\"Slice the cucumber in four lengthwise, then...</td>\n",
|
| 1357 |
+
" <td>27</td>\n",
|
| 1358 |
" </tr>\n",
|
| 1359 |
" </tbody>\n",
|
| 1360 |
"</table>\n",
|
|
|
|
| 1362 |
],
|
| 1363 |
"text/plain": [
|
| 1364 |
" Name CookTime PrepTime TotalTime RecipeIngredientParts Calories FatContent SaturatedFatContent CholesterolContent SodiumContent CarbohydrateContent FiberContent SugarContent ProteinContent RecipeInstructions kmeans_cluster\n",
|
| 1365 |
+
"0 Low-Fat Berry Blue Frozen Dessert 1200 45 1485.00 c(\"blueberries\", \"granulated sugar\", \"vanilla ... 170.90 2.50 1.30 8.00 29.80 37.10 3.60 30.20 3.20 c(\"Toss 2 cups berries with sugar.\", \"Let stan... 29\n",
|
| 1366 |
+
"1 Carina's Tofu-Vegetable Kebabs 20 600 1460.00 c(\"extra firm tofu\", \"eggplant\", \"zucchini\", \"... 536.10 24.00 3.80 0.00 1558.60 64.20 17.30 32.10 29.30 c(\"Drain the tofu, carefully squeezing out exc... 29\n",
|
| 1367 |
+
"2 Cabbage Soup 30 20 50.00 c(\"plain tomato juice\", \"cabbage\", \"onion\", \"c... 103.60 0.40 0.10 0.00 959.30 25.10 4.80 17.70 4.30 c(\"Mix everything together and bring to a boil... 7\n",
|
| 1368 |
+
"3 Buttermilk Pie With Gingersnap Crumb Crust 50 30 80.00 c(\"sugar\", \"margarine\", \"egg\", \"flour\", \"salt\"... 228.00 7.10 1.70 24.50 281.80 37.50 0.50 24.70 4.20 c(\"Preheat oven to 350°F.\", \"Make pie crust, u... 11\n",
|
| 1369 |
+
"4 A Jad - Cucumber Pickle 0 25 25.00 c(\"rice vinegar\", \"haeo\") 4.30 0.00 0.00 0.00 0.70 1.10 0.20 0.20 0.10 c(\"Slice the cucumber in four lengthwise, then... 27"
|
| 1370 |
]
|
| 1371 |
},
|
| 1372 |
+
"execution_count": 15,
|
| 1373 |
"metadata": {},
|
| 1374 |
"output_type": "execute_result"
|
| 1375 |
}
|
|
|
|
| 1399 |
},
|
| 1400 |
{
|
| 1401 |
"cell_type": "code",
|
| 1402 |
+
"execution_count": null,
|
| 1403 |
"metadata": {
|
| 1404 |
"execution": {
|
| 1405 |
"iopub.execute_input": "2023-12-15T15:39:45.812785Z",
|
|
|
|
| 1409 |
"shell.execute_reply.started": "2023-12-15T15:39:45.812755Z"
|
| 1410 |
}
|
| 1411 |
},
|
| 1412 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1413 |
"source": [
|
| 1414 |
"df[\"kmeans_cluster\"].value_counts()"
|
| 1415 |
]
|
|
|
|
| 1511 |
},
|
| 1512 |
{
|
| 1513 |
"cell_type": "code",
|
| 1514 |
+
"execution_count": 16,
|
| 1515 |
"metadata": {
|
| 1516 |
"execution": {
|
| 1517 |
"iopub.execute_input": "2023-12-15T15:03:01.714109Z",
|
|
|
|
| 1594 |
" <tbody>\n",
|
| 1595 |
" <tr>\n",
|
| 1596 |
" <th>1</th>\n",
|
| 1597 |
+
" <td>10150</td>\n",
|
| 1598 |
+
" <td>18.91</td>\n",
|
| 1599 |
+
" <td>15.00</td>\n",
|
| 1600 |
+
" <td>191893</td>\n",
|
| 1601 |
+
" <td>10150</td>\n",
|
| 1602 |
+
" <td>53.82</td>\n",
|
| 1603 |
+
" <td>45.00</td>\n",
|
| 1604 |
+
" <td>546294.00</td>\n",
|
| 1605 |
+
" <td>10150</td>\n",
|
| 1606 |
+
" <td>302.73</td>\n",
|
| 1607 |
+
" <td>304.45</td>\n",
|
| 1608 |
+
" <td>3072734.00</td>\n",
|
| 1609 |
+
" <td>10150</td>\n",
|
| 1610 |
+
" <td>11.16</td>\n",
|
| 1611 |
+
" <td>11.30</td>\n",
|
| 1612 |
+
" <td>113300.40</td>\n",
|
| 1613 |
" </tr>\n",
|
| 1614 |
" <tr>\n",
|
| 1615 |
" <th>2</th>\n",
|
| 1616 |
+
" <td>27204</td>\n",
|
| 1617 |
+
" <td>17.06</td>\n",
|
| 1618 |
" <td>15.00</td>\n",
|
| 1619 |
+
" <td>464067</td>\n",
|
| 1620 |
+
" <td>27204</td>\n",
|
| 1621 |
+
" <td>45.24</td>\n",
|
| 1622 |
+
" <td>35.00</td>\n",
|
| 1623 |
+
" <td>1230656.00</td>\n",
|
| 1624 |
+
" <td>27204</td>\n",
|
| 1625 |
+
" <td>345.01</td>\n",
|
| 1626 |
+
" <td>341.20</td>\n",
|
| 1627 |
+
" <td>9385782.10</td>\n",
|
| 1628 |
+
" <td>27204</td>\n",
|
| 1629 |
+
" <td>17.55</td>\n",
|
| 1630 |
+
" <td>17.50</td>\n",
|
| 1631 |
+
" <td>477328.10</td>\n",
|
| 1632 |
" </tr>\n",
|
| 1633 |
" <tr>\n",
|
| 1634 |
" <th>3</th>\n",
|
| 1635 |
+
" <td>10319</td>\n",
|
| 1636 |
+
" <td>19.85</td>\n",
|
| 1637 |
" <td>15.00</td>\n",
|
| 1638 |
+
" <td>204813</td>\n",
|
| 1639 |
+
" <td>10319</td>\n",
|
| 1640 |
+
" <td>56.78</td>\n",
|
| 1641 |
" <td>45.00</td>\n",
|
| 1642 |
+
" <td>585963.00</td>\n",
|
| 1643 |
+
" <td>10319</td>\n",
|
| 1644 |
+
" <td>445.80</td>\n",
|
| 1645 |
+
" <td>435.90</td>\n",
|
| 1646 |
+
" <td>4600185.50</td>\n",
|
| 1647 |
+
" <td>10319</td>\n",
|
| 1648 |
+
" <td>19.69</td>\n",
|
| 1649 |
+
" <td>19.00</td>\n",
|
| 1650 |
+
" <td>203168.40</td>\n",
|
| 1651 |
" </tr>\n",
|
| 1652 |
" <tr>\n",
|
| 1653 |
" <th>4</th>\n",
|
| 1654 |
+
" <td>595</td>\n",
|
| 1655 |
+
" <td>386.09</td>\n",
|
| 1656 |
+
" <td>600.00</td>\n",
|
| 1657 |
+
" <td>229724</td>\n",
|
| 1658 |
+
" <td>595</td>\n",
|
| 1659 |
+
" <td>1582.14</td>\n",
|
| 1660 |
+
" <td>1500.00</td>\n",
|
| 1661 |
+
" <td>941373.00</td>\n",
|
| 1662 |
+
" <td>595</td>\n",
|
| 1663 |
+
" <td>508.17</td>\n",
|
| 1664 |
+
" <td>461.90</td>\n",
|
| 1665 |
+
" <td>302359.00</td>\n",
|
| 1666 |
+
" <td>595</td>\n",
|
| 1667 |
+
" <td>24.40</td>\n",
|
| 1668 |
+
" <td>23.00</td>\n",
|
| 1669 |
+
" <td>14517.20</td>\n",
|
| 1670 |
" </tr>\n",
|
| 1671 |
" <tr>\n",
|
| 1672 |
" <th>5</th>\n",
|
| 1673 |
+
" <td>24230</td>\n",
|
| 1674 |
+
" <td>16.87</td>\n",
|
| 1675 |
" <td>15.00</td>\n",
|
| 1676 |
+
" <td>408745</td>\n",
|
| 1677 |
+
" <td>24230</td>\n",
|
| 1678 |
+
" <td>40.80</td>\n",
|
| 1679 |
" <td>30.00</td>\n",
|
| 1680 |
+
" <td>988566.00</td>\n",
|
| 1681 |
+
" <td>24230</td>\n",
|
| 1682 |
+
" <td>127.92</td>\n",
|
| 1683 |
+
" <td>124.90</td>\n",
|
| 1684 |
+
" <td>3099574.30</td>\n",
|
| 1685 |
+
" <td>24230</td>\n",
|
| 1686 |
+
" <td>5.29</td>\n",
|
| 1687 |
+
" <td>4.80</td>\n",
|
| 1688 |
+
" <td>128225.60</td>\n",
|
| 1689 |
" </tr>\n",
|
| 1690 |
" <tr>\n",
|
| 1691 |
" <th>6</th>\n",
|
| 1692 |
+
" <td>30092</td>\n",
|
| 1693 |
+
" <td>17.67</td>\n",
|
| 1694 |
" <td>15.00</td>\n",
|
| 1695 |
+
" <td>531826</td>\n",
|
| 1696 |
+
" <td>30092</td>\n",
|
| 1697 |
+
" <td>47.17</td>\n",
|
| 1698 |
+
" <td>40.00</td>\n",
|
| 1699 |
+
" <td>1419518.00</td>\n",
|
| 1700 |
+
" <td>30092</td>\n",
|
| 1701 |
+
" <td>306.21</td>\n",
|
| 1702 |
+
" <td>300.60</td>\n",
|
| 1703 |
+
" <td>9214324.70</td>\n",
|
| 1704 |
+
" <td>30092</td>\n",
|
| 1705 |
+
" <td>14.05</td>\n",
|
| 1706 |
+
" <td>13.70</td>\n",
|
| 1707 |
+
" <td>422862.10</td>\n",
|
| 1708 |
" </tr>\n",
|
| 1709 |
" <tr>\n",
|
| 1710 |
" <th>7</th>\n",
|
| 1711 |
+
" <td>17691</td>\n",
|
| 1712 |
+
" <td>17.31</td>\n",
|
| 1713 |
" <td>15.00</td>\n",
|
| 1714 |
+
" <td>306216</td>\n",
|
| 1715 |
+
" <td>17691</td>\n",
|
| 1716 |
+
" <td>44.53</td>\n",
|
| 1717 |
+
" <td>35.00</td>\n",
|
| 1718 |
+
" <td>787806.00</td>\n",
|
| 1719 |
+
" <td>17691</td>\n",
|
| 1720 |
+
" <td>202.20</td>\n",
|
| 1721 |
+
" <td>198.10</td>\n",
|
| 1722 |
+
" <td>3577067.10</td>\n",
|
| 1723 |
+
" <td>17691</td>\n",
|
| 1724 |
+
" <td>8.02</td>\n",
|
| 1725 |
+
" <td>7.60</td>\n",
|
| 1726 |
+
" <td>141915.20</td>\n",
|
| 1727 |
" </tr>\n",
|
| 1728 |
" <tr>\n",
|
| 1729 |
" <th>8</th>\n",
|
| 1730 |
+
" <td>1470</td>\n",
|
| 1731 |
+
" <td>25.63</td>\n",
|
| 1732 |
" <td>15.00</td>\n",
|
| 1733 |
+
" <td>37671</td>\n",
|
| 1734 |
+
" <td>1470</td>\n",
|
| 1735 |
+
" <td>74.37</td>\n",
|
| 1736 |
+
" <td>45.00</td>\n",
|
| 1737 |
+
" <td>109330.00</td>\n",
|
| 1738 |
+
" <td>1470</td>\n",
|
| 1739 |
+
" <td>831.67</td>\n",
|
| 1740 |
+
" <td>777.90</td>\n",
|
| 1741 |
+
" <td>1222548.40</td>\n",
|
| 1742 |
+
" <td>1470</td>\n",
|
| 1743 |
+
" <td>36.25</td>\n",
|
| 1744 |
+
" <td>33.60</td>\n",
|
| 1745 |
+
" <td>53286.50</td>\n",
|
| 1746 |
" </tr>\n",
|
| 1747 |
" <tr>\n",
|
| 1748 |
" <th>9</th>\n",
|
| 1749 |
+
" <td>3510</td>\n",
|
| 1750 |
+
" <td>55.09</td>\n",
|
| 1751 |
" <td>15.00</td>\n",
|
| 1752 |
+
" <td>193381</td>\n",
|
| 1753 |
+
" <td>3510</td>\n",
|
| 1754 |
+
" <td>403.11</td>\n",
|
| 1755 |
+
" <td>380.00</td>\n",
|
| 1756 |
+
" <td>1414928.00</td>\n",
|
| 1757 |
+
" <td>3510</td>\n",
|
| 1758 |
+
" <td>459.85</td>\n",
|
| 1759 |
+
" <td>439.70</td>\n",
|
| 1760 |
+
" <td>1614084.40</td>\n",
|
| 1761 |
+
" <td>3510</td>\n",
|
| 1762 |
+
" <td>20.82</td>\n",
|
| 1763 |
+
" <td>20.30</td>\n",
|
| 1764 |
+
" <td>73062.50</td>\n",
|
| 1765 |
" </tr>\n",
|
| 1766 |
" <tr>\n",
|
| 1767 |
" <th>10</th>\n",
|
| 1768 |
+
" <td>3220</td>\n",
|
| 1769 |
+
" <td>22.47</td>\n",
|
| 1770 |
" <td>15.00</td>\n",
|
| 1771 |
+
" <td>72364</td>\n",
|
| 1772 |
+
" <td>3220</td>\n",
|
| 1773 |
+
" <td>70.24</td>\n",
|
| 1774 |
+
" <td>45.00</td>\n",
|
| 1775 |
+
" <td>226182.00</td>\n",
|
| 1776 |
+
" <td>3220</td>\n",
|
| 1777 |
+
" <td>855.32</td>\n",
|
| 1778 |
+
" <td>805.35</td>\n",
|
| 1779 |
+
" <td>2754126.40</td>\n",
|
| 1780 |
+
" <td>3220</td>\n",
|
| 1781 |
+
" <td>34.67</td>\n",
|
| 1782 |
+
" <td>31.10</td>\n",
|
| 1783 |
+
" <td>111645.40</td>\n",
|
| 1784 |
" </tr>\n",
|
| 1785 |
" <tr>\n",
|
| 1786 |
" <th>11</th>\n",
|
| 1787 |
+
" <td>10522</td>\n",
|
| 1788 |
+
" <td>16.93</td>\n",
|
| 1789 |
" <td>15.00</td>\n",
|
| 1790 |
+
" <td>178097</td>\n",
|
| 1791 |
+
" <td>10522</td>\n",
|
| 1792 |
+
" <td>46.67</td>\n",
|
| 1793 |
+
" <td>35.00</td>\n",
|
| 1794 |
+
" <td>491095.00</td>\n",
|
| 1795 |
+
" <td>10522</td>\n",
|
| 1796 |
+
" <td>224.54</td>\n",
|
| 1797 |
+
" <td>233.80</td>\n",
|
| 1798 |
+
" <td>2362630.30</td>\n",
|
| 1799 |
+
" <td>10522</td>\n",
|
| 1800 |
+
" <td>7.50</td>\n",
|
| 1801 |
+
" <td>7.40</td>\n",
|
| 1802 |
+
" <td>78956.80</td>\n",
|
| 1803 |
" </tr>\n",
|
| 1804 |
" <tr>\n",
|
| 1805 |
" <th>12</th>\n",
|
| 1806 |
+
" <td>39868</td>\n",
|
| 1807 |
+
" <td>15.53</td>\n",
|
| 1808 |
+
" <td>10.00</td>\n",
|
| 1809 |
+
" <td>618985</td>\n",
|
| 1810 |
+
" <td>39868</td>\n",
|
| 1811 |
+
" <td>37.67</td>\n",
|
| 1812 |
+
" <td>30.00</td>\n",
|
| 1813 |
+
" <td>1501918.00</td>\n",
|
| 1814 |
+
" <td>39868</td>\n",
|
| 1815 |
+
" <td>200.38</td>\n",
|
| 1816 |
+
" <td>200.00</td>\n",
|
| 1817 |
+
" <td>7988725.40</td>\n",
|
| 1818 |
+
" <td>39868</td>\n",
|
| 1819 |
+
" <td>10.28</td>\n",
|
| 1820 |
+
" <td>10.00</td>\n",
|
| 1821 |
+
" <td>409733.90</td>\n",
|
| 1822 |
" </tr>\n",
|
| 1823 |
" <tr>\n",
|
| 1824 |
" <th>13</th>\n",
|
| 1825 |
+
" <td>696</td>\n",
|
| 1826 |
+
" <td>315.80</td>\n",
|
| 1827 |
+
" <td>600.00</td>\n",
|
| 1828 |
+
" <td>219799</td>\n",
|
| 1829 |
+
" <td>696</td>\n",
|
| 1830 |
+
" <td>1569.19</td>\n",
|
| 1831 |
" <td>1470.00</td>\n",
|
| 1832 |
+
" <td>1092154.50</td>\n",
|
| 1833 |
+
" <td>696</td>\n",
|
| 1834 |
+
" <td>253.00</td>\n",
|
| 1835 |
+
" <td>217.90</td>\n",
|
| 1836 |
+
" <td>176089.00</td>\n",
|
| 1837 |
+
" <td>696</td>\n",
|
| 1838 |
+
" <td>10.50</td>\n",
|
| 1839 |
+
" <td>7.55</td>\n",
|
| 1840 |
+
" <td>7305.50</td>\n",
|
| 1841 |
" </tr>\n",
|
| 1842 |
" <tr>\n",
|
| 1843 |
" <th>14</th>\n",
|
| 1844 |
+
" <td>5987</td>\n",
|
| 1845 |
+
" <td>20.70</td>\n",
|
| 1846 |
" <td>15.00</td>\n",
|
| 1847 |
+
" <td>123917</td>\n",
|
| 1848 |
+
" <td>5987</td>\n",
|
| 1849 |
+
" <td>53.96</td>\n",
|
| 1850 |
" <td>40.00</td>\n",
|
| 1851 |
+
" <td>323084.00</td>\n",
|
| 1852 |
+
" <td>5987</td>\n",
|
| 1853 |
+
" <td>800.43</td>\n",
|
| 1854 |
+
" <td>763.20</td>\n",
|
| 1855 |
+
" <td>4792188.40</td>\n",
|
| 1856 |
+
" <td>5987</td>\n",
|
| 1857 |
+
" <td>35.13</td>\n",
|
| 1858 |
+
" <td>32.30</td>\n",
|
| 1859 |
+
" <td>210313.20</td>\n",
|
| 1860 |
" </tr>\n",
|
| 1861 |
" <tr>\n",
|
| 1862 |
" <th>15</th>\n",
|
| 1863 |
+
" <td>16806</td>\n",
|
| 1864 |
+
" <td>19.38</td>\n",
|
| 1865 |
" <td>15.00</td>\n",
|
| 1866 |
+
" <td>325719</td>\n",
|
| 1867 |
+
" <td>16806</td>\n",
|
| 1868 |
+
" <td>55.95</td>\n",
|
| 1869 |
" <td>45.00</td>\n",
|
| 1870 |
+
" <td>940309.00</td>\n",
|
| 1871 |
+
" <td>16806</td>\n",
|
| 1872 |
+
" <td>322.58</td>\n",
|
| 1873 |
+
" <td>320.50</td>\n",
|
| 1874 |
+
" <td>5421314.00</td>\n",
|
| 1875 |
+
" <td>16806</td>\n",
|
| 1876 |
+
" <td>14.12</td>\n",
|
| 1877 |
+
" <td>13.70</td>\n",
|
| 1878 |
+
" <td>237314.40</td>\n",
|
| 1879 |
" </tr>\n",
|
| 1880 |
" <tr>\n",
|
| 1881 |
" <th>16</th>\n",
|
| 1882 |
+
" <td>5304</td>\n",
|
| 1883 |
+
" <td>20.64</td>\n",
|
| 1884 |
" <td>15.00</td>\n",
|
| 1885 |
+
" <td>109466</td>\n",
|
| 1886 |
+
" <td>5304</td>\n",
|
| 1887 |
+
" <td>61.24</td>\n",
|
| 1888 |
+
" <td>45.00</td>\n",
|
| 1889 |
+
" <td>324843.00</td>\n",
|
| 1890 |
+
" <td>5304</td>\n",
|
| 1891 |
+
" <td>530.90</td>\n",
|
| 1892 |
+
" <td>509.05</td>\n",
|
| 1893 |
+
" <td>2815888.00</td>\n",
|
| 1894 |
+
" <td>5304</td>\n",
|
| 1895 |
+
" <td>23.75</td>\n",
|
| 1896 |
+
" <td>22.35</td>\n",
|
| 1897 |
+
" <td>125945.80</td>\n",
|
| 1898 |
" </tr>\n",
|
| 1899 |
" <tr>\n",
|
| 1900 |
" <th>17</th>\n",
|
| 1901 |
+
" <td>30773</td>\n",
|
| 1902 |
+
" <td>15.46</td>\n",
|
| 1903 |
" <td>10.00</td>\n",
|
| 1904 |
+
" <td>475666</td>\n",
|
| 1905 |
+
" <td>30773</td>\n",
|
| 1906 |
+
" <td>35.91</td>\n",
|
| 1907 |
+
" <td>30.00</td>\n",
|
| 1908 |
+
" <td>1105185.00</td>\n",
|
| 1909 |
+
" <td>30773</td>\n",
|
| 1910 |
+
" <td>112.53</td>\n",
|
| 1911 |
+
" <td>111.70</td>\n",
|
| 1912 |
+
" <td>3462883.00</td>\n",
|
| 1913 |
+
" <td>30773</td>\n",
|
| 1914 |
+
" <td>5.10</td>\n",
|
| 1915 |
+
" <td>4.40</td>\n",
|
| 1916 |
+
" <td>156846.50</td>\n",
|
| 1917 |
" </tr>\n",
|
| 1918 |
" <tr>\n",
|
| 1919 |
" <th>18</th>\n",
|
| 1920 |
+
" <td>13966</td>\n",
|
| 1921 |
+
" <td>19.59</td>\n",
|
| 1922 |
" <td>15.00</td>\n",
|
| 1923 |
+
" <td>273562</td>\n",
|
| 1924 |
+
" <td>13966</td>\n",
|
| 1925 |
+
" <td>55.51</td>\n",
|
| 1926 |
+
" <td>45.00</td>\n",
|
| 1927 |
+
" <td>775184.00</td>\n",
|
| 1928 |
+
" <td>13966</td>\n",
|
| 1929 |
+
" <td>535.79</td>\n",
|
| 1930 |
+
" <td>525.60</td>\n",
|
| 1931 |
+
" <td>7482843.10</td>\n",
|
| 1932 |
+
" <td>13966</td>\n",
|
| 1933 |
+
" <td>23.71</td>\n",
|
| 1934 |
+
" <td>23.00</td>\n",
|
| 1935 |
+
" <td>331071.90</td>\n",
|
| 1936 |
" </tr>\n",
|
| 1937 |
" <tr>\n",
|
| 1938 |
" <th>19</th>\n",
|
| 1939 |
+
" <td>6085</td>\n",
|
| 1940 |
+
" <td>20.09</td>\n",
|
| 1941 |
" <td>15.00</td>\n",
|
| 1942 |
+
" <td>122219</td>\n",
|
| 1943 |
+
" <td>6085</td>\n",
|
| 1944 |
+
" <td>59.09</td>\n",
|
| 1945 |
+
" <td>50.00</td>\n",
|
| 1946 |
+
" <td>359566.00</td>\n",
|
| 1947 |
+
" <td>6085</td>\n",
|
| 1948 |
+
" <td>431.25</td>\n",
|
| 1949 |
+
" <td>409.20</td>\n",
|
| 1950 |
+
" <td>2624172.00</td>\n",
|
| 1951 |
+
" <td>6085</td>\n",
|
| 1952 |
+
" <td>19.81</td>\n",
|
| 1953 |
+
" <td>19.20</td>\n",
|
| 1954 |
+
" <td>120567.00</td>\n",
|
| 1955 |
" </tr>\n",
|
| 1956 |
" <tr>\n",
|
| 1957 |
" <th>20</th>\n",
|
| 1958 |
+
" <td>19476</td>\n",
|
| 1959 |
+
" <td>18.23</td>\n",
|
| 1960 |
" <td>15.00</td>\n",
|
| 1961 |
+
" <td>354998</td>\n",
|
| 1962 |
+
" <td>19476</td>\n",
|
| 1963 |
+
" <td>49.63</td>\n",
|
| 1964 |
+
" <td>40.00</td>\n",
|
| 1965 |
+
" <td>966647.00</td>\n",
|
| 1966 |
+
" <td>19476</td>\n",
|
| 1967 |
+
" <td>509.76</td>\n",
|
| 1968 |
+
" <td>497.20</td>\n",
|
| 1969 |
+
" <td>9928174.30</td>\n",
|
| 1970 |
+
" <td>19476</td>\n",
|
| 1971 |
+
" <td>24.66</td>\n",
|
| 1972 |
+
" <td>23.90</td>\n",
|
| 1973 |
+
" <td>480274.20</td>\n",
|
| 1974 |
" </tr>\n",
|
| 1975 |
" <tr>\n",
|
| 1976 |
" <th>21</th>\n",
|
| 1977 |
+
" <td>14600</td>\n",
|
| 1978 |
+
" <td>17.77</td>\n",
|
| 1979 |
" <td>15.00</td>\n",
|
| 1980 |
+
" <td>259437</td>\n",
|
| 1981 |
+
" <td>14600</td>\n",
|
| 1982 |
+
" <td>48.08</td>\n",
|
| 1983 |
" <td>40.00</td>\n",
|
| 1984 |
+
" <td>702018.00</td>\n",
|
| 1985 |
+
" <td>14600</td>\n",
|
| 1986 |
+
" <td>231.30</td>\n",
|
| 1987 |
+
" <td>233.10</td>\n",
|
| 1988 |
+
" <td>3377004.30</td>\n",
|
| 1989 |
+
" <td>14600</td>\n",
|
| 1990 |
+
" <td>9.20</td>\n",
|
| 1991 |
+
" <td>9.10</td>\n",
|
| 1992 |
+
" <td>134388.50</td>\n",
|
| 1993 |
" </tr>\n",
|
| 1994 |
" <tr>\n",
|
| 1995 |
" <th>22</th>\n",
|
| 1996 |
+
" <td>20822</td>\n",
|
| 1997 |
+
" <td>16.82</td>\n",
|
| 1998 |
+
" <td>15.00</td>\n",
|
| 1999 |
+
" <td>350273</td>\n",
|
| 2000 |
+
" <td>20822</td>\n",
|
| 2001 |
+
" <td>41.73</td>\n",
|
| 2002 |
+
" <td>30.00</td>\n",
|
| 2003 |
+
" <td>868924.00</td>\n",
|
| 2004 |
+
" <td>20822</td>\n",
|
| 2005 |
+
" <td>163.19</td>\n",
|
| 2006 |
+
" <td>159.20</td>\n",
|
| 2007 |
+
" <td>3397983.00</td>\n",
|
| 2008 |
+
" <td>20822</td>\n",
|
| 2009 |
+
" <td>6.55</td>\n",
|
| 2010 |
+
" <td>6.20</td>\n",
|
| 2011 |
+
" <td>136466.70</td>\n",
|
| 2012 |
" </tr>\n",
|
| 2013 |
" <tr>\n",
|
| 2014 |
" <th>23</th>\n",
|
| 2015 |
+
" <td>1400</td>\n",
|
| 2016 |
+
" <td>318.49</td>\n",
|
| 2017 |
+
" <td>600.00</td>\n",
|
| 2018 |
+
" <td>445884</td>\n",
|
| 2019 |
+
" <td>1400</td>\n",
|
| 2020 |
+
" <td>1608.64</td>\n",
|
| 2021 |
+
" <td>1500.00</td>\n",
|
| 2022 |
+
" <td>2252098.50</td>\n",
|
| 2023 |
+
" <td>1400</td>\n",
|
| 2024 |
+
" <td>120.29</td>\n",
|
| 2025 |
+
" <td>108.35</td>\n",
|
| 2026 |
+
" <td>168410.10</td>\n",
|
| 2027 |
+
" <td>1400</td>\n",
|
| 2028 |
+
" <td>5.57</td>\n",
|
| 2029 |
+
" <td>3.50</td>\n",
|
| 2030 |
+
" <td>7792.60</td>\n",
|
| 2031 |
" </tr>\n",
|
| 2032 |
" <tr>\n",
|
| 2033 |
" <th>24</th>\n",
|
| 2034 |
+
" <td>6427</td>\n",
|
| 2035 |
+
" <td>60.41</td>\n",
|
| 2036 |
+
" <td>20.00</td>\n",
|
| 2037 |
+
" <td>388270</td>\n",
|
| 2038 |
+
" <td>6427</td>\n",
|
| 2039 |
+
" <td>252.82</td>\n",
|
| 2040 |
+
" <td>250.00</td>\n",
|
| 2041 |
+
" <td>1624854.00</td>\n",
|
| 2042 |
+
" <td>6427</td>\n",
|
| 2043 |
+
" <td>167.79</td>\n",
|
| 2044 |
+
" <td>167.00</td>\n",
|
| 2045 |
+
" <td>1078381.30</td>\n",
|
| 2046 |
+
" <td>6427</td>\n",
|
| 2047 |
+
" <td>6.91</td>\n",
|
| 2048 |
+
" <td>5.30</td>\n",
|
| 2049 |
+
" <td>44428.80</td>\n",
|
| 2050 |
" </tr>\n",
|
| 2051 |
" <tr>\n",
|
| 2052 |
" <th>25</th>\n",
|
| 2053 |
+
" <td>8768</td>\n",
|
| 2054 |
+
" <td>20.49</td>\n",
|
| 2055 |
+
" <td>15.00</td>\n",
|
| 2056 |
+
" <td>179683</td>\n",
|
| 2057 |
+
" <td>8768</td>\n",
|
| 2058 |
+
" <td>63.16</td>\n",
|
| 2059 |
+
" <td>50.00</td>\n",
|
| 2060 |
+
" <td>553766.00</td>\n",
|
| 2061 |
+
" <td>8768</td>\n",
|
| 2062 |
+
" <td>365.91</td>\n",
|
| 2063 |
+
" <td>365.45</td>\n",
|
| 2064 |
+
" <td>3208261.10</td>\n",
|
| 2065 |
+
" <td>8768</td>\n",
|
| 2066 |
+
" <td>13.94</td>\n",
|
| 2067 |
+
" <td>13.90</td>\n",
|
| 2068 |
+
" <td>122190.50</td>\n",
|
| 2069 |
" </tr>\n",
|
| 2070 |
" <tr>\n",
|
| 2071 |
" <th>26</th>\n",
|
| 2072 |
+
" <td>2924</td>\n",
|
| 2073 |
+
" <td>130.59</td>\n",
|
| 2074 |
+
" <td>20.00</td>\n",
|
| 2075 |
+
" <td>381848</td>\n",
|
| 2076 |
+
" <td>2924</td>\n",
|
| 2077 |
+
" <td>583.80</td>\n",
|
| 2078 |
+
" <td>515.00</td>\n",
|
| 2079 |
+
" <td>1707044.00</td>\n",
|
| 2080 |
+
" <td>2924</td>\n",
|
| 2081 |
+
" <td>206.56</td>\n",
|
| 2082 |
+
" <td>208.45</td>\n",
|
| 2083 |
+
" <td>603978.10</td>\n",
|
| 2084 |
+
" <td>2924</td>\n",
|
| 2085 |
+
" <td>8.59</td>\n",
|
| 2086 |
+
" <td>7.00</td>\n",
|
| 2087 |
+
" <td>25118.10</td>\n",
|
| 2088 |
" </tr>\n",
|
| 2089 |
" <tr>\n",
|
| 2090 |
" <th>27</th>\n",
|
| 2091 |
+
" <td>38481</td>\n",
|
| 2092 |
+
" <td>13.79</td>\n",
|
| 2093 |
+
" <td>10.00</td>\n",
|
| 2094 |
+
" <td>530584</td>\n",
|
| 2095 |
+
" <td>38481</td>\n",
|
| 2096 |
+
" <td>29.59</td>\n",
|
| 2097 |
" <td>20.00</td>\n",
|
| 2098 |
+
" <td>1138564.00</td>\n",
|
| 2099 |
+
" <td>38481</td>\n",
|
| 2100 |
+
" <td>62.92</td>\n",
|
| 2101 |
+
" <td>63.70</td>\n",
|
| 2102 |
+
" <td>2421143.60</td>\n",
|
| 2103 |
+
" <td>38481</td>\n",
|
| 2104 |
+
" <td>3.33</td>\n",
|
| 2105 |
+
" <td>2.50</td>\n",
|
| 2106 |
+
" <td>128307.00</td>\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2107 |
" </tr>\n",
|
| 2108 |
" <tr>\n",
|
| 2109 |
" <th>28</th>\n",
|
| 2110 |
+
" <td>1266</td>\n",
|
| 2111 |
+
" <td>98.47</td>\n",
|
| 2112 |
+
" <td>20.00</td>\n",
|
| 2113 |
+
" <td>124664</td>\n",
|
| 2114 |
+
" <td>1266</td>\n",
|
| 2115 |
+
" <td>491.70</td>\n",
|
| 2116 |
+
" <td>485.00</td>\n",
|
| 2117 |
+
" <td>622495.00</td>\n",
|
| 2118 |
+
" <td>1266</td>\n",
|
| 2119 |
+
" <td>325.24</td>\n",
|
| 2120 |
+
" <td>304.25</td>\n",
|
| 2121 |
+
" <td>411751.80</td>\n",
|
| 2122 |
+
" <td>1266</td>\n",
|
| 2123 |
+
" <td>11.76</td>\n",
|
| 2124 |
+
" <td>10.90</td>\n",
|
| 2125 |
+
" <td>14883.00</td>\n",
|
| 2126 |
" </tr>\n",
|
| 2127 |
" <tr>\n",
|
| 2128 |
" <th>29</th>\n",
|
| 2129 |
+
" <td>433</td>\n",
|
| 2130 |
+
" <td>307.81</td>\n",
|
| 2131 |
+
" <td>180.00</td>\n",
|
| 2132 |
+
" <td>133280</td>\n",
|
| 2133 |
+
" <td>433</td>\n",
|
| 2134 |
+
" <td>1582.24</td>\n",
|
| 2135 |
+
" <td>1470.00</td>\n",
|
| 2136 |
+
" <td>685111.00</td>\n",
|
| 2137 |
+
" <td>433</td>\n",
|
| 2138 |
+
" <td>353.34</td>\n",
|
| 2139 |
+
" <td>284.00</td>\n",
|
| 2140 |
+
" <td>152997.10</td>\n",
|
| 2141 |
+
" <td>433</td>\n",
|
| 2142 |
+
" <td>11.26</td>\n",
|
| 2143 |
+
" <td>8.70</td>\n",
|
| 2144 |
+
" <td>4873.90</td>\n",
|
| 2145 |
" </tr>\n",
|
| 2146 |
" <tr>\n",
|
| 2147 |
" <th>30</th>\n",
|
| 2148 |
+
" <td>2618</td>\n",
|
| 2149 |
+
" <td>76.45</td>\n",
|
| 2150 |
" <td>20.00</td>\n",
|
| 2151 |
+
" <td>200150</td>\n",
|
| 2152 |
+
" <td>2618</td>\n",
|
| 2153 |
+
" <td>445.31</td>\n",
|
| 2154 |
+
" <td>435.00</td>\n",
|
| 2155 |
+
" <td>1165834.00</td>\n",
|
| 2156 |
+
" <td>2618</td>\n",
|
| 2157 |
+
" <td>311.42</td>\n",
|
| 2158 |
+
" <td>297.60</td>\n",
|
| 2159 |
+
" <td>815285.70</td>\n",
|
| 2160 |
+
" <td>2618</td>\n",
|
| 2161 |
+
" <td>11.51</td>\n",
|
| 2162 |
+
" <td>9.60</td>\n",
|
| 2163 |
+
" <td>30127.40</td>\n",
|
| 2164 |
" </tr>\n",
|
| 2165 |
" </tbody>\n",
|
| 2166 |
"</table>\n",
|
| 2167 |
"</div>"
|
| 2168 |
],
|
| 2169 |
"text/plain": [
|
| 2170 |
+
" PrepTime TotalTime Calories FatContent \n",
|
| 2171 |
+
" count mean median sum count mean median sum count mean median sum count mean median sum\n",
|
| 2172 |
+
"kmeans_cluster \n",
|
| 2173 |
+
"1 10150 18.91 15.00 191893 10150 53.82 45.00 546294.00 10150 302.73 304.45 3072734.00 10150 11.16 11.30 113300.40\n",
|
| 2174 |
+
"2 27204 17.06 15.00 464067 27204 45.24 35.00 1230656.00 27204 345.01 341.20 9385782.10 27204 17.55 17.50 477328.10\n",
|
| 2175 |
+
"3 10319 19.85 15.00 204813 10319 56.78 45.00 585963.00 10319 445.80 435.90 4600185.50 10319 19.69 19.00 203168.40\n",
|
| 2176 |
+
"4 595 386.09 600.00 229724 595 1582.14 1500.00 941373.00 595 508.17 461.90 302359.00 595 24.40 23.00 14517.20\n",
|
| 2177 |
+
"5 24230 16.87 15.00 408745 24230 40.80 30.00 988566.00 24230 127.92 124.90 3099574.30 24230 5.29 4.80 128225.60\n",
|
| 2178 |
+
"6 30092 17.67 15.00 531826 30092 47.17 40.00 1419518.00 30092 306.21 300.60 9214324.70 30092 14.05 13.70 422862.10\n",
|
| 2179 |
+
"7 17691 17.31 15.00 306216 17691 44.53 35.00 787806.00 17691 202.20 198.10 3577067.10 17691 8.02 7.60 141915.20\n",
|
| 2180 |
+
"8 1470 25.63 15.00 37671 1470 74.37 45.00 109330.00 1470 831.67 777.90 1222548.40 1470 36.25 33.60 53286.50\n",
|
| 2181 |
+
"9 3510 55.09 15.00 193381 3510 403.11 380.00 1414928.00 3510 459.85 439.70 1614084.40 3510 20.82 20.30 73062.50\n",
|
| 2182 |
+
"10 3220 22.47 15.00 72364 3220 70.24 45.00 226182.00 3220 855.32 805.35 2754126.40 3220 34.67 31.10 111645.40\n",
|
| 2183 |
+
"11 10522 16.93 15.00 178097 10522 46.67 35.00 491095.00 10522 224.54 233.80 2362630.30 10522 7.50 7.40 78956.80\n",
|
| 2184 |
+
"12 39868 15.53 10.00 618985 39868 37.67 30.00 1501918.00 39868 200.38 200.00 7988725.40 39868 10.28 10.00 409733.90\n",
|
| 2185 |
+
"13 696 315.80 600.00 219799 696 1569.19 1470.00 1092154.50 696 253.00 217.90 176089.00 696 10.50 7.55 7305.50\n",
|
| 2186 |
+
"14 5987 20.70 15.00 123917 5987 53.96 40.00 323084.00 5987 800.43 763.20 4792188.40 5987 35.13 32.30 210313.20\n",
|
| 2187 |
+
"15 16806 19.38 15.00 325719 16806 55.95 45.00 940309.00 16806 322.58 320.50 5421314.00 16806 14.12 13.70 237314.40\n",
|
| 2188 |
+
"16 5304 20.64 15.00 109466 5304 61.24 45.00 324843.00 5304 530.90 509.05 2815888.00 5304 23.75 22.35 125945.80\n",
|
| 2189 |
+
"17 30773 15.46 10.00 475666 30773 35.91 30.00 1105185.00 30773 112.53 111.70 3462883.00 30773 5.10 4.40 156846.50\n",
|
| 2190 |
+
"18 13966 19.59 15.00 273562 13966 55.51 45.00 775184.00 13966 535.79 525.60 7482843.10 13966 23.71 23.00 331071.90\n",
|
| 2191 |
+
"19 6085 20.09 15.00 122219 6085 59.09 50.00 359566.00 6085 431.25 409.20 2624172.00 6085 19.81 19.20 120567.00\n",
|
| 2192 |
+
"20 19476 18.23 15.00 354998 19476 49.63 40.00 966647.00 19476 509.76 497.20 9928174.30 19476 24.66 23.90 480274.20\n",
|
| 2193 |
+
"21 14600 17.77 15.00 259437 14600 48.08 40.00 702018.00 14600 231.30 233.10 3377004.30 14600 9.20 9.10 134388.50\n",
|
| 2194 |
+
"22 20822 16.82 15.00 350273 20822 41.73 30.00 868924.00 20822 163.19 159.20 3397983.00 20822 6.55 6.20 136466.70\n",
|
| 2195 |
+
"23 1400 318.49 600.00 445884 1400 1608.64 1500.00 2252098.50 1400 120.29 108.35 168410.10 1400 5.57 3.50 7792.60\n",
|
| 2196 |
+
"24 6427 60.41 20.00 388270 6427 252.82 250.00 1624854.00 6427 167.79 167.00 1078381.30 6427 6.91 5.30 44428.80\n",
|
| 2197 |
+
"25 8768 20.49 15.00 179683 8768 63.16 50.00 553766.00 8768 365.91 365.45 3208261.10 8768 13.94 13.90 122190.50\n",
|
| 2198 |
+
"26 2924 130.59 20.00 381848 2924 583.80 515.00 1707044.00 2924 206.56 208.45 603978.10 2924 8.59 7.00 25118.10\n",
|
| 2199 |
+
"27 38481 13.79 10.00 530584 38481 29.59 20.00 1138564.00 38481 62.92 63.70 2421143.60 38481 3.33 2.50 128307.00\n",
|
| 2200 |
+
"28 1266 98.47 20.00 124664 1266 491.70 485.00 622495.00 1266 325.24 304.25 411751.80 1266 11.76 10.90 14883.00\n",
|
| 2201 |
+
"29 433 307.81 180.00 133280 433 1582.24 1470.00 685111.00 433 353.34 284.00 152997.10 433 11.26 8.70 4873.90\n",
|
| 2202 |
+
"30 2618 76.45 20.00 200150 2618 445.31 435.00 1165834.00 2618 311.42 297.60 815285.70 2618 11.51 9.60 30127.40"
|
| 2203 |
]
|
| 2204 |
},
|
| 2205 |
+
"execution_count": 16,
|
| 2206 |
"metadata": {},
|
| 2207 |
"output_type": "execute_result"
|
| 2208 |
}
|
benchmark/pandas_12/pandas_12_reproduced.ipynb
CHANGED
|
@@ -222,7 +222,7 @@
|
|
| 222 |
},
|
| 223 |
{
|
| 224 |
"cell_type": "code",
|
| 225 |
-
"execution_count":
|
| 226 |
"metadata": {
|
| 227 |
"execution": {
|
| 228 |
"iopub.execute_input": "2023-12-15T14:49:11.184383Z",
|
|
@@ -232,18 +232,7 @@
|
|
| 232 |
"shell.execute_reply.started": "2023-12-15T14:49:11.184259Z"
|
| 233 |
}
|
| 234 |
},
|
| 235 |
-
"outputs": [
|
| 236 |
-
{
|
| 237 |
-
"data": {
|
| 238 |
-
"text/plain": [
|
| 239 |
-
"(375703, 16)"
|
| 240 |
-
]
|
| 241 |
-
},
|
| 242 |
-
"execution_count": 3,
|
| 243 |
-
"metadata": {},
|
| 244 |
-
"output_type": "execute_result"
|
| 245 |
-
}
|
| 246 |
-
],
|
| 247 |
"source": [
|
| 248 |
"df.shape"
|
| 249 |
]
|
|
@@ -294,7 +283,7 @@
|
|
| 294 |
},
|
| 295 |
{
|
| 296 |
"cell_type": "code",
|
| 297 |
-
"execution_count":
|
| 298 |
"metadata": {
|
| 299 |
"execution": {
|
| 300 |
"iopub.execute_input": "2023-12-15T15:07:27.714708Z",
|
|
@@ -331,7 +320,7 @@
|
|
| 331 |
},
|
| 332 |
{
|
| 333 |
"cell_type": "code",
|
| 334 |
-
"execution_count":
|
| 335 |
"metadata": {
|
| 336 |
"execution": {
|
| 337 |
"iopub.execute_input": "2023-12-15T15:07:30.113075Z",
|
|
@@ -400,7 +389,7 @@
|
|
| 400 |
},
|
| 401 |
{
|
| 402 |
"cell_type": "code",
|
| 403 |
-
"execution_count":
|
| 404 |
"metadata": {
|
| 405 |
"execution": {
|
| 406 |
"iopub.execute_input": "2023-12-15T15:07:37.208238Z",
|
|
@@ -457,7 +446,7 @@
|
|
| 457 |
},
|
| 458 |
{
|
| 459 |
"cell_type": "code",
|
| 460 |
-
"execution_count":
|
| 461 |
"metadata": {
|
| 462 |
"execution": {
|
| 463 |
"iopub.execute_input": "2023-12-15T15:07:49.912389Z",
|
|
@@ -480,7 +469,7 @@
|
|
| 480 |
},
|
| 481 |
{
|
| 482 |
"cell_type": "code",
|
| 483 |
-
"execution_count":
|
| 484 |
"metadata": {
|
| 485 |
"execution": {
|
| 486 |
"iopub.execute_input": "2023-12-15T15:07:53.138237Z",
|
|
@@ -497,7 +486,7 @@
|
|
| 497 |
"False"
|
| 498 |
]
|
| 499 |
},
|
| 500 |
-
"execution_count":
|
| 501 |
"metadata": {},
|
| 502 |
"output_type": "execute_result"
|
| 503 |
}
|
|
@@ -904,7 +893,7 @@
|
|
| 904 |
},
|
| 905 |
{
|
| 906 |
"cell_type": "code",
|
| 907 |
-
"execution_count":
|
| 908 |
"metadata": {
|
| 909 |
"execution": {
|
| 910 |
"iopub.execute_input": "2023-12-15T15:08:08.362107Z",
|
|
@@ -914,160 +903,7 @@
|
|
| 914 |
"shell.execute_reply.started": "2023-12-15T15:08:08.362069Z"
|
| 915 |
}
|
| 916 |
},
|
| 917 |
-
"outputs": [
|
| 918 |
-
{
|
| 919 |
-
"data": {
|
| 920 |
-
"text/html": [
|
| 921 |
-
"<div>\n",
|
| 922 |
-
"<style scoped>\n",
|
| 923 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 924 |
-
" vertical-align: middle;\n",
|
| 925 |
-
" }\n",
|
| 926 |
-
"\n",
|
| 927 |
-
" .dataframe tbody tr th {\n",
|
| 928 |
-
" vertical-align: top;\n",
|
| 929 |
-
" }\n",
|
| 930 |
-
"\n",
|
| 931 |
-
" .dataframe thead th {\n",
|
| 932 |
-
" text-align: right;\n",
|
| 933 |
-
" }\n",
|
| 934 |
-
"</style>\n",
|
| 935 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 936 |
-
" <thead>\n",
|
| 937 |
-
" <tr style=\"text-align: right;\">\n",
|
| 938 |
-
" <th></th>\n",
|
| 939 |
-
" <th>RecipeId</th>\n",
|
| 940 |
-
" <th>Name</th>\n",
|
| 941 |
-
" <th>CookTime</th>\n",
|
| 942 |
-
" <th>PrepTime</th>\n",
|
| 943 |
-
" <th>TotalTime</th>\n",
|
| 944 |
-
" <th>RecipeIngredientParts</th>\n",
|
| 945 |
-
" <th>Calories</th>\n",
|
| 946 |
-
" <th>FatContent</th>\n",
|
| 947 |
-
" <th>SaturatedFatContent</th>\n",
|
| 948 |
-
" <th>CholesterolContent</th>\n",
|
| 949 |
-
" <th>SodiumContent</th>\n",
|
| 950 |
-
" <th>CarbohydrateContent</th>\n",
|
| 951 |
-
" <th>FiberContent</th>\n",
|
| 952 |
-
" <th>SugarContent</th>\n",
|
| 953 |
-
" <th>ProteinContent</th>\n",
|
| 954 |
-
" <th>RecipeInstructions</th>\n",
|
| 955 |
-
" </tr>\n",
|
| 956 |
-
" </thead>\n",
|
| 957 |
-
" <tbody>\n",
|
| 958 |
-
" <tr>\n",
|
| 959 |
-
" <th>0</th>\n",
|
| 960 |
-
" <td>38.00</td>\n",
|
| 961 |
-
" <td>Low-Fat Berry Blue Frozen Dessert</td>\n",
|
| 962 |
-
" <td>1200</td>\n",
|
| 963 |
-
" <td>45</td>\n",
|
| 964 |
-
" <td>1485.00</td>\n",
|
| 965 |
-
" <td>c(\"blueberries\", \"granulated sugar\", \"vanilla ...</td>\n",
|
| 966 |
-
" <td>170.90</td>\n",
|
| 967 |
-
" <td>2.50</td>\n",
|
| 968 |
-
" <td>1.30</td>\n",
|
| 969 |
-
" <td>8.00</td>\n",
|
| 970 |
-
" <td>29.80</td>\n",
|
| 971 |
-
" <td>37.10</td>\n",
|
| 972 |
-
" <td>3.60</td>\n",
|
| 973 |
-
" <td>30.20</td>\n",
|
| 974 |
-
" <td>3.20</td>\n",
|
| 975 |
-
" <td>c(\"Toss 2 cups berries with sugar.\", \"Let stan...</td>\n",
|
| 976 |
-
" </tr>\n",
|
| 977 |
-
" <tr>\n",
|
| 978 |
-
" <th>1</th>\n",
|
| 979 |
-
" <td>41.00</td>\n",
|
| 980 |
-
" <td>Carina's Tofu-Vegetable Kebabs</td>\n",
|
| 981 |
-
" <td>20</td>\n",
|
| 982 |
-
" <td>600</td>\n",
|
| 983 |
-
" <td>1460.00</td>\n",
|
| 984 |
-
" <td>c(\"extra firm tofu\", \"eggplant\", \"zucchini\", \"...</td>\n",
|
| 985 |
-
" <td>536.10</td>\n",
|
| 986 |
-
" <td>24.00</td>\n",
|
| 987 |
-
" <td>3.80</td>\n",
|
| 988 |
-
" <td>0.00</td>\n",
|
| 989 |
-
" <td>1558.60</td>\n",
|
| 990 |
-
" <td>64.20</td>\n",
|
| 991 |
-
" <td>17.30</td>\n",
|
| 992 |
-
" <td>32.10</td>\n",
|
| 993 |
-
" <td>29.30</td>\n",
|
| 994 |
-
" <td>c(\"Drain the tofu, carefully squeezing out exc...</td>\n",
|
| 995 |
-
" </tr>\n",
|
| 996 |
-
" <tr>\n",
|
| 997 |
-
" <th>2</th>\n",
|
| 998 |
-
" <td>42.00</td>\n",
|
| 999 |
-
" <td>Cabbage Soup</td>\n",
|
| 1000 |
-
" <td>30</td>\n",
|
| 1001 |
-
" <td>20</td>\n",
|
| 1002 |
-
" <td>50.00</td>\n",
|
| 1003 |
-
" <td>c(\"plain tomato juice\", \"cabbage\", \"onion\", \"c...</td>\n",
|
| 1004 |
-
" <td>103.60</td>\n",
|
| 1005 |
-
" <td>0.40</td>\n",
|
| 1006 |
-
" <td>0.10</td>\n",
|
| 1007 |
-
" <td>0.00</td>\n",
|
| 1008 |
-
" <td>959.30</td>\n",
|
| 1009 |
-
" <td>25.10</td>\n",
|
| 1010 |
-
" <td>4.80</td>\n",
|
| 1011 |
-
" <td>17.70</td>\n",
|
| 1012 |
-
" <td>4.30</td>\n",
|
| 1013 |
-
" <td>c(\"Mix everything together and bring to a boil...</td>\n",
|
| 1014 |
-
" </tr>\n",
|
| 1015 |
-
" <tr>\n",
|
| 1016 |
-
" <th>3</th>\n",
|
| 1017 |
-
" <td>45.00</td>\n",
|
| 1018 |
-
" <td>Buttermilk Pie With Gingersnap Crumb Crust</td>\n",
|
| 1019 |
-
" <td>50</td>\n",
|
| 1020 |
-
" <td>30</td>\n",
|
| 1021 |
-
" <td>80.00</td>\n",
|
| 1022 |
-
" <td>c(\"sugar\", \"margarine\", \"egg\", \"flour\", \"salt\"...</td>\n",
|
| 1023 |
-
" <td>228.00</td>\n",
|
| 1024 |
-
" <td>7.10</td>\n",
|
| 1025 |
-
" <td>1.70</td>\n",
|
| 1026 |
-
" <td>24.50</td>\n",
|
| 1027 |
-
" <td>281.80</td>\n",
|
| 1028 |
-
" <td>37.50</td>\n",
|
| 1029 |
-
" <td>0.50</td>\n",
|
| 1030 |
-
" <td>24.70</td>\n",
|
| 1031 |
-
" <td>4.20</td>\n",
|
| 1032 |
-
" <td>c(\"Preheat oven to 350°F.\", \"Make pie crust, u...</td>\n",
|
| 1033 |
-
" </tr>\n",
|
| 1034 |
-
" <tr>\n",
|
| 1035 |
-
" <th>4</th>\n",
|
| 1036 |
-
" <td>46.00</td>\n",
|
| 1037 |
-
" <td>A Jad - Cucumber Pickle</td>\n",
|
| 1038 |
-
" <td>0</td>\n",
|
| 1039 |
-
" <td>25</td>\n",
|
| 1040 |
-
" <td>25.00</td>\n",
|
| 1041 |
-
" <td>c(\"rice vinegar\", \"haeo\")</td>\n",
|
| 1042 |
-
" <td>4.30</td>\n",
|
| 1043 |
-
" <td>0.00</td>\n",
|
| 1044 |
-
" <td>0.00</td>\n",
|
| 1045 |
-
" <td>0.00</td>\n",
|
| 1046 |
-
" <td>0.70</td>\n",
|
| 1047 |
-
" <td>1.10</td>\n",
|
| 1048 |
-
" <td>0.20</td>\n",
|
| 1049 |
-
" <td>0.20</td>\n",
|
| 1050 |
-
" <td>0.10</td>\n",
|
| 1051 |
-
" <td>c(\"Slice the cucumber in four lengthwise, then...</td>\n",
|
| 1052 |
-
" </tr>\n",
|
| 1053 |
-
" </tbody>\n",
|
| 1054 |
-
"</table>\n",
|
| 1055 |
-
"</div>"
|
| 1056 |
-
],
|
| 1057 |
-
"text/plain": [
|
| 1058 |
-
" RecipeId Name CookTime PrepTime TotalTime RecipeIngredientParts Calories FatContent SaturatedFatContent CholesterolContent SodiumContent CarbohydrateContent FiberContent SugarContent ProteinContent RecipeInstructions\n",
|
| 1059 |
-
"0 38.00 Low-Fat Berry Blue Frozen Dessert 1200 45 1485.00 c(\"blueberries\", \"granulated sugar\", \"vanilla ... 170.90 2.50 1.30 8.00 29.80 37.10 3.60 30.20 3.20 c(\"Toss 2 cups berries with sugar.\", \"Let stan...\n",
|
| 1060 |
-
"1 41.00 Carina's Tofu-Vegetable Kebabs 20 600 1460.00 c(\"extra firm tofu\", \"eggplant\", \"zucchini\", \"... 536.10 24.00 3.80 0.00 1558.60 64.20 17.30 32.10 29.30 c(\"Drain the tofu, carefully squeezing out exc...\n",
|
| 1061 |
-
"2 42.00 Cabbage Soup 30 20 50.00 c(\"plain tomato juice\", \"cabbage\", \"onion\", \"c... 103.60 0.40 0.10 0.00 959.30 25.10 4.80 17.70 4.30 c(\"Mix everything together and bring to a boil...\n",
|
| 1062 |
-
"3 45.00 Buttermilk Pie With Gingersnap Crumb Crust 50 30 80.00 c(\"sugar\", \"margarine\", \"egg\", \"flour\", \"salt\"... 228.00 7.10 1.70 24.50 281.80 37.50 0.50 24.70 4.20 c(\"Preheat oven to 350°F.\", \"Make pie crust, u...\n",
|
| 1063 |
-
"4 46.00 A Jad - Cucumber Pickle 0 25 25.00 c(\"rice vinegar\", \"haeo\") 4.30 0.00 0.00 0.00 0.70 1.10 0.20 0.20 0.10 c(\"Slice the cucumber in four lengthwise, then..."
|
| 1064 |
-
]
|
| 1065 |
-
},
|
| 1066 |
-
"execution_count": 9,
|
| 1067 |
-
"metadata": {},
|
| 1068 |
-
"output_type": "execute_result"
|
| 1069 |
-
}
|
| 1070 |
-
],
|
| 1071 |
"source": [
|
| 1072 |
"df.head()"
|
| 1073 |
]
|
|
@@ -1359,7 +1195,7 @@
|
|
| 1359 |
{
|
| 1360 |
"data": {
|
| 1361 |
"text/plain": [
|
| 1362 |
-
"array([12, 12,
|
| 1363 |
]
|
| 1364 |
},
|
| 1365 |
"execution_count": 16,
|
|
@@ -1480,7 +1316,7 @@
|
|
| 1480 |
" <td>17.70</td>\n",
|
| 1481 |
" <td>4.30</td>\n",
|
| 1482 |
" <td>c(\"Mix everything together and bring to a boil...</td>\n",
|
| 1483 |
-
" <td>
|
| 1484 |
" </tr>\n",
|
| 1485 |
" <tr>\n",
|
| 1486 |
" <th>3</th>\n",
|
|
@@ -1499,7 +1335,7 @@
|
|
| 1499 |
" <td>24.70</td>\n",
|
| 1500 |
" <td>4.20</td>\n",
|
| 1501 |
" <td>c(\"Preheat oven to 350°F.\", \"Make pie crust, u...</td>\n",
|
| 1502 |
-
" <td>
|
| 1503 |
" </tr>\n",
|
| 1504 |
" <tr>\n",
|
| 1505 |
" <th>4</th>\n",
|
|
@@ -1518,7 +1354,7 @@
|
|
| 1518 |
" <td>0.20</td>\n",
|
| 1519 |
" <td>0.10</td>\n",
|
| 1520 |
" <td>c(\"Slice the cucumber in four lengthwise, then...</td>\n",
|
| 1521 |
-
" <td>
|
| 1522 |
" </tr>\n",
|
| 1523 |
" </tbody>\n",
|
| 1524 |
"</table>\n",
|
|
@@ -1528,9 +1364,9 @@
|
|
| 1528 |
" Name CookTime PrepTime TotalTime RecipeIngredientParts Calories FatContent SaturatedFatContent CholesterolContent SodiumContent CarbohydrateContent FiberContent SugarContent ProteinContent RecipeInstructions kmeans_cluster\n",
|
| 1529 |
"0 Low-Fat Berry Blue Frozen Dessert 1200 45 1485.00 c(\"blueberries\", \"granulated sugar\", \"vanilla ... 170.90 2.50 1.30 8.00 29.80 37.10 3.60 30.20 3.20 c(\"Toss 2 cups berries with sugar.\", \"Let stan... 13\n",
|
| 1530 |
"1 Carina's Tofu-Vegetable Kebabs 20 600 1460.00 c(\"extra firm tofu\", \"eggplant\", \"zucchini\", \"... 536.10 24.00 3.80 0.00 1558.60 64.20 17.30 32.10 29.30 c(\"Drain the tofu, carefully squeezing out exc... 13\n",
|
| 1531 |
-
"2 Cabbage Soup 30 20 50.00 c(\"plain tomato juice\", \"cabbage\", \"onion\", \"c... 103.60 0.40 0.10 0.00 959.30 25.10 4.80 17.70 4.30 c(\"Mix everything together and bring to a boil...
|
| 1532 |
-
"3 Buttermilk Pie With Gingersnap Crumb Crust 50 30 80.00 c(\"sugar\", \"margarine\", \"egg\", \"flour\", \"salt\"... 228.00 7.10 1.70 24.50 281.80 37.50 0.50 24.70 4.20 c(\"Preheat oven to 350°F.\", \"Make pie crust, u...
|
| 1533 |
-
"4 A Jad - Cucumber Pickle 0 25 25.00 c(\"rice vinegar\", \"haeo\") 4.30 0.00 0.00 0.00 0.70 1.10 0.20 0.20 0.10 c(\"Slice the cucumber in four lengthwise, then...
|
| 1534 |
]
|
| 1535 |
},
|
| 1536 |
"execution_count": 17,
|
|
@@ -1563,7 +1399,7 @@
|
|
| 1563 |
},
|
| 1564 |
{
|
| 1565 |
"cell_type": "code",
|
| 1566 |
-
"execution_count":
|
| 1567 |
"metadata": {
|
| 1568 |
"execution": {
|
| 1569 |
"iopub.execute_input": "2023-12-15T15:39:45.812785Z",
|
|
@@ -1573,49 +1409,7 @@
|
|
| 1573 |
"shell.execute_reply.started": "2023-12-15T15:39:45.812755Z"
|
| 1574 |
}
|
| 1575 |
},
|
| 1576 |
-
"outputs": [
|
| 1577 |
-
{
|
| 1578 |
-
"data": {
|
| 1579 |
-
"text/plain": [
|
| 1580 |
-
"kmeans_cluster\n",
|
| 1581 |
-
"1 39609\n",
|
| 1582 |
-
"17 37812\n",
|
| 1583 |
-
"14 28694\n",
|
| 1584 |
-
"25 28350\n",
|
| 1585 |
-
"16 28011\n",
|
| 1586 |
-
"11 22610\n",
|
| 1587 |
-
"8 19120\n",
|
| 1588 |
-
"5 18189\n",
|
| 1589 |
-
"28 17199\n",
|
| 1590 |
-
"18 17199\n",
|
| 1591 |
-
"9 15456\n",
|
| 1592 |
-
"21 12824\n",
|
| 1593 |
-
"24 12747\n",
|
| 1594 |
-
"12 11706\n",
|
| 1595 |
-
"3 10654\n",
|
| 1596 |
-
"15 10040\n",
|
| 1597 |
-
"6 8629\n",
|
| 1598 |
-
"20 6746\n",
|
| 1599 |
-
"27 6377\n",
|
| 1600 |
-
"7 5329\n",
|
| 1601 |
-
"10 3543\n",
|
| 1602 |
-
"30 2921\n",
|
| 1603 |
-
"23 2587\n",
|
| 1604 |
-
"19 2454\n",
|
| 1605 |
-
"2 2453\n",
|
| 1606 |
-
"29 1298\n",
|
| 1607 |
-
"26 1263\n",
|
| 1608 |
-
"4 807\n",
|
| 1609 |
-
"22 663\n",
|
| 1610 |
-
"13 413\n",
|
| 1611 |
-
"Name: count, dtype: int64"
|
| 1612 |
-
]
|
| 1613 |
-
},
|
| 1614 |
-
"execution_count": 18,
|
| 1615 |
-
"metadata": {},
|
| 1616 |
-
"output_type": "execute_result"
|
| 1617 |
-
}
|
| 1618 |
-
],
|
| 1619 |
"source": [
|
| 1620 |
"df[\"kmeans_cluster\"].value_counts()"
|
| 1621 |
]
|
|
@@ -1717,7 +1511,7 @@
|
|
| 1717 |
},
|
| 1718 |
{
|
| 1719 |
"cell_type": "code",
|
| 1720 |
-
"execution_count":
|
| 1721 |
"metadata": {
|
| 1722 |
"execution": {
|
| 1723 |
"iopub.execute_input": "2023-12-15T15:03:01.714109Z",
|
|
@@ -1735,7 +1529,7 @@
|
|
| 1735 |
"traceback": [
|
| 1736 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1737 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 1738 |
-
"\u001b[0;32m<ipython-input-
|
| 1739 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/groupby/generic.py\u001b[0m in \u001b[0;36maggregate\u001b[0;34m(self, func, engine, engine_kwargs, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1443\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1444\u001b[0m \u001b[0mop\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mGroupByApply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1445\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mop\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0magg\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1446\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mis_dict_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mresult\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1447\u001b[0m \u001b[0;31m# GH #52849\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1740 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/apply.py\u001b[0m in \u001b[0;36magg\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 173\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 174\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mis_dict_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 175\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0magg_dict_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 176\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mis_list_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 177\u001b[0m \u001b[0;31m# we require a list, but not a 'str'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1741 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/apply.py\u001b[0m in \u001b[0;36magg_dict_like\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 404\u001b[0m \u001b[0mResult\u001b[0m \u001b[0mof\u001b[0m \u001b[0maggregation\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 405\u001b[0m \"\"\"\n\u001b[0;32m--> 406\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0magg_or_apply_dict_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mop_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"agg\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 407\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 408\u001b[0m def compute_dict_like(\n",
|
|
|
|
| 222 |
},
|
| 223 |
{
|
| 224 |
"cell_type": "code",
|
| 225 |
+
"execution_count": null,
|
| 226 |
"metadata": {
|
| 227 |
"execution": {
|
| 228 |
"iopub.execute_input": "2023-12-15T14:49:11.184383Z",
|
|
|
|
| 232 |
"shell.execute_reply.started": "2023-12-15T14:49:11.184259Z"
|
| 233 |
}
|
| 234 |
},
|
| 235 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
"source": [
|
| 237 |
"df.shape"
|
| 238 |
]
|
|
|
|
| 283 |
},
|
| 284 |
{
|
| 285 |
"cell_type": "code",
|
| 286 |
+
"execution_count": 3,
|
| 287 |
"metadata": {
|
| 288 |
"execution": {
|
| 289 |
"iopub.execute_input": "2023-12-15T15:07:27.714708Z",
|
|
|
|
| 320 |
},
|
| 321 |
{
|
| 322 |
"cell_type": "code",
|
| 323 |
+
"execution_count": 6,
|
| 324 |
"metadata": {
|
| 325 |
"execution": {
|
| 326 |
"iopub.execute_input": "2023-12-15T15:07:30.113075Z",
|
|
|
|
| 389 |
},
|
| 390 |
{
|
| 391 |
"cell_type": "code",
|
| 392 |
+
"execution_count": 7,
|
| 393 |
"metadata": {
|
| 394 |
"execution": {
|
| 395 |
"iopub.execute_input": "2023-12-15T15:07:37.208238Z",
|
|
|
|
| 446 |
},
|
| 447 |
{
|
| 448 |
"cell_type": "code",
|
| 449 |
+
"execution_count": 8,
|
| 450 |
"metadata": {
|
| 451 |
"execution": {
|
| 452 |
"iopub.execute_input": "2023-12-15T15:07:49.912389Z",
|
|
|
|
| 469 |
},
|
| 470 |
{
|
| 471 |
"cell_type": "code",
|
| 472 |
+
"execution_count": 9,
|
| 473 |
"metadata": {
|
| 474 |
"execution": {
|
| 475 |
"iopub.execute_input": "2023-12-15T15:07:53.138237Z",
|
|
|
|
| 486 |
"False"
|
| 487 |
]
|
| 488 |
},
|
| 489 |
+
"execution_count": 9,
|
| 490 |
"metadata": {},
|
| 491 |
"output_type": "execute_result"
|
| 492 |
}
|
|
|
|
| 893 |
},
|
| 894 |
{
|
| 895 |
"cell_type": "code",
|
| 896 |
+
"execution_count": null,
|
| 897 |
"metadata": {
|
| 898 |
"execution": {
|
| 899 |
"iopub.execute_input": "2023-12-15T15:08:08.362107Z",
|
|
|
|
| 903 |
"shell.execute_reply.started": "2023-12-15T15:08:08.362069Z"
|
| 904 |
}
|
| 905 |
},
|
| 906 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 907 |
"source": [
|
| 908 |
"df.head()"
|
| 909 |
]
|
|
|
|
| 1195 |
{
|
| 1196 |
"data": {
|
| 1197 |
"text/plain": [
|
| 1198 |
+
"array([12, 12, 6, ..., 13, 15, 23], dtype=int32)"
|
| 1199 |
]
|
| 1200 |
},
|
| 1201 |
"execution_count": 16,
|
|
|
|
| 1316 |
" <td>17.70</td>\n",
|
| 1317 |
" <td>4.30</td>\n",
|
| 1318 |
" <td>c(\"Mix everything together and bring to a boil...</td>\n",
|
| 1319 |
+
" <td>7</td>\n",
|
| 1320 |
" </tr>\n",
|
| 1321 |
" <tr>\n",
|
| 1322 |
" <th>3</th>\n",
|
|
|
|
| 1335 |
" <td>24.70</td>\n",
|
| 1336 |
" <td>4.20</td>\n",
|
| 1337 |
" <td>c(\"Preheat oven to 350°F.\", \"Make pie crust, u...</td>\n",
|
| 1338 |
+
" <td>16</td>\n",
|
| 1339 |
" </tr>\n",
|
| 1340 |
" <tr>\n",
|
| 1341 |
" <th>4</th>\n",
|
|
|
|
| 1354 |
" <td>0.20</td>\n",
|
| 1355 |
" <td>0.10</td>\n",
|
| 1356 |
" <td>c(\"Slice the cucumber in four lengthwise, then...</td>\n",
|
| 1357 |
+
" <td>24</td>\n",
|
| 1358 |
" </tr>\n",
|
| 1359 |
" </tbody>\n",
|
| 1360 |
"</table>\n",
|
|
|
|
| 1364 |
" Name CookTime PrepTime TotalTime RecipeIngredientParts Calories FatContent SaturatedFatContent CholesterolContent SodiumContent CarbohydrateContent FiberContent SugarContent ProteinContent RecipeInstructions kmeans_cluster\n",
|
| 1365 |
"0 Low-Fat Berry Blue Frozen Dessert 1200 45 1485.00 c(\"blueberries\", \"granulated sugar\", \"vanilla ... 170.90 2.50 1.30 8.00 29.80 37.10 3.60 30.20 3.20 c(\"Toss 2 cups berries with sugar.\", \"Let stan... 13\n",
|
| 1366 |
"1 Carina's Tofu-Vegetable Kebabs 20 600 1460.00 c(\"extra firm tofu\", \"eggplant\", \"zucchini\", \"... 536.10 24.00 3.80 0.00 1558.60 64.20 17.30 32.10 29.30 c(\"Drain the tofu, carefully squeezing out exc... 13\n",
|
| 1367 |
+
"2 Cabbage Soup 30 20 50.00 c(\"plain tomato juice\", \"cabbage\", \"onion\", \"c... 103.60 0.40 0.10 0.00 959.30 25.10 4.80 17.70 4.30 c(\"Mix everything together and bring to a boil... 7\n",
|
| 1368 |
+
"3 Buttermilk Pie With Gingersnap Crumb Crust 50 30 80.00 c(\"sugar\", \"margarine\", \"egg\", \"flour\", \"salt\"... 228.00 7.10 1.70 24.50 281.80 37.50 0.50 24.70 4.20 c(\"Preheat oven to 350°F.\", \"Make pie crust, u... 16\n",
|
| 1369 |
+
"4 A Jad - Cucumber Pickle 0 25 25.00 c(\"rice vinegar\", \"haeo\") 4.30 0.00 0.00 0.00 0.70 1.10 0.20 0.20 0.10 c(\"Slice the cucumber in four lengthwise, then... 24"
|
| 1370 |
]
|
| 1371 |
},
|
| 1372 |
"execution_count": 17,
|
|
|
|
| 1399 |
},
|
| 1400 |
{
|
| 1401 |
"cell_type": "code",
|
| 1402 |
+
"execution_count": null,
|
| 1403 |
"metadata": {
|
| 1404 |
"execution": {
|
| 1405 |
"iopub.execute_input": "2023-12-15T15:39:45.812785Z",
|
|
|
|
| 1409 |
"shell.execute_reply.started": "2023-12-15T15:39:45.812755Z"
|
| 1410 |
}
|
| 1411 |
},
|
| 1412 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1413 |
"source": [
|
| 1414 |
"df[\"kmeans_cluster\"].value_counts()"
|
| 1415 |
]
|
|
|
|
| 1511 |
},
|
| 1512 |
{
|
| 1513 |
"cell_type": "code",
|
| 1514 |
+
"execution_count": 18,
|
| 1515 |
"metadata": {
|
| 1516 |
"execution": {
|
| 1517 |
"iopub.execute_input": "2023-12-15T15:03:01.714109Z",
|
|
|
|
| 1529 |
"traceback": [
|
| 1530 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1531 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 1532 |
+
"\u001b[0;32m<ipython-input-18-a9d85aff27dd>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m df.groupby('kmeans_cluster').agg({1: ['count','mean', 'median', 'sum'],\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'count'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'mean'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'median'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'sum'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;36m3\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'count'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'mean'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'median'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'sum'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m 4: ['count','mean','median', 'sum']})\n",
|
| 1533 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/groupby/generic.py\u001b[0m in \u001b[0;36maggregate\u001b[0;34m(self, func, engine, engine_kwargs, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1443\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1444\u001b[0m \u001b[0mop\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mGroupByApply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1445\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mop\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0magg\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1446\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mis_dict_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mresult\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1447\u001b[0m \u001b[0;31m# GH #52849\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1534 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/apply.py\u001b[0m in \u001b[0;36magg\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 173\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 174\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mis_dict_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 175\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0magg_dict_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 176\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mis_list_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 177\u001b[0m \u001b[0;31m# we require a list, but not a 'str'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1535 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/apply.py\u001b[0m in \u001b[0;36magg_dict_like\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 404\u001b[0m \u001b[0mResult\u001b[0m \u001b[0mof\u001b[0m \u001b[0maggregation\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 405\u001b[0m \"\"\"\n\u001b[0;32m--> 406\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0magg_or_apply_dict_like\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mop_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"agg\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 407\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 408\u001b[0m def compute_dict_like(\n",
|
benchmark/pandas_13/pandas_13_fixed.ipynb
CHANGED
|
@@ -232,7 +232,7 @@
|
|
| 232 |
},
|
| 233 |
{
|
| 234 |
"cell_type": "code",
|
| 235 |
-
"execution_count":
|
| 236 |
"metadata": {
|
| 237 |
"execution": {
|
| 238 |
"iopub.execute_input": "2023-08-11T09:05:54.311108Z",
|
|
@@ -242,30 +242,7 @@
|
|
| 242 |
"shell.execute_reply.started": "2023-08-11T09:05:54.311087Z"
|
| 243 |
}
|
| 244 |
},
|
| 245 |
-
"outputs": [
|
| 246 |
-
{
|
| 247 |
-
"name": "stdout",
|
| 248 |
-
"output_type": "stream",
|
| 249 |
-
"text": [
|
| 250 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 251 |
-
"RangeIndex: 301 entries, 0 to 300\n",
|
| 252 |
-
"Data columns (total 9 columns):\n",
|
| 253 |
-
" # Column Non-Null Count Dtype \n",
|
| 254 |
-
"--- ------ -------------- ----- \n",
|
| 255 |
-
" 0 Car_Name 301 non-null object \n",
|
| 256 |
-
" 1 Year 301 non-null int64 \n",
|
| 257 |
-
" 2 Selling_Price 301 non-null float64\n",
|
| 258 |
-
" 3 Present_Price 301 non-null float64\n",
|
| 259 |
-
" 4 Driven_kms 301 non-null int64 \n",
|
| 260 |
-
" 5 Fuel_Type 301 non-null object \n",
|
| 261 |
-
" 6 Selling_type 301 non-null object \n",
|
| 262 |
-
" 7 Transmission 301 non-null object \n",
|
| 263 |
-
" 8 Owner 301 non-null int64 \n",
|
| 264 |
-
"dtypes: float64(2), int64(3), object(4)\n",
|
| 265 |
-
"memory usage: 21.3+ KB\n"
|
| 266 |
-
]
|
| 267 |
-
}
|
| 268 |
-
],
|
| 269 |
"source": [
|
| 270 |
"# 观察数据类型\n",
|
| 271 |
"df.info()"
|
|
@@ -273,7 +250,7 @@
|
|
| 273 |
},
|
| 274 |
{
|
| 275 |
"cell_type": "code",
|
| 276 |
-
"execution_count":
|
| 277 |
"metadata": {
|
| 278 |
"execution": {
|
| 279 |
"iopub.execute_input": "2023-08-11T09:05:54.326848Z",
|
|
@@ -283,27 +260,7 @@
|
|
| 283 |
"shell.execute_reply.started": "2023-08-11T09:05:54.326824Z"
|
| 284 |
}
|
| 285 |
},
|
| 286 |
-
"outputs": [
|
| 287 |
-
{
|
| 288 |
-
"data": {
|
| 289 |
-
"text/plain": [
|
| 290 |
-
"Car_Name 0\n",
|
| 291 |
-
"Year 0\n",
|
| 292 |
-
"Selling_Price 0\n",
|
| 293 |
-
"Present_Price 0\n",
|
| 294 |
-
"Driven_kms 0\n",
|
| 295 |
-
"Fuel_Type 0\n",
|
| 296 |
-
"Selling_type 0\n",
|
| 297 |
-
"Transmission 0\n",
|
| 298 |
-
"Owner 0\n",
|
| 299 |
-
"dtype: int64"
|
| 300 |
-
]
|
| 301 |
-
},
|
| 302 |
-
"execution_count": 4,
|
| 303 |
-
"metadata": {},
|
| 304 |
-
"output_type": "execute_result"
|
| 305 |
-
}
|
| 306 |
-
],
|
| 307 |
"source": [
|
| 308 |
"# 检查缺失值\n",
|
| 309 |
"df.isnull().sum()"
|
|
@@ -311,7 +268,7 @@
|
|
| 311 |
},
|
| 312 |
{
|
| 313 |
"cell_type": "code",
|
| 314 |
-
"execution_count":
|
| 315 |
"metadata": {
|
| 316 |
"execution": {
|
| 317 |
"iopub.execute_input": "2023-08-11T09:05:54.338268Z",
|
|
@@ -321,209 +278,7 @@
|
|
| 321 |
"shell.execute_reply.started": "2023-08-11T09:05:54.338225Z"
|
| 322 |
}
|
| 323 |
},
|
| 324 |
-
"outputs": [
|
| 325 |
-
{
|
| 326 |
-
"data": {
|
| 327 |
-
"text/html": [
|
| 328 |
-
"<div>\n",
|
| 329 |
-
"<style scoped>\n",
|
| 330 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 331 |
-
" vertical-align: middle;\n",
|
| 332 |
-
" }\n",
|
| 333 |
-
"\n",
|
| 334 |
-
" .dataframe tbody tr th {\n",
|
| 335 |
-
" vertical-align: top;\n",
|
| 336 |
-
" }\n",
|
| 337 |
-
"\n",
|
| 338 |
-
" .dataframe thead th {\n",
|
| 339 |
-
" text-align: right;\n",
|
| 340 |
-
" }\n",
|
| 341 |
-
"</style>\n",
|
| 342 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 343 |
-
" <thead>\n",
|
| 344 |
-
" <tr style=\"text-align: right;\">\n",
|
| 345 |
-
" <th></th>\n",
|
| 346 |
-
" <th>Car_Name</th>\n",
|
| 347 |
-
" <th>Year</th>\n",
|
| 348 |
-
" <th>Selling_Price</th>\n",
|
| 349 |
-
" <th>Present_Price</th>\n",
|
| 350 |
-
" <th>Driven_kms</th>\n",
|
| 351 |
-
" <th>Fuel_Type</th>\n",
|
| 352 |
-
" <th>Selling_type</th>\n",
|
| 353 |
-
" <th>Transmission</th>\n",
|
| 354 |
-
" <th>Owner</th>\n",
|
| 355 |
-
" </tr>\n",
|
| 356 |
-
" </thead>\n",
|
| 357 |
-
" <tbody>\n",
|
| 358 |
-
" <tr>\n",
|
| 359 |
-
" <th>count</th>\n",
|
| 360 |
-
" <td>301</td>\n",
|
| 361 |
-
" <td>301.000000</td>\n",
|
| 362 |
-
" <td>301.000000</td>\n",
|
| 363 |
-
" <td>301.000000</td>\n",
|
| 364 |
-
" <td>301.000000</td>\n",
|
| 365 |
-
" <td>301</td>\n",
|
| 366 |
-
" <td>301</td>\n",
|
| 367 |
-
" <td>301</td>\n",
|
| 368 |
-
" <td>301.000000</td>\n",
|
| 369 |
-
" </tr>\n",
|
| 370 |
-
" <tr>\n",
|
| 371 |
-
" <th>unique</th>\n",
|
| 372 |
-
" <td>98</td>\n",
|
| 373 |
-
" <td>NaN</td>\n",
|
| 374 |
-
" <td>NaN</td>\n",
|
| 375 |
-
" <td>NaN</td>\n",
|
| 376 |
-
" <td>NaN</td>\n",
|
| 377 |
-
" <td>3</td>\n",
|
| 378 |
-
" <td>2</td>\n",
|
| 379 |
-
" <td>2</td>\n",
|
| 380 |
-
" <td>NaN</td>\n",
|
| 381 |
-
" </tr>\n",
|
| 382 |
-
" <tr>\n",
|
| 383 |
-
" <th>top</th>\n",
|
| 384 |
-
" <td>city</td>\n",
|
| 385 |
-
" <td>NaN</td>\n",
|
| 386 |
-
" <td>NaN</td>\n",
|
| 387 |
-
" <td>NaN</td>\n",
|
| 388 |
-
" <td>NaN</td>\n",
|
| 389 |
-
" <td>Petrol</td>\n",
|
| 390 |
-
" <td>Dealer</td>\n",
|
| 391 |
-
" <td>Manual</td>\n",
|
| 392 |
-
" <td>NaN</td>\n",
|
| 393 |
-
" </tr>\n",
|
| 394 |
-
" <tr>\n",
|
| 395 |
-
" <th>freq</th>\n",
|
| 396 |
-
" <td>26</td>\n",
|
| 397 |
-
" <td>NaN</td>\n",
|
| 398 |
-
" <td>NaN</td>\n",
|
| 399 |
-
" <td>NaN</td>\n",
|
| 400 |
-
" <td>NaN</td>\n",
|
| 401 |
-
" <td>239</td>\n",
|
| 402 |
-
" <td>195</td>\n",
|
| 403 |
-
" <td>261</td>\n",
|
| 404 |
-
" <td>NaN</td>\n",
|
| 405 |
-
" </tr>\n",
|
| 406 |
-
" <tr>\n",
|
| 407 |
-
" <th>mean</th>\n",
|
| 408 |
-
" <td>NaN</td>\n",
|
| 409 |
-
" <td>2013.627907</td>\n",
|
| 410 |
-
" <td>4.661296</td>\n",
|
| 411 |
-
" <td>7.628472</td>\n",
|
| 412 |
-
" <td>36947.205980</td>\n",
|
| 413 |
-
" <td>NaN</td>\n",
|
| 414 |
-
" <td>NaN</td>\n",
|
| 415 |
-
" <td>NaN</td>\n",
|
| 416 |
-
" <td>0.043189</td>\n",
|
| 417 |
-
" </tr>\n",
|
| 418 |
-
" <tr>\n",
|
| 419 |
-
" <th>std</th>\n",
|
| 420 |
-
" <td>NaN</td>\n",
|
| 421 |
-
" <td>2.891554</td>\n",
|
| 422 |
-
" <td>5.082812</td>\n",
|
| 423 |
-
" <td>8.642584</td>\n",
|
| 424 |
-
" <td>38886.883882</td>\n",
|
| 425 |
-
" <td>NaN</td>\n",
|
| 426 |
-
" <td>NaN</td>\n",
|
| 427 |
-
" <td>NaN</td>\n",
|
| 428 |
-
" <td>0.247915</td>\n",
|
| 429 |
-
" </tr>\n",
|
| 430 |
-
" <tr>\n",
|
| 431 |
-
" <th>min</th>\n",
|
| 432 |
-
" <td>NaN</td>\n",
|
| 433 |
-
" <td>2003.000000</td>\n",
|
| 434 |
-
" <td>0.100000</td>\n",
|
| 435 |
-
" <td>0.320000</td>\n",
|
| 436 |
-
" <td>500.000000</td>\n",
|
| 437 |
-
" <td>NaN</td>\n",
|
| 438 |
-
" <td>NaN</td>\n",
|
| 439 |
-
" <td>NaN</td>\n",
|
| 440 |
-
" <td>0.000000</td>\n",
|
| 441 |
-
" </tr>\n",
|
| 442 |
-
" <tr>\n",
|
| 443 |
-
" <th>25%</th>\n",
|
| 444 |
-
" <td>NaN</td>\n",
|
| 445 |
-
" <td>2012.000000</td>\n",
|
| 446 |
-
" <td>0.900000</td>\n",
|
| 447 |
-
" <td>1.200000</td>\n",
|
| 448 |
-
" <td>15000.000000</td>\n",
|
| 449 |
-
" <td>NaN</td>\n",
|
| 450 |
-
" <td>NaN</td>\n",
|
| 451 |
-
" <td>NaN</td>\n",
|
| 452 |
-
" <td>0.000000</td>\n",
|
| 453 |
-
" </tr>\n",
|
| 454 |
-
" <tr>\n",
|
| 455 |
-
" <th>50%</th>\n",
|
| 456 |
-
" <td>NaN</td>\n",
|
| 457 |
-
" <td>2014.000000</td>\n",
|
| 458 |
-
" <td>3.600000</td>\n",
|
| 459 |
-
" <td>6.400000</td>\n",
|
| 460 |
-
" <td>32000.000000</td>\n",
|
| 461 |
-
" <td>NaN</td>\n",
|
| 462 |
-
" <td>NaN</td>\n",
|
| 463 |
-
" <td>NaN</td>\n",
|
| 464 |
-
" <td>0.000000</td>\n",
|
| 465 |
-
" </tr>\n",
|
| 466 |
-
" <tr>\n",
|
| 467 |
-
" <th>75%</th>\n",
|
| 468 |
-
" <td>NaN</td>\n",
|
| 469 |
-
" <td>2016.000000</td>\n",
|
| 470 |
-
" <td>6.000000</td>\n",
|
| 471 |
-
" <td>9.900000</td>\n",
|
| 472 |
-
" <td>48767.000000</td>\n",
|
| 473 |
-
" <td>NaN</td>\n",
|
| 474 |
-
" <td>NaN</td>\n",
|
| 475 |
-
" <td>NaN</td>\n",
|
| 476 |
-
" <td>0.000000</td>\n",
|
| 477 |
-
" </tr>\n",
|
| 478 |
-
" <tr>\n",
|
| 479 |
-
" <th>max</th>\n",
|
| 480 |
-
" <td>NaN</td>\n",
|
| 481 |
-
" <td>2018.000000</td>\n",
|
| 482 |
-
" <td>35.000000</td>\n",
|
| 483 |
-
" <td>92.600000</td>\n",
|
| 484 |
-
" <td>500000.000000</td>\n",
|
| 485 |
-
" <td>NaN</td>\n",
|
| 486 |
-
" <td>NaN</td>\n",
|
| 487 |
-
" <td>NaN</td>\n",
|
| 488 |
-
" <td>3.000000</td>\n",
|
| 489 |
-
" </tr>\n",
|
| 490 |
-
" </tbody>\n",
|
| 491 |
-
"</table>\n",
|
| 492 |
-
"</div>"
|
| 493 |
-
],
|
| 494 |
-
"text/plain": [
|
| 495 |
-
" Car_Name Year Selling_Price Present_Price Driven_kms \\\n",
|
| 496 |
-
"count 301 301.000000 301.000000 301.000000 301.000000 \n",
|
| 497 |
-
"unique 98 NaN NaN NaN NaN \n",
|
| 498 |
-
"top city NaN NaN NaN NaN \n",
|
| 499 |
-
"freq 26 NaN NaN NaN NaN \n",
|
| 500 |
-
"mean NaN 2013.627907 4.661296 7.628472 36947.205980 \n",
|
| 501 |
-
"std NaN 2.891554 5.082812 8.642584 38886.883882 \n",
|
| 502 |
-
"min NaN 2003.000000 0.100000 0.320000 500.000000 \n",
|
| 503 |
-
"25% NaN 2012.000000 0.900000 1.200000 15000.000000 \n",
|
| 504 |
-
"50% NaN 2014.000000 3.600000 6.400000 32000.000000 \n",
|
| 505 |
-
"75% NaN 2016.000000 6.000000 9.900000 48767.000000 \n",
|
| 506 |
-
"max NaN 2018.000000 35.000000 92.600000 500000.000000 \n",
|
| 507 |
-
"\n",
|
| 508 |
-
" Fuel_Type Selling_type Transmission Owner \n",
|
| 509 |
-
"count 301 301 301 301.000000 \n",
|
| 510 |
-
"unique 3 2 2 NaN \n",
|
| 511 |
-
"top Petrol Dealer Manual NaN \n",
|
| 512 |
-
"freq 239 195 261 NaN \n",
|
| 513 |
-
"mean NaN NaN NaN 0.043189 \n",
|
| 514 |
-
"std NaN NaN NaN 0.247915 \n",
|
| 515 |
-
"min NaN NaN NaN 0.000000 \n",
|
| 516 |
-
"25% NaN NaN NaN 0.000000 \n",
|
| 517 |
-
"50% NaN NaN NaN 0.000000 \n",
|
| 518 |
-
"75% NaN NaN NaN 0.000000 \n",
|
| 519 |
-
"max NaN NaN NaN 3.000000 "
|
| 520 |
-
]
|
| 521 |
-
},
|
| 522 |
-
"execution_count": 5,
|
| 523 |
-
"metadata": {},
|
| 524 |
-
"output_type": "execute_result"
|
| 525 |
-
}
|
| 526 |
-
],
|
| 527 |
"source": [
|
| 528 |
"# 观察数据的详细信息\n",
|
| 529 |
"df.describe(include='all')"
|
|
@@ -607,7 +362,7 @@
|
|
| 607 |
},
|
| 608 |
{
|
| 609 |
"cell_type": "code",
|
| 610 |
-
"execution_count":
|
| 611 |
"metadata": {
|
| 612 |
"execution": {
|
| 613 |
"iopub.execute_input": "2023-08-11T09:05:55.855050Z",
|
|
@@ -617,18 +372,7 @@
|
|
| 617 |
"shell.execute_reply.started": "2023-08-11T09:05:55.855014Z"
|
| 618 |
}
|
| 619 |
},
|
| 620 |
-
"outputs": [
|
| 621 |
-
{
|
| 622 |
-
"data": {
|
| 623 |
-
"text/plain": [
|
| 624 |
-
"2"
|
| 625 |
-
]
|
| 626 |
-
},
|
| 627 |
-
"execution_count": 6,
|
| 628 |
-
"metadata": {},
|
| 629 |
-
"output_type": "execute_result"
|
| 630 |
-
}
|
| 631 |
-
],
|
| 632 |
"source": [
|
| 633 |
"# 检查是否有重复数据\n",
|
| 634 |
"df.duplicated().sum()"
|
|
@@ -636,7 +380,7 @@
|
|
| 636 |
},
|
| 637 |
{
|
| 638 |
"cell_type": "code",
|
| 639 |
-
"execution_count":
|
| 640 |
"metadata": {
|
| 641 |
"execution": {
|
| 642 |
"iopub.execute_input": "2023-08-11T09:05:55.865903Z",
|
|
@@ -653,7 +397,7 @@
|
|
| 653 |
"0"
|
| 654 |
]
|
| 655 |
},
|
| 656 |
-
"execution_count":
|
| 657 |
"metadata": {},
|
| 658 |
"output_type": "execute_result"
|
| 659 |
}
|
|
@@ -736,7 +480,7 @@
|
|
| 736 |
},
|
| 737 |
{
|
| 738 |
"cell_type": "code",
|
| 739 |
-
"execution_count":
|
| 740 |
"metadata": {
|
| 741 |
"execution": {
|
| 742 |
"iopub.execute_input": "2023-08-11T09:05:55.914238Z",
|
|
@@ -764,7 +508,7 @@
|
|
| 764 |
},
|
| 765 |
{
|
| 766 |
"cell_type": "code",
|
| 767 |
-
"execution_count":
|
| 768 |
"metadata": {
|
| 769 |
"execution": {
|
| 770 |
"iopub.execute_input": "2023-08-11T09:05:55.962811Z",
|
|
@@ -800,7 +544,7 @@
|
|
| 800 |
},
|
| 801 |
{
|
| 802 |
"cell_type": "code",
|
| 803 |
-
"execution_count":
|
| 804 |
"metadata": {
|
| 805 |
"execution": {
|
| 806 |
"iopub.execute_input": "2023-08-11T09:05:55.986146Z",
|
|
@@ -925,7 +669,7 @@
|
|
| 925 |
" 'Present_Price']"
|
| 926 |
]
|
| 927 |
},
|
| 928 |
-
"execution_count":
|
| 929 |
"metadata": {},
|
| 930 |
"output_type": "execute_result"
|
| 931 |
}
|
|
@@ -951,7 +695,7 @@
|
|
| 951 |
},
|
| 952 |
{
|
| 953 |
"cell_type": "code",
|
| 954 |
-
"execution_count":
|
| 955 |
"metadata": {
|
| 956 |
"execution": {
|
| 957 |
"iopub.execute_input": "2023-08-11T09:05:56.545107Z",
|
|
@@ -998,7 +742,7 @@
|
|
| 998 |
},
|
| 999 |
{
|
| 1000 |
"cell_type": "code",
|
| 1001 |
-
"execution_count":
|
| 1002 |
"metadata": {
|
| 1003 |
"execution": {
|
| 1004 |
"iopub.execute_input": "2023-08-11T09:05:56.568558Z",
|
|
@@ -1032,7 +776,7 @@
|
|
| 1032 |
},
|
| 1033 |
{
|
| 1034 |
"cell_type": "code",
|
| 1035 |
-
"execution_count":
|
| 1036 |
"metadata": {
|
| 1037 |
"execution": {
|
| 1038 |
"iopub.execute_input": "2023-08-11T09:05:56.586725Z",
|
|
@@ -1088,7 +832,7 @@
|
|
| 1088 |
},
|
| 1089 |
{
|
| 1090 |
"cell_type": "code",
|
| 1091 |
-
"execution_count":
|
| 1092 |
"metadata": {
|
| 1093 |
"execution": {
|
| 1094 |
"iopub.execute_input": "2023-08-11T09:13:14.556627Z",
|
|
@@ -1107,7 +851,7 @@
|
|
| 1107 |
},
|
| 1108 |
{
|
| 1109 |
"cell_type": "code",
|
| 1110 |
-
"execution_count":
|
| 1111 |
"metadata": {
|
| 1112 |
"execution": {
|
| 1113 |
"iopub.execute_input": "2023-08-11T09:13:14.629117Z",
|
|
@@ -1124,7 +868,7 @@
|
|
| 1124 |
"0.9740787800578905"
|
| 1125 |
]
|
| 1126 |
},
|
| 1127 |
-
"execution_count":
|
| 1128 |
"metadata": {},
|
| 1129 |
"output_type": "execute_result"
|
| 1130 |
}
|
|
@@ -1145,7 +889,7 @@
|
|
| 1145 |
},
|
| 1146 |
{
|
| 1147 |
"cell_type": "code",
|
| 1148 |
-
"execution_count":
|
| 1149 |
"metadata": {
|
| 1150 |
"execution": {
|
| 1151 |
"iopub.execute_input": "2023-08-11T09:13:14.719423Z",
|
|
@@ -1165,7 +909,7 @@
|
|
| 1165 |
},
|
| 1166 |
{
|
| 1167 |
"cell_type": "code",
|
| 1168 |
-
"execution_count":
|
| 1169 |
"metadata": {
|
| 1170 |
"execution": {
|
| 1171 |
"iopub.execute_input": "2023-08-11T09:13:14.925993Z",
|
|
@@ -1215,7 +959,7 @@
|
|
| 1215 |
},
|
| 1216 |
{
|
| 1217 |
"cell_type": "code",
|
| 1218 |
-
"execution_count":
|
| 1219 |
"metadata": {
|
| 1220 |
"execution": {
|
| 1221 |
"iopub.execute_input": "2023-08-11T09:13:15.105155Z",
|
|
@@ -1326,7 +1070,7 @@
|
|
| 1326 |
},
|
| 1327 |
{
|
| 1328 |
"cell_type": "code",
|
| 1329 |
-
"execution_count":
|
| 1330 |
"metadata": {
|
| 1331 |
"execution": {
|
| 1332 |
"iopub.execute_input": "2023-08-11T09:13:16.111279Z",
|
|
|
|
| 232 |
},
|
| 233 |
{
|
| 234 |
"cell_type": "code",
|
| 235 |
+
"execution_count": null,
|
| 236 |
"metadata": {
|
| 237 |
"execution": {
|
| 238 |
"iopub.execute_input": "2023-08-11T09:05:54.311108Z",
|
|
|
|
| 242 |
"shell.execute_reply.started": "2023-08-11T09:05:54.311087Z"
|
| 243 |
}
|
| 244 |
},
|
| 245 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
"source": [
|
| 247 |
"# 观察数据类型\n",
|
| 248 |
"df.info()"
|
|
|
|
| 250 |
},
|
| 251 |
{
|
| 252 |
"cell_type": "code",
|
| 253 |
+
"execution_count": null,
|
| 254 |
"metadata": {
|
| 255 |
"execution": {
|
| 256 |
"iopub.execute_input": "2023-08-11T09:05:54.326848Z",
|
|
|
|
| 260 |
"shell.execute_reply.started": "2023-08-11T09:05:54.326824Z"
|
| 261 |
}
|
| 262 |
},
|
| 263 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
"source": [
|
| 265 |
"# 检查缺失值\n",
|
| 266 |
"df.isnull().sum()"
|
|
|
|
| 268 |
},
|
| 269 |
{
|
| 270 |
"cell_type": "code",
|
| 271 |
+
"execution_count": null,
|
| 272 |
"metadata": {
|
| 273 |
"execution": {
|
| 274 |
"iopub.execute_input": "2023-08-11T09:05:54.338268Z",
|
|
|
|
| 278 |
"shell.execute_reply.started": "2023-08-11T09:05:54.338225Z"
|
| 279 |
}
|
| 280 |
},
|
| 281 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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{
|
| 364 |
"cell_type": "code",
|
| 365 |
+
"execution_count": null,
|
| 366 |
"metadata": {
|
| 367 |
"execution": {
|
| 368 |
"iopub.execute_input": "2023-08-11T09:05:55.855050Z",
|
|
|
|
| 372 |
"shell.execute_reply.started": "2023-08-11T09:05:55.855014Z"
|
| 373 |
}
|
| 374 |
},
|
| 375 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
"source": [
|
| 377 |
"# 检查是否有重复数据\n",
|
| 378 |
"df.duplicated().sum()"
|
|
|
|
| 380 |
},
|
| 381 |
{
|
| 382 |
"cell_type": "code",
|
| 383 |
+
"execution_count": 3,
|
| 384 |
"metadata": {
|
| 385 |
"execution": {
|
| 386 |
"iopub.execute_input": "2023-08-11T09:05:55.865903Z",
|
|
|
|
| 397 |
"0"
|
| 398 |
]
|
| 399 |
},
|
| 400 |
+
"execution_count": 3,
|
| 401 |
"metadata": {},
|
| 402 |
"output_type": "execute_result"
|
| 403 |
}
|
|
|
|
| 480 |
},
|
| 481 |
{
|
| 482 |
"cell_type": "code",
|
| 483 |
+
"execution_count": 4,
|
| 484 |
"metadata": {
|
| 485 |
"execution": {
|
| 486 |
"iopub.execute_input": "2023-08-11T09:05:55.914238Z",
|
|
|
|
| 508 |
},
|
| 509 |
{
|
| 510 |
"cell_type": "code",
|
| 511 |
+
"execution_count": 5,
|
| 512 |
"metadata": {
|
| 513 |
"execution": {
|
| 514 |
"iopub.execute_input": "2023-08-11T09:05:55.962811Z",
|
|
|
|
| 544 |
},
|
| 545 |
{
|
| 546 |
"cell_type": "code",
|
| 547 |
+
"execution_count": 6,
|
| 548 |
"metadata": {
|
| 549 |
"execution": {
|
| 550 |
"iopub.execute_input": "2023-08-11T09:05:55.986146Z",
|
|
|
|
| 669 |
" 'Present_Price']"
|
| 670 |
]
|
| 671 |
},
|
| 672 |
+
"execution_count": 6,
|
| 673 |
"metadata": {},
|
| 674 |
"output_type": "execute_result"
|
| 675 |
}
|
|
|
|
| 695 |
},
|
| 696 |
{
|
| 697 |
"cell_type": "code",
|
| 698 |
+
"execution_count": 7,
|
| 699 |
"metadata": {
|
| 700 |
"execution": {
|
| 701 |
"iopub.execute_input": "2023-08-11T09:05:56.545107Z",
|
|
|
|
| 742 |
},
|
| 743 |
{
|
| 744 |
"cell_type": "code",
|
| 745 |
+
"execution_count": 8,
|
| 746 |
"metadata": {
|
| 747 |
"execution": {
|
| 748 |
"iopub.execute_input": "2023-08-11T09:05:56.568558Z",
|
|
|
|
| 776 |
},
|
| 777 |
{
|
| 778 |
"cell_type": "code",
|
| 779 |
+
"execution_count": 9,
|
| 780 |
"metadata": {
|
| 781 |
"execution": {
|
| 782 |
"iopub.execute_input": "2023-08-11T09:05:56.586725Z",
|
|
|
|
| 832 |
},
|
| 833 |
{
|
| 834 |
"cell_type": "code",
|
| 835 |
+
"execution_count": 10,
|
| 836 |
"metadata": {
|
| 837 |
"execution": {
|
| 838 |
"iopub.execute_input": "2023-08-11T09:13:14.556627Z",
|
|
|
|
| 851 |
},
|
| 852 |
{
|
| 853 |
"cell_type": "code",
|
| 854 |
+
"execution_count": 11,
|
| 855 |
"metadata": {
|
| 856 |
"execution": {
|
| 857 |
"iopub.execute_input": "2023-08-11T09:13:14.629117Z",
|
|
|
|
| 868 |
"0.9740787800578905"
|
| 869 |
]
|
| 870 |
},
|
| 871 |
+
"execution_count": 11,
|
| 872 |
"metadata": {},
|
| 873 |
"output_type": "execute_result"
|
| 874 |
}
|
|
|
|
| 889 |
},
|
| 890 |
{
|
| 891 |
"cell_type": "code",
|
| 892 |
+
"execution_count": 12,
|
| 893 |
"metadata": {
|
| 894 |
"execution": {
|
| 895 |
"iopub.execute_input": "2023-08-11T09:13:14.719423Z",
|
|
|
|
| 909 |
},
|
| 910 |
{
|
| 911 |
"cell_type": "code",
|
| 912 |
+
"execution_count": 13,
|
| 913 |
"metadata": {
|
| 914 |
"execution": {
|
| 915 |
"iopub.execute_input": "2023-08-11T09:13:14.925993Z",
|
|
|
|
| 959 |
},
|
| 960 |
{
|
| 961 |
"cell_type": "code",
|
| 962 |
+
"execution_count": 14,
|
| 963 |
"metadata": {
|
| 964 |
"execution": {
|
| 965 |
"iopub.execute_input": "2023-08-11T09:13:15.105155Z",
|
|
|
|
| 1070 |
},
|
| 1071 |
{
|
| 1072 |
"cell_type": "code",
|
| 1073 |
+
"execution_count": 15,
|
| 1074 |
"metadata": {
|
| 1075 |
"execution": {
|
| 1076 |
"iopub.execute_input": "2023-08-11T09:13:16.111279Z",
|
benchmark/pandas_13/pandas_13_reproduced.ipynb
CHANGED
|
@@ -232,7 +232,7 @@
|
|
| 232 |
},
|
| 233 |
{
|
| 234 |
"cell_type": "code",
|
| 235 |
-
"execution_count":
|
| 236 |
"metadata": {
|
| 237 |
"execution": {
|
| 238 |
"iopub.execute_input": "2023-08-11T09:05:54.311108Z",
|
|
@@ -242,30 +242,7 @@
|
|
| 242 |
"shell.execute_reply.started": "2023-08-11T09:05:54.311087Z"
|
| 243 |
}
|
| 244 |
},
|
| 245 |
-
"outputs": [
|
| 246 |
-
{
|
| 247 |
-
"name": "stdout",
|
| 248 |
-
"output_type": "stream",
|
| 249 |
-
"text": [
|
| 250 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 251 |
-
"RangeIndex: 301 entries, 0 to 300\n",
|
| 252 |
-
"Data columns (total 9 columns):\n",
|
| 253 |
-
" # Column Non-Null Count Dtype \n",
|
| 254 |
-
"--- ------ -------------- ----- \n",
|
| 255 |
-
" 0 Car_Name 301 non-null object \n",
|
| 256 |
-
" 1 Year 301 non-null int64 \n",
|
| 257 |
-
" 2 Selling_Price 301 non-null float64\n",
|
| 258 |
-
" 3 Present_Price 301 non-null float64\n",
|
| 259 |
-
" 4 Driven_kms 301 non-null int64 \n",
|
| 260 |
-
" 5 Fuel_Type 301 non-null object \n",
|
| 261 |
-
" 6 Selling_type 301 non-null object \n",
|
| 262 |
-
" 7 Transmission 301 non-null object \n",
|
| 263 |
-
" 8 Owner 301 non-null int64 \n",
|
| 264 |
-
"dtypes: float64(2), int64(3), object(4)\n",
|
| 265 |
-
"memory usage: 21.3+ KB\n"
|
| 266 |
-
]
|
| 267 |
-
}
|
| 268 |
-
],
|
| 269 |
"source": [
|
| 270 |
"# 观察数据类型\n",
|
| 271 |
"df.info()"
|
|
@@ -273,7 +250,7 @@
|
|
| 273 |
},
|
| 274 |
{
|
| 275 |
"cell_type": "code",
|
| 276 |
-
"execution_count":
|
| 277 |
"metadata": {
|
| 278 |
"execution": {
|
| 279 |
"iopub.execute_input": "2023-08-11T09:05:54.326848Z",
|
|
@@ -283,27 +260,7 @@
|
|
| 283 |
"shell.execute_reply.started": "2023-08-11T09:05:54.326824Z"
|
| 284 |
}
|
| 285 |
},
|
| 286 |
-
"outputs": [
|
| 287 |
-
{
|
| 288 |
-
"data": {
|
| 289 |
-
"text/plain": [
|
| 290 |
-
"Car_Name 0\n",
|
| 291 |
-
"Year 0\n",
|
| 292 |
-
"Selling_Price 0\n",
|
| 293 |
-
"Present_Price 0\n",
|
| 294 |
-
"Driven_kms 0\n",
|
| 295 |
-
"Fuel_Type 0\n",
|
| 296 |
-
"Selling_type 0\n",
|
| 297 |
-
"Transmission 0\n",
|
| 298 |
-
"Owner 0\n",
|
| 299 |
-
"dtype: int64"
|
| 300 |
-
]
|
| 301 |
-
},
|
| 302 |
-
"execution_count": 4,
|
| 303 |
-
"metadata": {},
|
| 304 |
-
"output_type": "execute_result"
|
| 305 |
-
}
|
| 306 |
-
],
|
| 307 |
"source": [
|
| 308 |
"# 检查缺失值\n",
|
| 309 |
"df.isnull().sum()"
|
|
@@ -311,7 +268,7 @@
|
|
| 311 |
},
|
| 312 |
{
|
| 313 |
"cell_type": "code",
|
| 314 |
-
"execution_count":
|
| 315 |
"metadata": {
|
| 316 |
"execution": {
|
| 317 |
"iopub.execute_input": "2023-08-11T09:05:54.338268Z",
|
|
@@ -321,209 +278,7 @@
|
|
| 321 |
"shell.execute_reply.started": "2023-08-11T09:05:54.338225Z"
|
| 322 |
}
|
| 323 |
},
|
| 324 |
-
"outputs": [
|
| 325 |
-
{
|
| 326 |
-
"data": {
|
| 327 |
-
"text/html": [
|
| 328 |
-
"<div>\n",
|
| 329 |
-
"<style scoped>\n",
|
| 330 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 331 |
-
" vertical-align: middle;\n",
|
| 332 |
-
" }\n",
|
| 333 |
-
"\n",
|
| 334 |
-
" .dataframe tbody tr th {\n",
|
| 335 |
-
" vertical-align: top;\n",
|
| 336 |
-
" }\n",
|
| 337 |
-
"\n",
|
| 338 |
-
" .dataframe thead th {\n",
|
| 339 |
-
" text-align: right;\n",
|
| 340 |
-
" }\n",
|
| 341 |
-
"</style>\n",
|
| 342 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 343 |
-
" <thead>\n",
|
| 344 |
-
" <tr style=\"text-align: right;\">\n",
|
| 345 |
-
" <th></th>\n",
|
| 346 |
-
" <th>Car_Name</th>\n",
|
| 347 |
-
" <th>Year</th>\n",
|
| 348 |
-
" <th>Selling_Price</th>\n",
|
| 349 |
-
" <th>Present_Price</th>\n",
|
| 350 |
-
" <th>Driven_kms</th>\n",
|
| 351 |
-
" <th>Fuel_Type</th>\n",
|
| 352 |
-
" <th>Selling_type</th>\n",
|
| 353 |
-
" <th>Transmission</th>\n",
|
| 354 |
-
" <th>Owner</th>\n",
|
| 355 |
-
" </tr>\n",
|
| 356 |
-
" </thead>\n",
|
| 357 |
-
" <tbody>\n",
|
| 358 |
-
" <tr>\n",
|
| 359 |
-
" <th>count</th>\n",
|
| 360 |
-
" <td>301</td>\n",
|
| 361 |
-
" <td>301.000000</td>\n",
|
| 362 |
-
" <td>301.000000</td>\n",
|
| 363 |
-
" <td>301.000000</td>\n",
|
| 364 |
-
" <td>301.000000</td>\n",
|
| 365 |
-
" <td>301</td>\n",
|
| 366 |
-
" <td>301</td>\n",
|
| 367 |
-
" <td>301</td>\n",
|
| 368 |
-
" <td>301.000000</td>\n",
|
| 369 |
-
" </tr>\n",
|
| 370 |
-
" <tr>\n",
|
| 371 |
-
" <th>unique</th>\n",
|
| 372 |
-
" <td>98</td>\n",
|
| 373 |
-
" <td>NaN</td>\n",
|
| 374 |
-
" <td>NaN</td>\n",
|
| 375 |
-
" <td>NaN</td>\n",
|
| 376 |
-
" <td>NaN</td>\n",
|
| 377 |
-
" <td>3</td>\n",
|
| 378 |
-
" <td>2</td>\n",
|
| 379 |
-
" <td>2</td>\n",
|
| 380 |
-
" <td>NaN</td>\n",
|
| 381 |
-
" </tr>\n",
|
| 382 |
-
" <tr>\n",
|
| 383 |
-
" <th>top</th>\n",
|
| 384 |
-
" <td>city</td>\n",
|
| 385 |
-
" <td>NaN</td>\n",
|
| 386 |
-
" <td>NaN</td>\n",
|
| 387 |
-
" <td>NaN</td>\n",
|
| 388 |
-
" <td>NaN</td>\n",
|
| 389 |
-
" <td>Petrol</td>\n",
|
| 390 |
-
" <td>Dealer</td>\n",
|
| 391 |
-
" <td>Manual</td>\n",
|
| 392 |
-
" <td>NaN</td>\n",
|
| 393 |
-
" </tr>\n",
|
| 394 |
-
" <tr>\n",
|
| 395 |
-
" <th>freq</th>\n",
|
| 396 |
-
" <td>26</td>\n",
|
| 397 |
-
" <td>NaN</td>\n",
|
| 398 |
-
" <td>NaN</td>\n",
|
| 399 |
-
" <td>NaN</td>\n",
|
| 400 |
-
" <td>NaN</td>\n",
|
| 401 |
-
" <td>239</td>\n",
|
| 402 |
-
" <td>195</td>\n",
|
| 403 |
-
" <td>261</td>\n",
|
| 404 |
-
" <td>NaN</td>\n",
|
| 405 |
-
" </tr>\n",
|
| 406 |
-
" <tr>\n",
|
| 407 |
-
" <th>mean</th>\n",
|
| 408 |
-
" <td>NaN</td>\n",
|
| 409 |
-
" <td>2013.627907</td>\n",
|
| 410 |
-
" <td>4.661296</td>\n",
|
| 411 |
-
" <td>7.628472</td>\n",
|
| 412 |
-
" <td>36947.205980</td>\n",
|
| 413 |
-
" <td>NaN</td>\n",
|
| 414 |
-
" <td>NaN</td>\n",
|
| 415 |
-
" <td>NaN</td>\n",
|
| 416 |
-
" <td>0.043189</td>\n",
|
| 417 |
-
" </tr>\n",
|
| 418 |
-
" <tr>\n",
|
| 419 |
-
" <th>std</th>\n",
|
| 420 |
-
" <td>NaN</td>\n",
|
| 421 |
-
" <td>2.891554</td>\n",
|
| 422 |
-
" <td>5.082812</td>\n",
|
| 423 |
-
" <td>8.642584</td>\n",
|
| 424 |
-
" <td>38886.883882</td>\n",
|
| 425 |
-
" <td>NaN</td>\n",
|
| 426 |
-
" <td>NaN</td>\n",
|
| 427 |
-
" <td>NaN</td>\n",
|
| 428 |
-
" <td>0.247915</td>\n",
|
| 429 |
-
" </tr>\n",
|
| 430 |
-
" <tr>\n",
|
| 431 |
-
" <th>min</th>\n",
|
| 432 |
-
" <td>NaN</td>\n",
|
| 433 |
-
" <td>2003.000000</td>\n",
|
| 434 |
-
" <td>0.100000</td>\n",
|
| 435 |
-
" <td>0.320000</td>\n",
|
| 436 |
-
" <td>500.000000</td>\n",
|
| 437 |
-
" <td>NaN</td>\n",
|
| 438 |
-
" <td>NaN</td>\n",
|
| 439 |
-
" <td>NaN</td>\n",
|
| 440 |
-
" <td>0.000000</td>\n",
|
| 441 |
-
" </tr>\n",
|
| 442 |
-
" <tr>\n",
|
| 443 |
-
" <th>25%</th>\n",
|
| 444 |
-
" <td>NaN</td>\n",
|
| 445 |
-
" <td>2012.000000</td>\n",
|
| 446 |
-
" <td>0.900000</td>\n",
|
| 447 |
-
" <td>1.200000</td>\n",
|
| 448 |
-
" <td>15000.000000</td>\n",
|
| 449 |
-
" <td>NaN</td>\n",
|
| 450 |
-
" <td>NaN</td>\n",
|
| 451 |
-
" <td>NaN</td>\n",
|
| 452 |
-
" <td>0.000000</td>\n",
|
| 453 |
-
" </tr>\n",
|
| 454 |
-
" <tr>\n",
|
| 455 |
-
" <th>50%</th>\n",
|
| 456 |
-
" <td>NaN</td>\n",
|
| 457 |
-
" <td>2014.000000</td>\n",
|
| 458 |
-
" <td>3.600000</td>\n",
|
| 459 |
-
" <td>6.400000</td>\n",
|
| 460 |
-
" <td>32000.000000</td>\n",
|
| 461 |
-
" <td>NaN</td>\n",
|
| 462 |
-
" <td>NaN</td>\n",
|
| 463 |
-
" <td>NaN</td>\n",
|
| 464 |
-
" <td>0.000000</td>\n",
|
| 465 |
-
" </tr>\n",
|
| 466 |
-
" <tr>\n",
|
| 467 |
-
" <th>75%</th>\n",
|
| 468 |
-
" <td>NaN</td>\n",
|
| 469 |
-
" <td>2016.000000</td>\n",
|
| 470 |
-
" <td>6.000000</td>\n",
|
| 471 |
-
" <td>9.900000</td>\n",
|
| 472 |
-
" <td>48767.000000</td>\n",
|
| 473 |
-
" <td>NaN</td>\n",
|
| 474 |
-
" <td>NaN</td>\n",
|
| 475 |
-
" <td>NaN</td>\n",
|
| 476 |
-
" <td>0.000000</td>\n",
|
| 477 |
-
" </tr>\n",
|
| 478 |
-
" <tr>\n",
|
| 479 |
-
" <th>max</th>\n",
|
| 480 |
-
" <td>NaN</td>\n",
|
| 481 |
-
" <td>2018.000000</td>\n",
|
| 482 |
-
" <td>35.000000</td>\n",
|
| 483 |
-
" <td>92.600000</td>\n",
|
| 484 |
-
" <td>500000.000000</td>\n",
|
| 485 |
-
" <td>NaN</td>\n",
|
| 486 |
-
" <td>NaN</td>\n",
|
| 487 |
-
" <td>NaN</td>\n",
|
| 488 |
-
" <td>3.000000</td>\n",
|
| 489 |
-
" </tr>\n",
|
| 490 |
-
" </tbody>\n",
|
| 491 |
-
"</table>\n",
|
| 492 |
-
"</div>"
|
| 493 |
-
],
|
| 494 |
-
"text/plain": [
|
| 495 |
-
" Car_Name Year Selling_Price Present_Price Driven_kms \\\n",
|
| 496 |
-
"count 301 301.000000 301.000000 301.000000 301.000000 \n",
|
| 497 |
-
"unique 98 NaN NaN NaN NaN \n",
|
| 498 |
-
"top city NaN NaN NaN NaN \n",
|
| 499 |
-
"freq 26 NaN NaN NaN NaN \n",
|
| 500 |
-
"mean NaN 2013.627907 4.661296 7.628472 36947.205980 \n",
|
| 501 |
-
"std NaN 2.891554 5.082812 8.642584 38886.883882 \n",
|
| 502 |
-
"min NaN 2003.000000 0.100000 0.320000 500.000000 \n",
|
| 503 |
-
"25% NaN 2012.000000 0.900000 1.200000 15000.000000 \n",
|
| 504 |
-
"50% NaN 2014.000000 3.600000 6.400000 32000.000000 \n",
|
| 505 |
-
"75% NaN 2016.000000 6.000000 9.900000 48767.000000 \n",
|
| 506 |
-
"max NaN 2018.000000 35.000000 92.600000 500000.000000 \n",
|
| 507 |
-
"\n",
|
| 508 |
-
" Fuel_Type Selling_type Transmission Owner \n",
|
| 509 |
-
"count 301 301 301 301.000000 \n",
|
| 510 |
-
"unique 3 2 2 NaN \n",
|
| 511 |
-
"top Petrol Dealer Manual NaN \n",
|
| 512 |
-
"freq 239 195 261 NaN \n",
|
| 513 |
-
"mean NaN NaN NaN 0.043189 \n",
|
| 514 |
-
"std NaN NaN NaN 0.247915 \n",
|
| 515 |
-
"min NaN NaN NaN 0.000000 \n",
|
| 516 |
-
"25% NaN NaN NaN 0.000000 \n",
|
| 517 |
-
"50% NaN NaN NaN 0.000000 \n",
|
| 518 |
-
"75% NaN NaN NaN 0.000000 \n",
|
| 519 |
-
"max NaN NaN NaN 3.000000 "
|
| 520 |
-
]
|
| 521 |
-
},
|
| 522 |
-
"execution_count": 5,
|
| 523 |
-
"metadata": {},
|
| 524 |
-
"output_type": "execute_result"
|
| 525 |
-
}
|
| 526 |
-
],
|
| 527 |
"source": [
|
| 528 |
"# 观察数据的详细信息\n",
|
| 529 |
"df.describe(include='all')"
|
|
@@ -607,7 +362,7 @@
|
|
| 607 |
},
|
| 608 |
{
|
| 609 |
"cell_type": "code",
|
| 610 |
-
"execution_count":
|
| 611 |
"metadata": {
|
| 612 |
"execution": {
|
| 613 |
"iopub.execute_input": "2023-08-11T09:05:55.855050Z",
|
|
@@ -617,18 +372,7 @@
|
|
| 617 |
"shell.execute_reply.started": "2023-08-11T09:05:55.855014Z"
|
| 618 |
}
|
| 619 |
},
|
| 620 |
-
"outputs": [
|
| 621 |
-
{
|
| 622 |
-
"data": {
|
| 623 |
-
"text/plain": [
|
| 624 |
-
"2"
|
| 625 |
-
]
|
| 626 |
-
},
|
| 627 |
-
"execution_count": 6,
|
| 628 |
-
"metadata": {},
|
| 629 |
-
"output_type": "execute_result"
|
| 630 |
-
}
|
| 631 |
-
],
|
| 632 |
"source": [
|
| 633 |
"# 检查是否有重复数据\n",
|
| 634 |
"df.duplicated().sum()"
|
|
@@ -636,7 +380,7 @@
|
|
| 636 |
},
|
| 637 |
{
|
| 638 |
"cell_type": "code",
|
| 639 |
-
"execution_count":
|
| 640 |
"metadata": {
|
| 641 |
"execution": {
|
| 642 |
"iopub.execute_input": "2023-08-11T09:05:55.865903Z",
|
|
@@ -653,7 +397,7 @@
|
|
| 653 |
"0"
|
| 654 |
]
|
| 655 |
},
|
| 656 |
-
"execution_count":
|
| 657 |
"metadata": {},
|
| 658 |
"output_type": "execute_result"
|
| 659 |
}
|
|
@@ -736,7 +480,7 @@
|
|
| 736 |
},
|
| 737 |
{
|
| 738 |
"cell_type": "code",
|
| 739 |
-
"execution_count":
|
| 740 |
"metadata": {
|
| 741 |
"execution": {
|
| 742 |
"iopub.execute_input": "2023-08-11T09:05:55.914238Z",
|
|
@@ -764,7 +508,7 @@
|
|
| 764 |
},
|
| 765 |
{
|
| 766 |
"cell_type": "code",
|
| 767 |
-
"execution_count":
|
| 768 |
"metadata": {
|
| 769 |
"execution": {
|
| 770 |
"iopub.execute_input": "2023-08-11T09:05:55.962811Z",
|
|
@@ -800,7 +544,7 @@
|
|
| 800 |
},
|
| 801 |
{
|
| 802 |
"cell_type": "code",
|
| 803 |
-
"execution_count":
|
| 804 |
"metadata": {
|
| 805 |
"execution": {
|
| 806 |
"iopub.execute_input": "2023-08-11T09:05:55.986146Z",
|
|
@@ -925,7 +669,7 @@
|
|
| 925 |
" 'Present_Price']"
|
| 926 |
]
|
| 927 |
},
|
| 928 |
-
"execution_count":
|
| 929 |
"metadata": {},
|
| 930 |
"output_type": "execute_result"
|
| 931 |
}
|
|
@@ -951,7 +695,7 @@
|
|
| 951 |
},
|
| 952 |
{
|
| 953 |
"cell_type": "code",
|
| 954 |
-
"execution_count":
|
| 955 |
"metadata": {
|
| 956 |
"execution": {
|
| 957 |
"iopub.execute_input": "2023-08-11T09:05:56.545107Z",
|
|
@@ -998,7 +742,7 @@
|
|
| 998 |
},
|
| 999 |
{
|
| 1000 |
"cell_type": "code",
|
| 1001 |
-
"execution_count":
|
| 1002 |
"metadata": {
|
| 1003 |
"execution": {
|
| 1004 |
"iopub.execute_input": "2023-08-11T09:05:56.568558Z",
|
|
@@ -1032,7 +776,7 @@
|
|
| 1032 |
},
|
| 1033 |
{
|
| 1034 |
"cell_type": "code",
|
| 1035 |
-
"execution_count":
|
| 1036 |
"metadata": {
|
| 1037 |
"execution": {
|
| 1038 |
"iopub.execute_input": "2023-08-11T09:05:56.586725Z",
|
|
@@ -1088,7 +832,7 @@
|
|
| 1088 |
},
|
| 1089 |
{
|
| 1090 |
"cell_type": "code",
|
| 1091 |
-
"execution_count":
|
| 1092 |
"metadata": {
|
| 1093 |
"execution": {
|
| 1094 |
"iopub.execute_input": "2023-08-11T09:13:14.556627Z",
|
|
@@ -1107,7 +851,7 @@
|
|
| 1107 |
},
|
| 1108 |
{
|
| 1109 |
"cell_type": "code",
|
| 1110 |
-
"execution_count":
|
| 1111 |
"metadata": {
|
| 1112 |
"execution": {
|
| 1113 |
"iopub.execute_input": "2023-08-11T09:13:14.629117Z",
|
|
@@ -1124,7 +868,7 @@
|
|
| 1124 |
"0.9740787800578905"
|
| 1125 |
]
|
| 1126 |
},
|
| 1127 |
-
"execution_count":
|
| 1128 |
"metadata": {},
|
| 1129 |
"output_type": "execute_result"
|
| 1130 |
}
|
|
@@ -1145,7 +889,7 @@
|
|
| 1145 |
},
|
| 1146 |
{
|
| 1147 |
"cell_type": "code",
|
| 1148 |
-
"execution_count":
|
| 1149 |
"metadata": {
|
| 1150 |
"execution": {
|
| 1151 |
"iopub.execute_input": "2023-08-11T09:13:14.719423Z",
|
|
@@ -1165,7 +909,7 @@
|
|
| 1165 |
},
|
| 1166 |
{
|
| 1167 |
"cell_type": "code",
|
| 1168 |
-
"execution_count":
|
| 1169 |
"metadata": {
|
| 1170 |
"execution": {
|
| 1171 |
"iopub.execute_input": "2023-08-11T09:13:14.925993Z",
|
|
@@ -1215,7 +959,7 @@
|
|
| 1215 |
},
|
| 1216 |
{
|
| 1217 |
"cell_type": "code",
|
| 1218 |
-
"execution_count":
|
| 1219 |
"metadata": {
|
| 1220 |
"execution": {
|
| 1221 |
"iopub.execute_input": "2023-08-11T09:13:15.105155Z",
|
|
@@ -1326,7 +1070,7 @@
|
|
| 1326 |
},
|
| 1327 |
{
|
| 1328 |
"cell_type": "code",
|
| 1329 |
-
"execution_count":
|
| 1330 |
"metadata": {
|
| 1331 |
"execution": {
|
| 1332 |
"iopub.execute_input": "2023-08-11T09:13:16.111279Z",
|
|
@@ -1344,7 +1088,7 @@
|
|
| 1344 |
"traceback": [
|
| 1345 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1346 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 1347 |
-
"\u001b[0;32m<ipython-input-
|
| 1348 |
"\u001b[0;31mValueError\u001b[0m: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part."
|
| 1349 |
]
|
| 1350 |
}
|
|
|
|
| 232 |
},
|
| 233 |
{
|
| 234 |
"cell_type": "code",
|
| 235 |
+
"execution_count": null,
|
| 236 |
"metadata": {
|
| 237 |
"execution": {
|
| 238 |
"iopub.execute_input": "2023-08-11T09:05:54.311108Z",
|
|
|
|
| 242 |
"shell.execute_reply.started": "2023-08-11T09:05:54.311087Z"
|
| 243 |
}
|
| 244 |
},
|
| 245 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 246 |
"source": [
|
| 247 |
"# 观察数据类型\n",
|
| 248 |
"df.info()"
|
|
|
|
| 250 |
},
|
| 251 |
{
|
| 252 |
"cell_type": "code",
|
| 253 |
+
"execution_count": null,
|
| 254 |
"metadata": {
|
| 255 |
"execution": {
|
| 256 |
"iopub.execute_input": "2023-08-11T09:05:54.326848Z",
|
|
|
|
| 260 |
"shell.execute_reply.started": "2023-08-11T09:05:54.326824Z"
|
| 261 |
}
|
| 262 |
},
|
| 263 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
"source": [
|
| 265 |
"# 检查缺失值\n",
|
| 266 |
"df.isnull().sum()"
|
|
|
|
| 268 |
},
|
| 269 |
{
|
| 270 |
"cell_type": "code",
|
| 271 |
+
"execution_count": null,
|
| 272 |
"metadata": {
|
| 273 |
"execution": {
|
| 274 |
"iopub.execute_input": "2023-08-11T09:05:54.338268Z",
|
|
|
|
| 278 |
"shell.execute_reply.started": "2023-08-11T09:05:54.338225Z"
|
| 279 |
}
|
| 280 |
},
|
| 281 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
"# 观察数据的详细信息\n",
|
| 284 |
"df.describe(include='all')"
|
|
|
|
| 362 |
},
|
| 363 |
{
|
| 364 |
"cell_type": "code",
|
| 365 |
+
"execution_count": null,
|
| 366 |
"metadata": {
|
| 367 |
"execution": {
|
| 368 |
"iopub.execute_input": "2023-08-11T09:05:55.855050Z",
|
|
|
|
| 372 |
"shell.execute_reply.started": "2023-08-11T09:05:55.855014Z"
|
| 373 |
}
|
| 374 |
},
|
| 375 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
"source": [
|
| 377 |
"# 检查是否有重复数据\n",
|
| 378 |
"df.duplicated().sum()"
|
|
|
|
| 380 |
},
|
| 381 |
{
|
| 382 |
"cell_type": "code",
|
| 383 |
+
"execution_count": 3,
|
| 384 |
"metadata": {
|
| 385 |
"execution": {
|
| 386 |
"iopub.execute_input": "2023-08-11T09:05:55.865903Z",
|
|
|
|
| 397 |
"0"
|
| 398 |
]
|
| 399 |
},
|
| 400 |
+
"execution_count": 3,
|
| 401 |
"metadata": {},
|
| 402 |
"output_type": "execute_result"
|
| 403 |
}
|
|
|
|
| 480 |
},
|
| 481 |
{
|
| 482 |
"cell_type": "code",
|
| 483 |
+
"execution_count": 4,
|
| 484 |
"metadata": {
|
| 485 |
"execution": {
|
| 486 |
"iopub.execute_input": "2023-08-11T09:05:55.914238Z",
|
|
|
|
| 508 |
},
|
| 509 |
{
|
| 510 |
"cell_type": "code",
|
| 511 |
+
"execution_count": 5,
|
| 512 |
"metadata": {
|
| 513 |
"execution": {
|
| 514 |
"iopub.execute_input": "2023-08-11T09:05:55.962811Z",
|
|
|
|
| 544 |
},
|
| 545 |
{
|
| 546 |
"cell_type": "code",
|
| 547 |
+
"execution_count": 6,
|
| 548 |
"metadata": {
|
| 549 |
"execution": {
|
| 550 |
"iopub.execute_input": "2023-08-11T09:05:55.986146Z",
|
|
|
|
| 669 |
" 'Present_Price']"
|
| 670 |
]
|
| 671 |
},
|
| 672 |
+
"execution_count": 6,
|
| 673 |
"metadata": {},
|
| 674 |
"output_type": "execute_result"
|
| 675 |
}
|
|
|
|
| 695 |
},
|
| 696 |
{
|
| 697 |
"cell_type": "code",
|
| 698 |
+
"execution_count": 7,
|
| 699 |
"metadata": {
|
| 700 |
"execution": {
|
| 701 |
"iopub.execute_input": "2023-08-11T09:05:56.545107Z",
|
|
|
|
| 742 |
},
|
| 743 |
{
|
| 744 |
"cell_type": "code",
|
| 745 |
+
"execution_count": 8,
|
| 746 |
"metadata": {
|
| 747 |
"execution": {
|
| 748 |
"iopub.execute_input": "2023-08-11T09:05:56.568558Z",
|
|
|
|
| 776 |
},
|
| 777 |
{
|
| 778 |
"cell_type": "code",
|
| 779 |
+
"execution_count": 9,
|
| 780 |
"metadata": {
|
| 781 |
"execution": {
|
| 782 |
"iopub.execute_input": "2023-08-11T09:05:56.586725Z",
|
|
|
|
| 832 |
},
|
| 833 |
{
|
| 834 |
"cell_type": "code",
|
| 835 |
+
"execution_count": 10,
|
| 836 |
"metadata": {
|
| 837 |
"execution": {
|
| 838 |
"iopub.execute_input": "2023-08-11T09:13:14.556627Z",
|
|
|
|
| 851 |
},
|
| 852 |
{
|
| 853 |
"cell_type": "code",
|
| 854 |
+
"execution_count": 11,
|
| 855 |
"metadata": {
|
| 856 |
"execution": {
|
| 857 |
"iopub.execute_input": "2023-08-11T09:13:14.629117Z",
|
|
|
|
| 868 |
"0.9740787800578905"
|
| 869 |
]
|
| 870 |
},
|
| 871 |
+
"execution_count": 11,
|
| 872 |
"metadata": {},
|
| 873 |
"output_type": "execute_result"
|
| 874 |
}
|
|
|
|
| 889 |
},
|
| 890 |
{
|
| 891 |
"cell_type": "code",
|
| 892 |
+
"execution_count": 12,
|
| 893 |
"metadata": {
|
| 894 |
"execution": {
|
| 895 |
"iopub.execute_input": "2023-08-11T09:13:14.719423Z",
|
|
|
|
| 909 |
},
|
| 910 |
{
|
| 911 |
"cell_type": "code",
|
| 912 |
+
"execution_count": 13,
|
| 913 |
"metadata": {
|
| 914 |
"execution": {
|
| 915 |
"iopub.execute_input": "2023-08-11T09:13:14.925993Z",
|
|
|
|
| 959 |
},
|
| 960 |
{
|
| 961 |
"cell_type": "code",
|
| 962 |
+
"execution_count": 14,
|
| 963 |
"metadata": {
|
| 964 |
"execution": {
|
| 965 |
"iopub.execute_input": "2023-08-11T09:13:15.105155Z",
|
|
|
|
| 1070 |
},
|
| 1071 |
{
|
| 1072 |
"cell_type": "code",
|
| 1073 |
+
"execution_count": 15,
|
| 1074 |
"metadata": {
|
| 1075 |
"execution": {
|
| 1076 |
"iopub.execute_input": "2023-08-11T09:13:16.111279Z",
|
|
|
|
| 1088 |
"traceback": [
|
| 1089 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1090 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 1091 |
+
"\u001b[0;32m<ipython-input-15-a14b7acf6d82>\u001b[0m in \u001b[0;36m<cell line: 5>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0mf_index\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'gbr'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'gbr_gs'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'rfr'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'rfr_gs'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'X_train'\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'gbr2'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'rfr2'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0mfeature_df\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0marray\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcolumns\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfearture_names\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mindex\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mf_index\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 15\u001b[0m \u001b[0mdisplay\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfeature_df\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1092 |
"\u001b[0;31mValueError\u001b[0m: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part."
|
| 1093 |
]
|
| 1094 |
}
|
benchmark/pandas_14/pandas_14_fixed.ipynb
CHANGED
|
@@ -69,7 +69,7 @@
|
|
| 69 |
},
|
| 70 |
{
|
| 71 |
"cell_type": "code",
|
| 72 |
-
"execution_count":
|
| 73 |
"metadata": {
|
| 74 |
"execution": {
|
| 75 |
"iopub.execute_input": "2023-06-08T04:31:45.299138Z",
|
|
@@ -80,16 +80,7 @@
|
|
| 80 |
},
|
| 81 |
"id": "grAO86gTmnjJ"
|
| 82 |
},
|
| 83 |
-
"outputs": [
|
| 84 |
-
{
|
| 85 |
-
"name": "stdout",
|
| 86 |
-
"output_type": "stream",
|
| 87 |
-
"text": [
|
| 88 |
-
"TensorFlow v2.17.0\n",
|
| 89 |
-
"TensorFlow Decision Forests v1.10.0\n"
|
| 90 |
-
]
|
| 91 |
-
}
|
| 92 |
-
],
|
| 93 |
"source": [
|
| 94 |
"print(\"TensorFlow v\" + tf.__version__)\n",
|
| 95 |
"print(\"TensorFlow Decision Forests v\" + tfdf.__version__)"
|
|
@@ -106,7 +97,7 @@
|
|
| 106 |
},
|
| 107 |
{
|
| 108 |
"cell_type": "code",
|
| 109 |
-
"execution_count":
|
| 110 |
"metadata": {
|
| 111 |
"execution": {
|
| 112 |
"iopub.execute_input": "2023-06-08T04:31:45.313150Z",
|
|
@@ -143,7 +134,7 @@
|
|
| 143 |
},
|
| 144 |
{
|
| 145 |
"cell_type": "code",
|
| 146 |
-
"execution_count":
|
| 147 |
"metadata": {
|
| 148 |
"execution": {
|
| 149 |
"iopub.execute_input": "2023-06-08T04:31:45.382127Z",
|
|
@@ -154,162 +145,7 @@
|
|
| 154 |
},
|
| 155 |
"id": "nCx3PE1xmnjM"
|
| 156 |
},
|
| 157 |
-
"outputs": [
|
| 158 |
-
{
|
| 159 |
-
"data": {
|
| 160 |
-
"text/html": [
|
| 161 |
-
"<div>\n",
|
| 162 |
-
"<style scoped>\n",
|
| 163 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 164 |
-
" vertical-align: middle;\n",
|
| 165 |
-
" }\n",
|
| 166 |
-
"\n",
|
| 167 |
-
" .dataframe tbody tr th {\n",
|
| 168 |
-
" vertical-align: top;\n",
|
| 169 |
-
" }\n",
|
| 170 |
-
"\n",
|
| 171 |
-
" .dataframe thead th {\n",
|
| 172 |
-
" text-align: right;\n",
|
| 173 |
-
" }\n",
|
| 174 |
-
"</style>\n",
|
| 175 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 176 |
-
" <thead>\n",
|
| 177 |
-
" <tr style=\"text-align: right;\">\n",
|
| 178 |
-
" <th></th>\n",
|
| 179 |
-
" <th>PassengerId</th>\n",
|
| 180 |
-
" <th>HomePlanet</th>\n",
|
| 181 |
-
" <th>CryoSleep</th>\n",
|
| 182 |
-
" <th>Cabin</th>\n",
|
| 183 |
-
" <th>Destination</th>\n",
|
| 184 |
-
" <th>Age</th>\n",
|
| 185 |
-
" <th>VIP</th>\n",
|
| 186 |
-
" <th>RoomService</th>\n",
|
| 187 |
-
" <th>FoodCourt</th>\n",
|
| 188 |
-
" <th>ShoppingMall</th>\n",
|
| 189 |
-
" <th>Spa</th>\n",
|
| 190 |
-
" <th>VRDeck</th>\n",
|
| 191 |
-
" <th>Name</th>\n",
|
| 192 |
-
" <th>Transported</th>\n",
|
| 193 |
-
" </tr>\n",
|
| 194 |
-
" </thead>\n",
|
| 195 |
-
" <tbody>\n",
|
| 196 |
-
" <tr>\n",
|
| 197 |
-
" <th>0</th>\n",
|
| 198 |
-
" <td>0001_01</td>\n",
|
| 199 |
-
" <td>Europa</td>\n",
|
| 200 |
-
" <td>False</td>\n",
|
| 201 |
-
" <td>B/0/P</td>\n",
|
| 202 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 203 |
-
" <td>39.0</td>\n",
|
| 204 |
-
" <td>False</td>\n",
|
| 205 |
-
" <td>0.0</td>\n",
|
| 206 |
-
" <td>0.0</td>\n",
|
| 207 |
-
" <td>0.0</td>\n",
|
| 208 |
-
" <td>0.0</td>\n",
|
| 209 |
-
" <td>0.0</td>\n",
|
| 210 |
-
" <td>Maham Ofracculy</td>\n",
|
| 211 |
-
" <td>False</td>\n",
|
| 212 |
-
" </tr>\n",
|
| 213 |
-
" <tr>\n",
|
| 214 |
-
" <th>1</th>\n",
|
| 215 |
-
" <td>0002_01</td>\n",
|
| 216 |
-
" <td>Earth</td>\n",
|
| 217 |
-
" <td>False</td>\n",
|
| 218 |
-
" <td>F/0/S</td>\n",
|
| 219 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 220 |
-
" <td>24.0</td>\n",
|
| 221 |
-
" <td>False</td>\n",
|
| 222 |
-
" <td>109.0</td>\n",
|
| 223 |
-
" <td>9.0</td>\n",
|
| 224 |
-
" <td>25.0</td>\n",
|
| 225 |
-
" <td>549.0</td>\n",
|
| 226 |
-
" <td>44.0</td>\n",
|
| 227 |
-
" <td>Juanna Vines</td>\n",
|
| 228 |
-
" <td>True</td>\n",
|
| 229 |
-
" </tr>\n",
|
| 230 |
-
" <tr>\n",
|
| 231 |
-
" <th>2</th>\n",
|
| 232 |
-
" <td>0003_01</td>\n",
|
| 233 |
-
" <td>Europa</td>\n",
|
| 234 |
-
" <td>False</td>\n",
|
| 235 |
-
" <td>A/0/S</td>\n",
|
| 236 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 237 |
-
" <td>58.0</td>\n",
|
| 238 |
-
" <td>True</td>\n",
|
| 239 |
-
" <td>43.0</td>\n",
|
| 240 |
-
" <td>3576.0</td>\n",
|
| 241 |
-
" <td>0.0</td>\n",
|
| 242 |
-
" <td>6715.0</td>\n",
|
| 243 |
-
" <td>49.0</td>\n",
|
| 244 |
-
" <td>Altark Susent</td>\n",
|
| 245 |
-
" <td>False</td>\n",
|
| 246 |
-
" </tr>\n",
|
| 247 |
-
" <tr>\n",
|
| 248 |
-
" <th>3</th>\n",
|
| 249 |
-
" <td>0003_02</td>\n",
|
| 250 |
-
" <td>Europa</td>\n",
|
| 251 |
-
" <td>False</td>\n",
|
| 252 |
-
" <td>A/0/S</td>\n",
|
| 253 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 254 |
-
" <td>33.0</td>\n",
|
| 255 |
-
" <td>False</td>\n",
|
| 256 |
-
" <td>0.0</td>\n",
|
| 257 |
-
" <td>1283.0</td>\n",
|
| 258 |
-
" <td>371.0</td>\n",
|
| 259 |
-
" <td>3329.0</td>\n",
|
| 260 |
-
" <td>193.0</td>\n",
|
| 261 |
-
" <td>Solam Susent</td>\n",
|
| 262 |
-
" <td>False</td>\n",
|
| 263 |
-
" </tr>\n",
|
| 264 |
-
" <tr>\n",
|
| 265 |
-
" <th>4</th>\n",
|
| 266 |
-
" <td>0004_01</td>\n",
|
| 267 |
-
" <td>Earth</td>\n",
|
| 268 |
-
" <td>False</td>\n",
|
| 269 |
-
" <td>F/1/S</td>\n",
|
| 270 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 271 |
-
" <td>16.0</td>\n",
|
| 272 |
-
" <td>False</td>\n",
|
| 273 |
-
" <td>303.0</td>\n",
|
| 274 |
-
" <td>70.0</td>\n",
|
| 275 |
-
" <td>151.0</td>\n",
|
| 276 |
-
" <td>565.0</td>\n",
|
| 277 |
-
" <td>2.0</td>\n",
|
| 278 |
-
" <td>Willy Santantines</td>\n",
|
| 279 |
-
" <td>True</td>\n",
|
| 280 |
-
" </tr>\n",
|
| 281 |
-
" </tbody>\n",
|
| 282 |
-
"</table>\n",
|
| 283 |
-
"</div>"
|
| 284 |
-
],
|
| 285 |
-
"text/plain": [
|
| 286 |
-
" PassengerId HomePlanet CryoSleep Cabin Destination Age VIP \\\n",
|
| 287 |
-
"0 0001_01 Europa False B/0/P TRAPPIST-1e 39.0 False \n",
|
| 288 |
-
"1 0002_01 Earth False F/0/S TRAPPIST-1e 24.0 False \n",
|
| 289 |
-
"2 0003_01 Europa False A/0/S TRAPPIST-1e 58.0 True \n",
|
| 290 |
-
"3 0003_02 Europa False A/0/S TRAPPIST-1e 33.0 False \n",
|
| 291 |
-
"4 0004_01 Earth False F/1/S TRAPPIST-1e 16.0 False \n",
|
| 292 |
-
"\n",
|
| 293 |
-
" RoomService FoodCourt ShoppingMall Spa VRDeck Name \\\n",
|
| 294 |
-
"0 0.0 0.0 0.0 0.0 0.0 Maham Ofracculy \n",
|
| 295 |
-
"1 109.0 9.0 25.0 549.0 44.0 Juanna Vines \n",
|
| 296 |
-
"2 43.0 3576.0 0.0 6715.0 49.0 Altark Susent \n",
|
| 297 |
-
"3 0.0 1283.0 371.0 3329.0 193.0 Solam Susent \n",
|
| 298 |
-
"4 303.0 70.0 151.0 565.0 2.0 Willy Santantines \n",
|
| 299 |
-
"\n",
|
| 300 |
-
" Transported \n",
|
| 301 |
-
"0 False \n",
|
| 302 |
-
"1 True \n",
|
| 303 |
-
"2 False \n",
|
| 304 |
-
"3 False \n",
|
| 305 |
-
"4 True "
|
| 306 |
-
]
|
| 307 |
-
},
|
| 308 |
-
"execution_count": 4,
|
| 309 |
-
"metadata": {},
|
| 310 |
-
"output_type": "execute_result"
|
| 311 |
-
}
|
| 312 |
-
],
|
| 313 |
"source": [
|
| 314 |
"# Display the first 5 examples\n",
|
| 315 |
"df.head(5)"
|
|
@@ -341,7 +177,7 @@
|
|
| 341 |
},
|
| 342 |
{
|
| 343 |
"cell_type": "code",
|
| 344 |
-
"execution_count":
|
| 345 |
"metadata": {
|
| 346 |
"execution": {
|
| 347 |
"iopub.execute_input": "2023-06-08T04:31:45.426363Z",
|
|
@@ -352,140 +188,7 @@
|
|
| 352 |
},
|
| 353 |
"id": "XjwG5wjfmnjO"
|
| 354 |
},
|
| 355 |
-
"outputs": [
|
| 356 |
-
{
|
| 357 |
-
"data": {
|
| 358 |
-
"text/html": [
|
| 359 |
-
"<div>\n",
|
| 360 |
-
"<style scoped>\n",
|
| 361 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 362 |
-
" vertical-align: middle;\n",
|
| 363 |
-
" }\n",
|
| 364 |
-
"\n",
|
| 365 |
-
" .dataframe tbody tr th {\n",
|
| 366 |
-
" vertical-align: top;\n",
|
| 367 |
-
" }\n",
|
| 368 |
-
"\n",
|
| 369 |
-
" .dataframe thead th {\n",
|
| 370 |
-
" text-align: right;\n",
|
| 371 |
-
" }\n",
|
| 372 |
-
"</style>\n",
|
| 373 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 374 |
-
" <thead>\n",
|
| 375 |
-
" <tr style=\"text-align: right;\">\n",
|
| 376 |
-
" <th></th>\n",
|
| 377 |
-
" <th>Age</th>\n",
|
| 378 |
-
" <th>RoomService</th>\n",
|
| 379 |
-
" <th>FoodCourt</th>\n",
|
| 380 |
-
" <th>ShoppingMall</th>\n",
|
| 381 |
-
" <th>Spa</th>\n",
|
| 382 |
-
" <th>VRDeck</th>\n",
|
| 383 |
-
" </tr>\n",
|
| 384 |
-
" </thead>\n",
|
| 385 |
-
" <tbody>\n",
|
| 386 |
-
" <tr>\n",
|
| 387 |
-
" <th>count</th>\n",
|
| 388 |
-
" <td>8514.000000</td>\n",
|
| 389 |
-
" <td>8512.000000</td>\n",
|
| 390 |
-
" <td>8510.000000</td>\n",
|
| 391 |
-
" <td>8485.000000</td>\n",
|
| 392 |
-
" <td>8510.000000</td>\n",
|
| 393 |
-
" <td>8505.000000</td>\n",
|
| 394 |
-
" </tr>\n",
|
| 395 |
-
" <tr>\n",
|
| 396 |
-
" <th>mean</th>\n",
|
| 397 |
-
" <td>28.827930</td>\n",
|
| 398 |
-
" <td>224.687617</td>\n",
|
| 399 |
-
" <td>458.077203</td>\n",
|
| 400 |
-
" <td>173.729169</td>\n",
|
| 401 |
-
" <td>311.138778</td>\n",
|
| 402 |
-
" <td>304.854791</td>\n",
|
| 403 |
-
" </tr>\n",
|
| 404 |
-
" <tr>\n",
|
| 405 |
-
" <th>std</th>\n",
|
| 406 |
-
" <td>14.489021</td>\n",
|
| 407 |
-
" <td>666.717663</td>\n",
|
| 408 |
-
" <td>1611.489240</td>\n",
|
| 409 |
-
" <td>604.696458</td>\n",
|
| 410 |
-
" <td>1136.705535</td>\n",
|
| 411 |
-
" <td>1145.717189</td>\n",
|
| 412 |
-
" </tr>\n",
|
| 413 |
-
" <tr>\n",
|
| 414 |
-
" <th>min</th>\n",
|
| 415 |
-
" <td>0.000000</td>\n",
|
| 416 |
-
" <td>0.000000</td>\n",
|
| 417 |
-
" <td>0.000000</td>\n",
|
| 418 |
-
" <td>0.000000</td>\n",
|
| 419 |
-
" <td>0.000000</td>\n",
|
| 420 |
-
" <td>0.000000</td>\n",
|
| 421 |
-
" </tr>\n",
|
| 422 |
-
" <tr>\n",
|
| 423 |
-
" <th>25%</th>\n",
|
| 424 |
-
" <td>19.000000</td>\n",
|
| 425 |
-
" <td>0.000000</td>\n",
|
| 426 |
-
" <td>0.000000</td>\n",
|
| 427 |
-
" <td>0.000000</td>\n",
|
| 428 |
-
" <td>0.000000</td>\n",
|
| 429 |
-
" <td>0.000000</td>\n",
|
| 430 |
-
" </tr>\n",
|
| 431 |
-
" <tr>\n",
|
| 432 |
-
" <th>50%</th>\n",
|
| 433 |
-
" <td>27.000000</td>\n",
|
| 434 |
-
" <td>0.000000</td>\n",
|
| 435 |
-
" <td>0.000000</td>\n",
|
| 436 |
-
" <td>0.000000</td>\n",
|
| 437 |
-
" <td>0.000000</td>\n",
|
| 438 |
-
" <td>0.000000</td>\n",
|
| 439 |
-
" </tr>\n",
|
| 440 |
-
" <tr>\n",
|
| 441 |
-
" <th>75%</th>\n",
|
| 442 |
-
" <td>38.000000</td>\n",
|
| 443 |
-
" <td>47.000000</td>\n",
|
| 444 |
-
" <td>76.000000</td>\n",
|
| 445 |
-
" <td>27.000000</td>\n",
|
| 446 |
-
" <td>59.000000</td>\n",
|
| 447 |
-
" <td>46.000000</td>\n",
|
| 448 |
-
" </tr>\n",
|
| 449 |
-
" <tr>\n",
|
| 450 |
-
" <th>max</th>\n",
|
| 451 |
-
" <td>79.000000</td>\n",
|
| 452 |
-
" <td>14327.000000</td>\n",
|
| 453 |
-
" <td>29813.000000</td>\n",
|
| 454 |
-
" <td>23492.000000</td>\n",
|
| 455 |
-
" <td>22408.000000</td>\n",
|
| 456 |
-
" <td>24133.000000</td>\n",
|
| 457 |
-
" </tr>\n",
|
| 458 |
-
" </tbody>\n",
|
| 459 |
-
"</table>\n",
|
| 460 |
-
"</div>"
|
| 461 |
-
],
|
| 462 |
-
"text/plain": [
|
| 463 |
-
" Age RoomService FoodCourt ShoppingMall Spa \\\n",
|
| 464 |
-
"count 8514.000000 8512.000000 8510.000000 8485.000000 8510.000000 \n",
|
| 465 |
-
"mean 28.827930 224.687617 458.077203 173.729169 311.138778 \n",
|
| 466 |
-
"std 14.489021 666.717663 1611.489240 604.696458 1136.705535 \n",
|
| 467 |
-
"min 0.000000 0.000000 0.000000 0.000000 0.000000 \n",
|
| 468 |
-
"25% 19.000000 0.000000 0.000000 0.000000 0.000000 \n",
|
| 469 |
-
"50% 27.000000 0.000000 0.000000 0.000000 0.000000 \n",
|
| 470 |
-
"75% 38.000000 47.000000 76.000000 27.000000 59.000000 \n",
|
| 471 |
-
"max 79.000000 14327.000000 29813.000000 23492.000000 22408.000000 \n",
|
| 472 |
-
"\n",
|
| 473 |
-
" VRDeck \n",
|
| 474 |
-
"count 8505.000000 \n",
|
| 475 |
-
"mean 304.854791 \n",
|
| 476 |
-
"std 1145.717189 \n",
|
| 477 |
-
"min 0.000000 \n",
|
| 478 |
-
"25% 0.000000 \n",
|
| 479 |
-
"50% 0.000000 \n",
|
| 480 |
-
"75% 46.000000 \n",
|
| 481 |
-
"max 24133.000000 "
|
| 482 |
-
]
|
| 483 |
-
},
|
| 484 |
-
"execution_count": 5,
|
| 485 |
-
"metadata": {},
|
| 486 |
-
"output_type": "execute_result"
|
| 487 |
-
}
|
| 488 |
-
],
|
| 489 |
"source": [
|
| 490 |
"df.describe()"
|
| 491 |
]
|
|
@@ -502,7 +205,7 @@
|
|
| 502 |
},
|
| 503 |
{
|
| 504 |
"cell_type": "code",
|
| 505 |
-
"execution_count":
|
| 506 |
"metadata": {
|
| 507 |
"execution": {
|
| 508 |
"iopub.execute_input": "2023-06-08T04:31:45.482430Z",
|
|
@@ -512,28 +215,7 @@
|
|
| 512 |
"shell.execute_reply.started": "2023-06-08T04:31:45.482386Z"
|
| 513 |
}
|
| 514 |
},
|
| 515 |
-
"outputs": [
|
| 516 |
-
{
|
| 517 |
-
"name": "stdout",
|
| 518 |
-
"output_type": "stream",
|
| 519 |
-
"text": [
|
| 520 |
-
"Total de valores nulos de PassengerId = 0 equivale al 0.00% del total de la columna.\n",
|
| 521 |
-
"Total de valores nulos de HomePlanet = 201 equivale al 2.31% del total de la columna.\n",
|
| 522 |
-
"Total de valores nulos de CryoSleep = 217 equivale al 2.50% del total de la columna.\n",
|
| 523 |
-
"Total de valores nulos de Cabin = 199 equivale al 2.29% del total de la columna.\n",
|
| 524 |
-
"Total de valores nulos de Destination = 182 equivale al 2.09% del total de la columna.\n",
|
| 525 |
-
"Total de valores nulos de Age = 179 equivale al 2.06% del total de la columna.\n",
|
| 526 |
-
"Total de valores nulos de VIP = 203 equivale al 2.34% del total de la columna.\n",
|
| 527 |
-
"Total de valores nulos de RoomService = 181 equivale al 2.08% del total de la columna.\n",
|
| 528 |
-
"Total de valores nulos de FoodCourt = 183 equivale al 2.11% del total de la columna.\n",
|
| 529 |
-
"Total de valores nulos de ShoppingMall = 208 equivale al 2.39% del total de la columna.\n",
|
| 530 |
-
"Total de valores nulos de Spa = 183 equivale al 2.11% del total de la columna.\n",
|
| 531 |
-
"Total de valores nulos de VRDeck = 188 equivale al 2.16% del total de la columna.\n",
|
| 532 |
-
"Total de valores nulos de Name = 200 equivale al 2.30% del total de la columna.\n",
|
| 533 |
-
"Total de valores nulos de Transported = 0 equivale al 0.00% del total de la columna.\n"
|
| 534 |
-
]
|
| 535 |
-
}
|
| 536 |
-
],
|
| 537 |
"source": [
|
| 538 |
"for feature in df.columns:\n",
|
| 539 |
" x = df[feature].isna().sum()\n",
|
|
@@ -542,7 +224,7 @@
|
|
| 542 |
},
|
| 543 |
{
|
| 544 |
"cell_type": "code",
|
| 545 |
-
"execution_count":
|
| 546 |
"metadata": {
|
| 547 |
"execution": {
|
| 548 |
"iopub.execute_input": "2023-06-08T04:31:45.504577Z",
|
|
@@ -553,35 +235,7 @@
|
|
| 553 |
},
|
| 554 |
"id": "UmWpnVxQmnjO"
|
| 555 |
},
|
| 556 |
-
"outputs": [
|
| 557 |
-
{
|
| 558 |
-
"name": "stdout",
|
| 559 |
-
"output_type": "stream",
|
| 560 |
-
"text": [
|
| 561 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 562 |
-
"RangeIndex: 8693 entries, 0 to 8692\n",
|
| 563 |
-
"Data columns (total 14 columns):\n",
|
| 564 |
-
" # Column Non-Null Count Dtype \n",
|
| 565 |
-
"--- ------ -------------- ----- \n",
|
| 566 |
-
" 0 PassengerId 8693 non-null object \n",
|
| 567 |
-
" 1 HomePlanet 8492 non-null object \n",
|
| 568 |
-
" 2 CryoSleep 8476 non-null object \n",
|
| 569 |
-
" 3 Cabin 8494 non-null object \n",
|
| 570 |
-
" 4 Destination 8511 non-null object \n",
|
| 571 |
-
" 5 Age 8514 non-null float64\n",
|
| 572 |
-
" 6 VIP 8490 non-null object \n",
|
| 573 |
-
" 7 RoomService 8512 non-null float64\n",
|
| 574 |
-
" 8 FoodCourt 8510 non-null float64\n",
|
| 575 |
-
" 9 ShoppingMall 8485 non-null float64\n",
|
| 576 |
-
" 10 Spa 8510 non-null float64\n",
|
| 577 |
-
" 11 VRDeck 8505 non-null float64\n",
|
| 578 |
-
" 12 Name 8493 non-null object \n",
|
| 579 |
-
" 13 Transported 8693 non-null bool \n",
|
| 580 |
-
"dtypes: bool(1), float64(6), object(7)\n",
|
| 581 |
-
"memory usage: 891.5+ KB\n"
|
| 582 |
-
]
|
| 583 |
-
}
|
| 584 |
-
],
|
| 585 |
"source": [
|
| 586 |
"df.info()"
|
| 587 |
]
|
|
@@ -879,7 +533,7 @@
|
|
| 879 |
},
|
| 880 |
{
|
| 881 |
"cell_type": "code",
|
| 882 |
-
"execution_count":
|
| 883 |
"metadata": {
|
| 884 |
"execution": {
|
| 885 |
"iopub.execute_input": "2023-06-08T04:31:47.665505Z",
|
|
@@ -1021,7 +675,7 @@
|
|
| 1021 |
"4 70.0 151.0 565.0 2.0 True "
|
| 1022 |
]
|
| 1023 |
},
|
| 1024 |
-
"execution_count":
|
| 1025 |
"metadata": {},
|
| 1026 |
"output_type": "execute_result"
|
| 1027 |
}
|
|
@@ -1040,7 +694,7 @@
|
|
| 1040 |
},
|
| 1041 |
{
|
| 1042 |
"cell_type": "code",
|
| 1043 |
-
"execution_count":
|
| 1044 |
"metadata": {
|
| 1045 |
"execution": {
|
| 1046 |
"iopub.execute_input": "2023-06-08T04:31:47.695912Z",
|
|
@@ -1069,7 +723,7 @@
|
|
| 1069 |
"dtype: int64"
|
| 1070 |
]
|
| 1071 |
},
|
| 1072 |
-
"execution_count":
|
| 1073 |
"metadata": {},
|
| 1074 |
"output_type": "execute_result"
|
| 1075 |
}
|
|
@@ -1081,7 +735,7 @@
|
|
| 1081 |
},
|
| 1082 |
{
|
| 1083 |
"cell_type": "code",
|
| 1084 |
-
"execution_count":
|
| 1085 |
"metadata": {
|
| 1086 |
"execution": {
|
| 1087 |
"iopub.execute_input": "2023-06-08T04:31:47.715118Z",
|
|
@@ -1091,20 +745,7 @@
|
|
| 1091 |
"shell.execute_reply.started": "2023-06-08T04:31:47.715064Z"
|
| 1092 |
}
|
| 1093 |
},
|
| 1094 |
-
"outputs": [
|
| 1095 |
-
{
|
| 1096 |
-
"name": "stdout",
|
| 1097 |
-
"output_type": "stream",
|
| 1098 |
-
"text": [
|
| 1099 |
-
"Columna HomePlanet - ['Europa' 'Earth' 'Mars' nan]\n",
|
| 1100 |
-
"Columna Cabin - ['B/0/P' 'F/0/S' 'A/0/S' ... 'G/1499/S' 'G/1500/S' 'E/608/S']\n",
|
| 1101 |
-
"Columna Destination - ['TRAPPIST-1e' 'PSO J318.5-22' '55 Cancri e' nan]\n",
|
| 1102 |
-
"Columna CryoSleep - [False True nan]\n",
|
| 1103 |
-
"Columna VIP - [False True nan]\n",
|
| 1104 |
-
"Columna Transported - [False True]\n"
|
| 1105 |
-
]
|
| 1106 |
-
}
|
| 1107 |
-
],
|
| 1108 |
"source": [
|
| 1109 |
"for column in ('HomePlanet', 'Cabin', 'Destination','CryoSleep','VIP','Transported'):\n",
|
| 1110 |
" print(\"Columna\",column,\"-\" , df[column].unique())"
|
|
@@ -1119,7 +760,7 @@
|
|
| 1119 |
},
|
| 1120 |
{
|
| 1121 |
"cell_type": "code",
|
| 1122 |
-
"execution_count":
|
| 1123 |
"metadata": {
|
| 1124 |
"execution": {
|
| 1125 |
"iopub.execute_input": "2023-06-08T04:31:47.730956Z",
|
|
@@ -1181,7 +822,7 @@
|
|
| 1181 |
},
|
| 1182 |
{
|
| 1183 |
"cell_type": "code",
|
| 1184 |
-
"execution_count":
|
| 1185 |
"metadata": {
|
| 1186 |
"execution": {
|
| 1187 |
"iopub.execute_input": "2023-06-08T04:31:47.971942Z",
|
|
@@ -1191,37 +832,14 @@
|
|
| 1191 |
"shell.execute_reply.started": "2023-06-08T04:31:47.971909Z"
|
| 1192 |
}
|
| 1193 |
},
|
| 1194 |
-
"outputs": [
|
| 1195 |
-
{
|
| 1196 |
-
"data": {
|
| 1197 |
-
"text/plain": [
|
| 1198 |
-
"HomePlanet int64\n",
|
| 1199 |
-
"CryoSleep int64\n",
|
| 1200 |
-
"Cabin int64\n",
|
| 1201 |
-
"Destination int64\n",
|
| 1202 |
-
"Age float64\n",
|
| 1203 |
-
"VIP int64\n",
|
| 1204 |
-
"RoomService float64\n",
|
| 1205 |
-
"FoodCourt float64\n",
|
| 1206 |
-
"ShoppingMall float64\n",
|
| 1207 |
-
"Spa float64\n",
|
| 1208 |
-
"VRDeck float64\n",
|
| 1209 |
-
"Transported int64\n",
|
| 1210 |
-
"dtype: object"
|
| 1211 |
-
]
|
| 1212 |
-
},
|
| 1213 |
-
"execution_count": 12,
|
| 1214 |
-
"metadata": {},
|
| 1215 |
-
"output_type": "execute_result"
|
| 1216 |
-
}
|
| 1217 |
-
],
|
| 1218 |
"source": [
|
| 1219 |
"df.dtypes"
|
| 1220 |
]
|
| 1221 |
},
|
| 1222 |
{
|
| 1223 |
"cell_type": "code",
|
| 1224 |
-
"execution_count":
|
| 1225 |
"metadata": {
|
| 1226 |
"execution": {
|
| 1227 |
"iopub.execute_input": "2023-06-08T04:31:47.983075Z",
|
|
@@ -1250,7 +868,7 @@
|
|
| 1250 |
"dtype: object"
|
| 1251 |
]
|
| 1252 |
},
|
| 1253 |
-
"execution_count":
|
| 1254 |
"metadata": {},
|
| 1255 |
"output_type": "execute_result"
|
| 1256 |
}
|
|
@@ -1610,7 +1228,7 @@
|
|
| 1610 |
},
|
| 1611 |
{
|
| 1612 |
"cell_type": "code",
|
| 1613 |
-
"execution_count":
|
| 1614 |
"metadata": {
|
| 1615 |
"execution": {
|
| 1616 |
"iopub.execute_input": "2023-06-08T04:58:12.183623Z",
|
|
|
|
| 69 |
},
|
| 70 |
{
|
| 71 |
"cell_type": "code",
|
| 72 |
+
"execution_count": null,
|
| 73 |
"metadata": {
|
| 74 |
"execution": {
|
| 75 |
"iopub.execute_input": "2023-06-08T04:31:45.299138Z",
|
|
|
|
| 80 |
},
|
| 81 |
"id": "grAO86gTmnjJ"
|
| 82 |
},
|
| 83 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
"source": [
|
| 85 |
"print(\"TensorFlow v\" + tf.__version__)\n",
|
| 86 |
"print(\"TensorFlow Decision Forests v\" + tfdf.__version__)"
|
|
|
|
| 97 |
},
|
| 98 |
{
|
| 99 |
"cell_type": "code",
|
| 100 |
+
"execution_count": 2,
|
| 101 |
"metadata": {
|
| 102 |
"execution": {
|
| 103 |
"iopub.execute_input": "2023-06-08T04:31:45.313150Z",
|
|
|
|
| 134 |
},
|
| 135 |
{
|
| 136 |
"cell_type": "code",
|
| 137 |
+
"execution_count": null,
|
| 138 |
"metadata": {
|
| 139 |
"execution": {
|
| 140 |
"iopub.execute_input": "2023-06-08T04:31:45.382127Z",
|
|
|
|
| 145 |
},
|
| 146 |
"id": "nCx3PE1xmnjM"
|
| 147 |
},
|
| 148 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
"source": [
|
| 150 |
"# Display the first 5 examples\n",
|
| 151 |
"df.head(5)"
|
|
|
|
| 177 |
},
|
| 178 |
{
|
| 179 |
"cell_type": "code",
|
| 180 |
+
"execution_count": null,
|
| 181 |
"metadata": {
|
| 182 |
"execution": {
|
| 183 |
"iopub.execute_input": "2023-06-08T04:31:45.426363Z",
|
|
|
|
| 188 |
},
|
| 189 |
"id": "XjwG5wjfmnjO"
|
| 190 |
},
|
| 191 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
"source": [
|
| 193 |
"df.describe()"
|
| 194 |
]
|
|
|
|
| 205 |
},
|
| 206 |
{
|
| 207 |
"cell_type": "code",
|
| 208 |
+
"execution_count": null,
|
| 209 |
"metadata": {
|
| 210 |
"execution": {
|
| 211 |
"iopub.execute_input": "2023-06-08T04:31:45.482430Z",
|
|
|
|
| 215 |
"shell.execute_reply.started": "2023-06-08T04:31:45.482386Z"
|
| 216 |
}
|
| 217 |
},
|
| 218 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
"source": [
|
| 220 |
"for feature in df.columns:\n",
|
| 221 |
" x = df[feature].isna().sum()\n",
|
|
|
|
| 224 |
},
|
| 225 |
{
|
| 226 |
"cell_type": "code",
|
| 227 |
+
"execution_count": null,
|
| 228 |
"metadata": {
|
| 229 |
"execution": {
|
| 230 |
"iopub.execute_input": "2023-06-08T04:31:45.504577Z",
|
|
|
|
| 235 |
},
|
| 236 |
"id": "UmWpnVxQmnjO"
|
| 237 |
},
|
| 238 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
"source": [
|
| 240 |
"df.info()"
|
| 241 |
]
|
|
|
|
| 533 |
},
|
| 534 |
{
|
| 535 |
"cell_type": "code",
|
| 536 |
+
"execution_count": 3,
|
| 537 |
"metadata": {
|
| 538 |
"execution": {
|
| 539 |
"iopub.execute_input": "2023-06-08T04:31:47.665505Z",
|
|
|
|
| 675 |
"4 70.0 151.0 565.0 2.0 True "
|
| 676 |
]
|
| 677 |
},
|
| 678 |
+
"execution_count": 3,
|
| 679 |
"metadata": {},
|
| 680 |
"output_type": "execute_result"
|
| 681 |
}
|
|
|
|
| 694 |
},
|
| 695 |
{
|
| 696 |
"cell_type": "code",
|
| 697 |
+
"execution_count": 4,
|
| 698 |
"metadata": {
|
| 699 |
"execution": {
|
| 700 |
"iopub.execute_input": "2023-06-08T04:31:47.695912Z",
|
|
|
|
| 723 |
"dtype: int64"
|
| 724 |
]
|
| 725 |
},
|
| 726 |
+
"execution_count": 4,
|
| 727 |
"metadata": {},
|
| 728 |
"output_type": "execute_result"
|
| 729 |
}
|
|
|
|
| 735 |
},
|
| 736 |
{
|
| 737 |
"cell_type": "code",
|
| 738 |
+
"execution_count": null,
|
| 739 |
"metadata": {
|
| 740 |
"execution": {
|
| 741 |
"iopub.execute_input": "2023-06-08T04:31:47.715118Z",
|
|
|
|
| 745 |
"shell.execute_reply.started": "2023-06-08T04:31:47.715064Z"
|
| 746 |
}
|
| 747 |
},
|
| 748 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 749 |
"source": [
|
| 750 |
"for column in ('HomePlanet', 'Cabin', 'Destination','CryoSleep','VIP','Transported'):\n",
|
| 751 |
" print(\"Columna\",column,\"-\" , df[column].unique())"
|
|
|
|
| 760 |
},
|
| 761 |
{
|
| 762 |
"cell_type": "code",
|
| 763 |
+
"execution_count": 5,
|
| 764 |
"metadata": {
|
| 765 |
"execution": {
|
| 766 |
"iopub.execute_input": "2023-06-08T04:31:47.730956Z",
|
|
|
|
| 822 |
},
|
| 823 |
{
|
| 824 |
"cell_type": "code",
|
| 825 |
+
"execution_count": null,
|
| 826 |
"metadata": {
|
| 827 |
"execution": {
|
| 828 |
"iopub.execute_input": "2023-06-08T04:31:47.971942Z",
|
|
|
|
| 832 |
"shell.execute_reply.started": "2023-06-08T04:31:47.971909Z"
|
| 833 |
}
|
| 834 |
},
|
| 835 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 836 |
"source": [
|
| 837 |
"df.dtypes"
|
| 838 |
]
|
| 839 |
},
|
| 840 |
{
|
| 841 |
"cell_type": "code",
|
| 842 |
+
"execution_count": 6,
|
| 843 |
"metadata": {
|
| 844 |
"execution": {
|
| 845 |
"iopub.execute_input": "2023-06-08T04:31:47.983075Z",
|
|
|
|
| 868 |
"dtype: object"
|
| 869 |
]
|
| 870 |
},
|
| 871 |
+
"execution_count": 6,
|
| 872 |
"metadata": {},
|
| 873 |
"output_type": "execute_result"
|
| 874 |
}
|
|
|
|
| 1228 |
},
|
| 1229 |
{
|
| 1230 |
"cell_type": "code",
|
| 1231 |
+
"execution_count": 7,
|
| 1232 |
"metadata": {
|
| 1233 |
"execution": {
|
| 1234 |
"iopub.execute_input": "2023-06-08T04:58:12.183623Z",
|
benchmark/pandas_14/pandas_14_reproduced.ipynb
CHANGED
|
@@ -69,7 +69,7 @@
|
|
| 69 |
},
|
| 70 |
{
|
| 71 |
"cell_type": "code",
|
| 72 |
-
"execution_count":
|
| 73 |
"metadata": {
|
| 74 |
"execution": {
|
| 75 |
"iopub.execute_input": "2023-06-08T04:31:45.299138Z",
|
|
@@ -80,16 +80,7 @@
|
|
| 80 |
},
|
| 81 |
"id": "grAO86gTmnjJ"
|
| 82 |
},
|
| 83 |
-
"outputs": [
|
| 84 |
-
{
|
| 85 |
-
"name": "stdout",
|
| 86 |
-
"output_type": "stream",
|
| 87 |
-
"text": [
|
| 88 |
-
"TensorFlow v2.17.0\n",
|
| 89 |
-
"TensorFlow Decision Forests v1.10.0\n"
|
| 90 |
-
]
|
| 91 |
-
}
|
| 92 |
-
],
|
| 93 |
"source": [
|
| 94 |
"print(\"TensorFlow v\" + tf.__version__)\n",
|
| 95 |
"print(\"TensorFlow Decision Forests v\" + tfdf.__version__)"
|
|
@@ -106,7 +97,7 @@
|
|
| 106 |
},
|
| 107 |
{
|
| 108 |
"cell_type": "code",
|
| 109 |
-
"execution_count":
|
| 110 |
"metadata": {
|
| 111 |
"execution": {
|
| 112 |
"iopub.execute_input": "2023-06-08T04:31:45.313150Z",
|
|
@@ -143,7 +134,7 @@
|
|
| 143 |
},
|
| 144 |
{
|
| 145 |
"cell_type": "code",
|
| 146 |
-
"execution_count":
|
| 147 |
"metadata": {
|
| 148 |
"execution": {
|
| 149 |
"iopub.execute_input": "2023-06-08T04:31:45.382127Z",
|
|
@@ -154,162 +145,7 @@
|
|
| 154 |
},
|
| 155 |
"id": "nCx3PE1xmnjM"
|
| 156 |
},
|
| 157 |
-
"outputs": [
|
| 158 |
-
{
|
| 159 |
-
"data": {
|
| 160 |
-
"text/html": [
|
| 161 |
-
"<div>\n",
|
| 162 |
-
"<style scoped>\n",
|
| 163 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 164 |
-
" vertical-align: middle;\n",
|
| 165 |
-
" }\n",
|
| 166 |
-
"\n",
|
| 167 |
-
" .dataframe tbody tr th {\n",
|
| 168 |
-
" vertical-align: top;\n",
|
| 169 |
-
" }\n",
|
| 170 |
-
"\n",
|
| 171 |
-
" .dataframe thead th {\n",
|
| 172 |
-
" text-align: right;\n",
|
| 173 |
-
" }\n",
|
| 174 |
-
"</style>\n",
|
| 175 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 176 |
-
" <thead>\n",
|
| 177 |
-
" <tr style=\"text-align: right;\">\n",
|
| 178 |
-
" <th></th>\n",
|
| 179 |
-
" <th>PassengerId</th>\n",
|
| 180 |
-
" <th>HomePlanet</th>\n",
|
| 181 |
-
" <th>CryoSleep</th>\n",
|
| 182 |
-
" <th>Cabin</th>\n",
|
| 183 |
-
" <th>Destination</th>\n",
|
| 184 |
-
" <th>Age</th>\n",
|
| 185 |
-
" <th>VIP</th>\n",
|
| 186 |
-
" <th>RoomService</th>\n",
|
| 187 |
-
" <th>FoodCourt</th>\n",
|
| 188 |
-
" <th>ShoppingMall</th>\n",
|
| 189 |
-
" <th>Spa</th>\n",
|
| 190 |
-
" <th>VRDeck</th>\n",
|
| 191 |
-
" <th>Name</th>\n",
|
| 192 |
-
" <th>Transported</th>\n",
|
| 193 |
-
" </tr>\n",
|
| 194 |
-
" </thead>\n",
|
| 195 |
-
" <tbody>\n",
|
| 196 |
-
" <tr>\n",
|
| 197 |
-
" <th>0</th>\n",
|
| 198 |
-
" <td>0001_01</td>\n",
|
| 199 |
-
" <td>Europa</td>\n",
|
| 200 |
-
" <td>False</td>\n",
|
| 201 |
-
" <td>B/0/P</td>\n",
|
| 202 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 203 |
-
" <td>39.0</td>\n",
|
| 204 |
-
" <td>False</td>\n",
|
| 205 |
-
" <td>0.0</td>\n",
|
| 206 |
-
" <td>0.0</td>\n",
|
| 207 |
-
" <td>0.0</td>\n",
|
| 208 |
-
" <td>0.0</td>\n",
|
| 209 |
-
" <td>0.0</td>\n",
|
| 210 |
-
" <td>Maham Ofracculy</td>\n",
|
| 211 |
-
" <td>False</td>\n",
|
| 212 |
-
" </tr>\n",
|
| 213 |
-
" <tr>\n",
|
| 214 |
-
" <th>1</th>\n",
|
| 215 |
-
" <td>0002_01</td>\n",
|
| 216 |
-
" <td>Earth</td>\n",
|
| 217 |
-
" <td>False</td>\n",
|
| 218 |
-
" <td>F/0/S</td>\n",
|
| 219 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 220 |
-
" <td>24.0</td>\n",
|
| 221 |
-
" <td>False</td>\n",
|
| 222 |
-
" <td>109.0</td>\n",
|
| 223 |
-
" <td>9.0</td>\n",
|
| 224 |
-
" <td>25.0</td>\n",
|
| 225 |
-
" <td>549.0</td>\n",
|
| 226 |
-
" <td>44.0</td>\n",
|
| 227 |
-
" <td>Juanna Vines</td>\n",
|
| 228 |
-
" <td>True</td>\n",
|
| 229 |
-
" </tr>\n",
|
| 230 |
-
" <tr>\n",
|
| 231 |
-
" <th>2</th>\n",
|
| 232 |
-
" <td>0003_01</td>\n",
|
| 233 |
-
" <td>Europa</td>\n",
|
| 234 |
-
" <td>False</td>\n",
|
| 235 |
-
" <td>A/0/S</td>\n",
|
| 236 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 237 |
-
" <td>58.0</td>\n",
|
| 238 |
-
" <td>True</td>\n",
|
| 239 |
-
" <td>43.0</td>\n",
|
| 240 |
-
" <td>3576.0</td>\n",
|
| 241 |
-
" <td>0.0</td>\n",
|
| 242 |
-
" <td>6715.0</td>\n",
|
| 243 |
-
" <td>49.0</td>\n",
|
| 244 |
-
" <td>Altark Susent</td>\n",
|
| 245 |
-
" <td>False</td>\n",
|
| 246 |
-
" </tr>\n",
|
| 247 |
-
" <tr>\n",
|
| 248 |
-
" <th>3</th>\n",
|
| 249 |
-
" <td>0003_02</td>\n",
|
| 250 |
-
" <td>Europa</td>\n",
|
| 251 |
-
" <td>False</td>\n",
|
| 252 |
-
" <td>A/0/S</td>\n",
|
| 253 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 254 |
-
" <td>33.0</td>\n",
|
| 255 |
-
" <td>False</td>\n",
|
| 256 |
-
" <td>0.0</td>\n",
|
| 257 |
-
" <td>1283.0</td>\n",
|
| 258 |
-
" <td>371.0</td>\n",
|
| 259 |
-
" <td>3329.0</td>\n",
|
| 260 |
-
" <td>193.0</td>\n",
|
| 261 |
-
" <td>Solam Susent</td>\n",
|
| 262 |
-
" <td>False</td>\n",
|
| 263 |
-
" </tr>\n",
|
| 264 |
-
" <tr>\n",
|
| 265 |
-
" <th>4</th>\n",
|
| 266 |
-
" <td>0004_01</td>\n",
|
| 267 |
-
" <td>Earth</td>\n",
|
| 268 |
-
" <td>False</td>\n",
|
| 269 |
-
" <td>F/1/S</td>\n",
|
| 270 |
-
" <td>TRAPPIST-1e</td>\n",
|
| 271 |
-
" <td>16.0</td>\n",
|
| 272 |
-
" <td>False</td>\n",
|
| 273 |
-
" <td>303.0</td>\n",
|
| 274 |
-
" <td>70.0</td>\n",
|
| 275 |
-
" <td>151.0</td>\n",
|
| 276 |
-
" <td>565.0</td>\n",
|
| 277 |
-
" <td>2.0</td>\n",
|
| 278 |
-
" <td>Willy Santantines</td>\n",
|
| 279 |
-
" <td>True</td>\n",
|
| 280 |
-
" </tr>\n",
|
| 281 |
-
" </tbody>\n",
|
| 282 |
-
"</table>\n",
|
| 283 |
-
"</div>"
|
| 284 |
-
],
|
| 285 |
-
"text/plain": [
|
| 286 |
-
" PassengerId HomePlanet CryoSleep Cabin Destination Age VIP \\\n",
|
| 287 |
-
"0 0001_01 Europa False B/0/P TRAPPIST-1e 39.0 False \n",
|
| 288 |
-
"1 0002_01 Earth False F/0/S TRAPPIST-1e 24.0 False \n",
|
| 289 |
-
"2 0003_01 Europa False A/0/S TRAPPIST-1e 58.0 True \n",
|
| 290 |
-
"3 0003_02 Europa False A/0/S TRAPPIST-1e 33.0 False \n",
|
| 291 |
-
"4 0004_01 Earth False F/1/S TRAPPIST-1e 16.0 False \n",
|
| 292 |
-
"\n",
|
| 293 |
-
" RoomService FoodCourt ShoppingMall Spa VRDeck Name \\\n",
|
| 294 |
-
"0 0.0 0.0 0.0 0.0 0.0 Maham Ofracculy \n",
|
| 295 |
-
"1 109.0 9.0 25.0 549.0 44.0 Juanna Vines \n",
|
| 296 |
-
"2 43.0 3576.0 0.0 6715.0 49.0 Altark Susent \n",
|
| 297 |
-
"3 0.0 1283.0 371.0 3329.0 193.0 Solam Susent \n",
|
| 298 |
-
"4 303.0 70.0 151.0 565.0 2.0 Willy Santantines \n",
|
| 299 |
-
"\n",
|
| 300 |
-
" Transported \n",
|
| 301 |
-
"0 False \n",
|
| 302 |
-
"1 True \n",
|
| 303 |
-
"2 False \n",
|
| 304 |
-
"3 False \n",
|
| 305 |
-
"4 True "
|
| 306 |
-
]
|
| 307 |
-
},
|
| 308 |
-
"execution_count": 4,
|
| 309 |
-
"metadata": {},
|
| 310 |
-
"output_type": "execute_result"
|
| 311 |
-
}
|
| 312 |
-
],
|
| 313 |
"source": [
|
| 314 |
"# Display the first 5 examples\n",
|
| 315 |
"df.head(5)"
|
|
@@ -341,7 +177,7 @@
|
|
| 341 |
},
|
| 342 |
{
|
| 343 |
"cell_type": "code",
|
| 344 |
-
"execution_count":
|
| 345 |
"metadata": {
|
| 346 |
"execution": {
|
| 347 |
"iopub.execute_input": "2023-06-08T04:31:45.426363Z",
|
|
@@ -352,140 +188,7 @@
|
|
| 352 |
},
|
| 353 |
"id": "XjwG5wjfmnjO"
|
| 354 |
},
|
| 355 |
-
"outputs": [
|
| 356 |
-
{
|
| 357 |
-
"data": {
|
| 358 |
-
"text/html": [
|
| 359 |
-
"<div>\n",
|
| 360 |
-
"<style scoped>\n",
|
| 361 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 362 |
-
" vertical-align: middle;\n",
|
| 363 |
-
" }\n",
|
| 364 |
-
"\n",
|
| 365 |
-
" .dataframe tbody tr th {\n",
|
| 366 |
-
" vertical-align: top;\n",
|
| 367 |
-
" }\n",
|
| 368 |
-
"\n",
|
| 369 |
-
" .dataframe thead th {\n",
|
| 370 |
-
" text-align: right;\n",
|
| 371 |
-
" }\n",
|
| 372 |
-
"</style>\n",
|
| 373 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 374 |
-
" <thead>\n",
|
| 375 |
-
" <tr style=\"text-align: right;\">\n",
|
| 376 |
-
" <th></th>\n",
|
| 377 |
-
" <th>Age</th>\n",
|
| 378 |
-
" <th>RoomService</th>\n",
|
| 379 |
-
" <th>FoodCourt</th>\n",
|
| 380 |
-
" <th>ShoppingMall</th>\n",
|
| 381 |
-
" <th>Spa</th>\n",
|
| 382 |
-
" <th>VRDeck</th>\n",
|
| 383 |
-
" </tr>\n",
|
| 384 |
-
" </thead>\n",
|
| 385 |
-
" <tbody>\n",
|
| 386 |
-
" <tr>\n",
|
| 387 |
-
" <th>count</th>\n",
|
| 388 |
-
" <td>8514.000000</td>\n",
|
| 389 |
-
" <td>8512.000000</td>\n",
|
| 390 |
-
" <td>8510.000000</td>\n",
|
| 391 |
-
" <td>8485.000000</td>\n",
|
| 392 |
-
" <td>8510.000000</td>\n",
|
| 393 |
-
" <td>8505.000000</td>\n",
|
| 394 |
-
" </tr>\n",
|
| 395 |
-
" <tr>\n",
|
| 396 |
-
" <th>mean</th>\n",
|
| 397 |
-
" <td>28.827930</td>\n",
|
| 398 |
-
" <td>224.687617</td>\n",
|
| 399 |
-
" <td>458.077203</td>\n",
|
| 400 |
-
" <td>173.729169</td>\n",
|
| 401 |
-
" <td>311.138778</td>\n",
|
| 402 |
-
" <td>304.854791</td>\n",
|
| 403 |
-
" </tr>\n",
|
| 404 |
-
" <tr>\n",
|
| 405 |
-
" <th>std</th>\n",
|
| 406 |
-
" <td>14.489021</td>\n",
|
| 407 |
-
" <td>666.717663</td>\n",
|
| 408 |
-
" <td>1611.489240</td>\n",
|
| 409 |
-
" <td>604.696458</td>\n",
|
| 410 |
-
" <td>1136.705535</td>\n",
|
| 411 |
-
" <td>1145.717189</td>\n",
|
| 412 |
-
" </tr>\n",
|
| 413 |
-
" <tr>\n",
|
| 414 |
-
" <th>min</th>\n",
|
| 415 |
-
" <td>0.000000</td>\n",
|
| 416 |
-
" <td>0.000000</td>\n",
|
| 417 |
-
" <td>0.000000</td>\n",
|
| 418 |
-
" <td>0.000000</td>\n",
|
| 419 |
-
" <td>0.000000</td>\n",
|
| 420 |
-
" <td>0.000000</td>\n",
|
| 421 |
-
" </tr>\n",
|
| 422 |
-
" <tr>\n",
|
| 423 |
-
" <th>25%</th>\n",
|
| 424 |
-
" <td>19.000000</td>\n",
|
| 425 |
-
" <td>0.000000</td>\n",
|
| 426 |
-
" <td>0.000000</td>\n",
|
| 427 |
-
" <td>0.000000</td>\n",
|
| 428 |
-
" <td>0.000000</td>\n",
|
| 429 |
-
" <td>0.000000</td>\n",
|
| 430 |
-
" </tr>\n",
|
| 431 |
-
" <tr>\n",
|
| 432 |
-
" <th>50%</th>\n",
|
| 433 |
-
" <td>27.000000</td>\n",
|
| 434 |
-
" <td>0.000000</td>\n",
|
| 435 |
-
" <td>0.000000</td>\n",
|
| 436 |
-
" <td>0.000000</td>\n",
|
| 437 |
-
" <td>0.000000</td>\n",
|
| 438 |
-
" <td>0.000000</td>\n",
|
| 439 |
-
" </tr>\n",
|
| 440 |
-
" <tr>\n",
|
| 441 |
-
" <th>75%</th>\n",
|
| 442 |
-
" <td>38.000000</td>\n",
|
| 443 |
-
" <td>47.000000</td>\n",
|
| 444 |
-
" <td>76.000000</td>\n",
|
| 445 |
-
" <td>27.000000</td>\n",
|
| 446 |
-
" <td>59.000000</td>\n",
|
| 447 |
-
" <td>46.000000</td>\n",
|
| 448 |
-
" </tr>\n",
|
| 449 |
-
" <tr>\n",
|
| 450 |
-
" <th>max</th>\n",
|
| 451 |
-
" <td>79.000000</td>\n",
|
| 452 |
-
" <td>14327.000000</td>\n",
|
| 453 |
-
" <td>29813.000000</td>\n",
|
| 454 |
-
" <td>23492.000000</td>\n",
|
| 455 |
-
" <td>22408.000000</td>\n",
|
| 456 |
-
" <td>24133.000000</td>\n",
|
| 457 |
-
" </tr>\n",
|
| 458 |
-
" </tbody>\n",
|
| 459 |
-
"</table>\n",
|
| 460 |
-
"</div>"
|
| 461 |
-
],
|
| 462 |
-
"text/plain": [
|
| 463 |
-
" Age RoomService FoodCourt ShoppingMall Spa \\\n",
|
| 464 |
-
"count 8514.000000 8512.000000 8510.000000 8485.000000 8510.000000 \n",
|
| 465 |
-
"mean 28.827930 224.687617 458.077203 173.729169 311.138778 \n",
|
| 466 |
-
"std 14.489021 666.717663 1611.489240 604.696458 1136.705535 \n",
|
| 467 |
-
"min 0.000000 0.000000 0.000000 0.000000 0.000000 \n",
|
| 468 |
-
"25% 19.000000 0.000000 0.000000 0.000000 0.000000 \n",
|
| 469 |
-
"50% 27.000000 0.000000 0.000000 0.000000 0.000000 \n",
|
| 470 |
-
"75% 38.000000 47.000000 76.000000 27.000000 59.000000 \n",
|
| 471 |
-
"max 79.000000 14327.000000 29813.000000 23492.000000 22408.000000 \n",
|
| 472 |
-
"\n",
|
| 473 |
-
" VRDeck \n",
|
| 474 |
-
"count 8505.000000 \n",
|
| 475 |
-
"mean 304.854791 \n",
|
| 476 |
-
"std 1145.717189 \n",
|
| 477 |
-
"min 0.000000 \n",
|
| 478 |
-
"25% 0.000000 \n",
|
| 479 |
-
"50% 0.000000 \n",
|
| 480 |
-
"75% 46.000000 \n",
|
| 481 |
-
"max 24133.000000 "
|
| 482 |
-
]
|
| 483 |
-
},
|
| 484 |
-
"execution_count": 5,
|
| 485 |
-
"metadata": {},
|
| 486 |
-
"output_type": "execute_result"
|
| 487 |
-
}
|
| 488 |
-
],
|
| 489 |
"source": [
|
| 490 |
"df.describe()"
|
| 491 |
]
|
|
@@ -502,7 +205,7 @@
|
|
| 502 |
},
|
| 503 |
{
|
| 504 |
"cell_type": "code",
|
| 505 |
-
"execution_count":
|
| 506 |
"metadata": {
|
| 507 |
"execution": {
|
| 508 |
"iopub.execute_input": "2023-06-08T04:31:45.482430Z",
|
|
@@ -512,28 +215,7 @@
|
|
| 512 |
"shell.execute_reply.started": "2023-06-08T04:31:45.482386Z"
|
| 513 |
}
|
| 514 |
},
|
| 515 |
-
"outputs": [
|
| 516 |
-
{
|
| 517 |
-
"name": "stdout",
|
| 518 |
-
"output_type": "stream",
|
| 519 |
-
"text": [
|
| 520 |
-
"Total de valores nulos de PassengerId = 0 equivale al 0.00% del total de la columna.\n",
|
| 521 |
-
"Total de valores nulos de HomePlanet = 201 equivale al 2.31% del total de la columna.\n",
|
| 522 |
-
"Total de valores nulos de CryoSleep = 217 equivale al 2.50% del total de la columna.\n",
|
| 523 |
-
"Total de valores nulos de Cabin = 199 equivale al 2.29% del total de la columna.\n",
|
| 524 |
-
"Total de valores nulos de Destination = 182 equivale al 2.09% del total de la columna.\n",
|
| 525 |
-
"Total de valores nulos de Age = 179 equivale al 2.06% del total de la columna.\n",
|
| 526 |
-
"Total de valores nulos de VIP = 203 equivale al 2.34% del total de la columna.\n",
|
| 527 |
-
"Total de valores nulos de RoomService = 181 equivale al 2.08% del total de la columna.\n",
|
| 528 |
-
"Total de valores nulos de FoodCourt = 183 equivale al 2.11% del total de la columna.\n",
|
| 529 |
-
"Total de valores nulos de ShoppingMall = 208 equivale al 2.39% del total de la columna.\n",
|
| 530 |
-
"Total de valores nulos de Spa = 183 equivale al 2.11% del total de la columna.\n",
|
| 531 |
-
"Total de valores nulos de VRDeck = 188 equivale al 2.16% del total de la columna.\n",
|
| 532 |
-
"Total de valores nulos de Name = 200 equivale al 2.30% del total de la columna.\n",
|
| 533 |
-
"Total de valores nulos de Transported = 0 equivale al 0.00% del total de la columna.\n"
|
| 534 |
-
]
|
| 535 |
-
}
|
| 536 |
-
],
|
| 537 |
"source": [
|
| 538 |
"for feature in df.columns:\n",
|
| 539 |
" x = df[feature].isna().sum()\n",
|
|
@@ -542,7 +224,7 @@
|
|
| 542 |
},
|
| 543 |
{
|
| 544 |
"cell_type": "code",
|
| 545 |
-
"execution_count":
|
| 546 |
"metadata": {
|
| 547 |
"execution": {
|
| 548 |
"iopub.execute_input": "2023-06-08T04:31:45.504577Z",
|
|
@@ -553,35 +235,7 @@
|
|
| 553 |
},
|
| 554 |
"id": "UmWpnVxQmnjO"
|
| 555 |
},
|
| 556 |
-
"outputs": [
|
| 557 |
-
{
|
| 558 |
-
"name": "stdout",
|
| 559 |
-
"output_type": "stream",
|
| 560 |
-
"text": [
|
| 561 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 562 |
-
"RangeIndex: 8693 entries, 0 to 8692\n",
|
| 563 |
-
"Data columns (total 14 columns):\n",
|
| 564 |
-
" # Column Non-Null Count Dtype \n",
|
| 565 |
-
"--- ------ -------------- ----- \n",
|
| 566 |
-
" 0 PassengerId 8693 non-null object \n",
|
| 567 |
-
" 1 HomePlanet 8492 non-null object \n",
|
| 568 |
-
" 2 CryoSleep 8476 non-null object \n",
|
| 569 |
-
" 3 Cabin 8494 non-null object \n",
|
| 570 |
-
" 4 Destination 8511 non-null object \n",
|
| 571 |
-
" 5 Age 8514 non-null float64\n",
|
| 572 |
-
" 6 VIP 8490 non-null object \n",
|
| 573 |
-
" 7 RoomService 8512 non-null float64\n",
|
| 574 |
-
" 8 FoodCourt 8510 non-null float64\n",
|
| 575 |
-
" 9 ShoppingMall 8485 non-null float64\n",
|
| 576 |
-
" 10 Spa 8510 non-null float64\n",
|
| 577 |
-
" 11 VRDeck 8505 non-null float64\n",
|
| 578 |
-
" 12 Name 8493 non-null object \n",
|
| 579 |
-
" 13 Transported 8693 non-null bool \n",
|
| 580 |
-
"dtypes: bool(1), float64(6), object(7)\n",
|
| 581 |
-
"memory usage: 891.5+ KB\n"
|
| 582 |
-
]
|
| 583 |
-
}
|
| 584 |
-
],
|
| 585 |
"source": [
|
| 586 |
"df.info()"
|
| 587 |
]
|
|
@@ -879,7 +533,7 @@
|
|
| 879 |
},
|
| 880 |
{
|
| 881 |
"cell_type": "code",
|
| 882 |
-
"execution_count":
|
| 883 |
"metadata": {
|
| 884 |
"execution": {
|
| 885 |
"iopub.execute_input": "2023-06-08T04:31:47.665505Z",
|
|
@@ -1021,7 +675,7 @@
|
|
| 1021 |
"4 70.0 151.0 565.0 2.0 True "
|
| 1022 |
]
|
| 1023 |
},
|
| 1024 |
-
"execution_count":
|
| 1025 |
"metadata": {},
|
| 1026 |
"output_type": "execute_result"
|
| 1027 |
}
|
|
@@ -1040,7 +694,7 @@
|
|
| 1040 |
},
|
| 1041 |
{
|
| 1042 |
"cell_type": "code",
|
| 1043 |
-
"execution_count":
|
| 1044 |
"metadata": {
|
| 1045 |
"execution": {
|
| 1046 |
"iopub.execute_input": "2023-06-08T04:31:47.695912Z",
|
|
@@ -1069,7 +723,7 @@
|
|
| 1069 |
"dtype: int64"
|
| 1070 |
]
|
| 1071 |
},
|
| 1072 |
-
"execution_count":
|
| 1073 |
"metadata": {},
|
| 1074 |
"output_type": "execute_result"
|
| 1075 |
}
|
|
@@ -1081,7 +735,7 @@
|
|
| 1081 |
},
|
| 1082 |
{
|
| 1083 |
"cell_type": "code",
|
| 1084 |
-
"execution_count":
|
| 1085 |
"metadata": {
|
| 1086 |
"execution": {
|
| 1087 |
"iopub.execute_input": "2023-06-08T04:31:47.715118Z",
|
|
@@ -1091,20 +745,7 @@
|
|
| 1091 |
"shell.execute_reply.started": "2023-06-08T04:31:47.715064Z"
|
| 1092 |
}
|
| 1093 |
},
|
| 1094 |
-
"outputs": [
|
| 1095 |
-
{
|
| 1096 |
-
"name": "stdout",
|
| 1097 |
-
"output_type": "stream",
|
| 1098 |
-
"text": [
|
| 1099 |
-
"Columna HomePlanet - ['Europa' 'Earth' 'Mars' nan]\n",
|
| 1100 |
-
"Columna Cabin - ['B/0/P' 'F/0/S' 'A/0/S' ... 'G/1499/S' 'G/1500/S' 'E/608/S']\n",
|
| 1101 |
-
"Columna Destination - ['TRAPPIST-1e' 'PSO J318.5-22' '55 Cancri e' nan]\n",
|
| 1102 |
-
"Columna CryoSleep - [False True nan]\n",
|
| 1103 |
-
"Columna VIP - [False True nan]\n",
|
| 1104 |
-
"Columna Transported - [False True]\n"
|
| 1105 |
-
]
|
| 1106 |
-
}
|
| 1107 |
-
],
|
| 1108 |
"source": [
|
| 1109 |
"for column in ('HomePlanet', 'Cabin', 'Destination','CryoSleep','VIP','Transported'):\n",
|
| 1110 |
" print(\"Columna\",column,\"-\" , df[column].unique())"
|
|
@@ -1119,7 +760,7 @@
|
|
| 1119 |
},
|
| 1120 |
{
|
| 1121 |
"cell_type": "code",
|
| 1122 |
-
"execution_count":
|
| 1123 |
"metadata": {
|
| 1124 |
"execution": {
|
| 1125 |
"iopub.execute_input": "2023-06-08T04:31:47.730956Z",
|
|
@@ -1181,7 +822,7 @@
|
|
| 1181 |
},
|
| 1182 |
{
|
| 1183 |
"cell_type": "code",
|
| 1184 |
-
"execution_count":
|
| 1185 |
"metadata": {
|
| 1186 |
"execution": {
|
| 1187 |
"iopub.execute_input": "2023-06-08T04:31:47.971942Z",
|
|
@@ -1191,37 +832,14 @@
|
|
| 1191 |
"shell.execute_reply.started": "2023-06-08T04:31:47.971909Z"
|
| 1192 |
}
|
| 1193 |
},
|
| 1194 |
-
"outputs": [
|
| 1195 |
-
{
|
| 1196 |
-
"data": {
|
| 1197 |
-
"text/plain": [
|
| 1198 |
-
"HomePlanet int64\n",
|
| 1199 |
-
"CryoSleep int64\n",
|
| 1200 |
-
"Cabin int64\n",
|
| 1201 |
-
"Destination int64\n",
|
| 1202 |
-
"Age float64\n",
|
| 1203 |
-
"VIP int64\n",
|
| 1204 |
-
"RoomService float64\n",
|
| 1205 |
-
"FoodCourt float64\n",
|
| 1206 |
-
"ShoppingMall float64\n",
|
| 1207 |
-
"Spa float64\n",
|
| 1208 |
-
"VRDeck float64\n",
|
| 1209 |
-
"Transported int64\n",
|
| 1210 |
-
"dtype: object"
|
| 1211 |
-
]
|
| 1212 |
-
},
|
| 1213 |
-
"execution_count": 12,
|
| 1214 |
-
"metadata": {},
|
| 1215 |
-
"output_type": "execute_result"
|
| 1216 |
-
}
|
| 1217 |
-
],
|
| 1218 |
"source": [
|
| 1219 |
"df.dtypes"
|
| 1220 |
]
|
| 1221 |
},
|
| 1222 |
{
|
| 1223 |
"cell_type": "code",
|
| 1224 |
-
"execution_count":
|
| 1225 |
"metadata": {
|
| 1226 |
"execution": {
|
| 1227 |
"iopub.execute_input": "2023-06-08T04:31:47.983075Z",
|
|
@@ -1250,7 +868,7 @@
|
|
| 1250 |
"dtype: object"
|
| 1251 |
]
|
| 1252 |
},
|
| 1253 |
-
"execution_count":
|
| 1254 |
"metadata": {},
|
| 1255 |
"output_type": "execute_result"
|
| 1256 |
}
|
|
@@ -1610,7 +1228,7 @@
|
|
| 1610 |
},
|
| 1611 |
{
|
| 1612 |
"cell_type": "code",
|
| 1613 |
-
"execution_count":
|
| 1614 |
"metadata": {
|
| 1615 |
"execution": {
|
| 1616 |
"iopub.execute_input": "2023-06-08T04:58:12.183623Z",
|
|
@@ -1628,7 +1246,7 @@
|
|
| 1628 |
"traceback": [
|
| 1629 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1630 |
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
|
| 1631 |
-
"\u001b[0;32m<ipython-input-
|
| 1632 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 5364\u001b[0m \u001b[0;31m# GH#44051 exclude bool, which would return a 2d ndarray\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5365\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcast_scalar_indexer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 5366\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mgetitem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5367\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5368\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mslice\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1633 |
"\u001b[0;31mIndexError\u001b[0m: index 6 is out of bounds for axis 0 with size 6"
|
| 1634 |
]
|
|
|
|
| 69 |
},
|
| 70 |
{
|
| 71 |
"cell_type": "code",
|
| 72 |
+
"execution_count": null,
|
| 73 |
"metadata": {
|
| 74 |
"execution": {
|
| 75 |
"iopub.execute_input": "2023-06-08T04:31:45.299138Z",
|
|
|
|
| 80 |
},
|
| 81 |
"id": "grAO86gTmnjJ"
|
| 82 |
},
|
| 83 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
"source": [
|
| 85 |
"print(\"TensorFlow v\" + tf.__version__)\n",
|
| 86 |
"print(\"TensorFlow Decision Forests v\" + tfdf.__version__)"
|
|
|
|
| 97 |
},
|
| 98 |
{
|
| 99 |
"cell_type": "code",
|
| 100 |
+
"execution_count": 2,
|
| 101 |
"metadata": {
|
| 102 |
"execution": {
|
| 103 |
"iopub.execute_input": "2023-06-08T04:31:45.313150Z",
|
|
|
|
| 134 |
},
|
| 135 |
{
|
| 136 |
"cell_type": "code",
|
| 137 |
+
"execution_count": null,
|
| 138 |
"metadata": {
|
| 139 |
"execution": {
|
| 140 |
"iopub.execute_input": "2023-06-08T04:31:45.382127Z",
|
|
|
|
| 145 |
},
|
| 146 |
"id": "nCx3PE1xmnjM"
|
| 147 |
},
|
| 148 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
"source": [
|
| 150 |
"# Display the first 5 examples\n",
|
| 151 |
"df.head(5)"
|
|
|
|
| 177 |
},
|
| 178 |
{
|
| 179 |
"cell_type": "code",
|
| 180 |
+
"execution_count": null,
|
| 181 |
"metadata": {
|
| 182 |
"execution": {
|
| 183 |
"iopub.execute_input": "2023-06-08T04:31:45.426363Z",
|
|
|
|
| 188 |
},
|
| 189 |
"id": "XjwG5wjfmnjO"
|
| 190 |
},
|
| 191 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
"source": [
|
| 193 |
"df.describe()"
|
| 194 |
]
|
|
|
|
| 205 |
},
|
| 206 |
{
|
| 207 |
"cell_type": "code",
|
| 208 |
+
"execution_count": null,
|
| 209 |
"metadata": {
|
| 210 |
"execution": {
|
| 211 |
"iopub.execute_input": "2023-06-08T04:31:45.482430Z",
|
|
|
|
| 215 |
"shell.execute_reply.started": "2023-06-08T04:31:45.482386Z"
|
| 216 |
}
|
| 217 |
},
|
| 218 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
"source": [
|
| 220 |
"for feature in df.columns:\n",
|
| 221 |
" x = df[feature].isna().sum()\n",
|
|
|
|
| 224 |
},
|
| 225 |
{
|
| 226 |
"cell_type": "code",
|
| 227 |
+
"execution_count": null,
|
| 228 |
"metadata": {
|
| 229 |
"execution": {
|
| 230 |
"iopub.execute_input": "2023-06-08T04:31:45.504577Z",
|
|
|
|
| 235 |
},
|
| 236 |
"id": "UmWpnVxQmnjO"
|
| 237 |
},
|
| 238 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
"source": [
|
| 240 |
"df.info()"
|
| 241 |
]
|
|
|
|
| 533 |
},
|
| 534 |
{
|
| 535 |
"cell_type": "code",
|
| 536 |
+
"execution_count": 3,
|
| 537 |
"metadata": {
|
| 538 |
"execution": {
|
| 539 |
"iopub.execute_input": "2023-06-08T04:31:47.665505Z",
|
|
|
|
| 675 |
"4 70.0 151.0 565.0 2.0 True "
|
| 676 |
]
|
| 677 |
},
|
| 678 |
+
"execution_count": 3,
|
| 679 |
"metadata": {},
|
| 680 |
"output_type": "execute_result"
|
| 681 |
}
|
|
|
|
| 694 |
},
|
| 695 |
{
|
| 696 |
"cell_type": "code",
|
| 697 |
+
"execution_count": 4,
|
| 698 |
"metadata": {
|
| 699 |
"execution": {
|
| 700 |
"iopub.execute_input": "2023-06-08T04:31:47.695912Z",
|
|
|
|
| 723 |
"dtype: int64"
|
| 724 |
]
|
| 725 |
},
|
| 726 |
+
"execution_count": 4,
|
| 727 |
"metadata": {},
|
| 728 |
"output_type": "execute_result"
|
| 729 |
}
|
|
|
|
| 735 |
},
|
| 736 |
{
|
| 737 |
"cell_type": "code",
|
| 738 |
+
"execution_count": null,
|
| 739 |
"metadata": {
|
| 740 |
"execution": {
|
| 741 |
"iopub.execute_input": "2023-06-08T04:31:47.715118Z",
|
|
|
|
| 745 |
"shell.execute_reply.started": "2023-06-08T04:31:47.715064Z"
|
| 746 |
}
|
| 747 |
},
|
| 748 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 749 |
"source": [
|
| 750 |
"for column in ('HomePlanet', 'Cabin', 'Destination','CryoSleep','VIP','Transported'):\n",
|
| 751 |
" print(\"Columna\",column,\"-\" , df[column].unique())"
|
|
|
|
| 760 |
},
|
| 761 |
{
|
| 762 |
"cell_type": "code",
|
| 763 |
+
"execution_count": 5,
|
| 764 |
"metadata": {
|
| 765 |
"execution": {
|
| 766 |
"iopub.execute_input": "2023-06-08T04:31:47.730956Z",
|
|
|
|
| 822 |
},
|
| 823 |
{
|
| 824 |
"cell_type": "code",
|
| 825 |
+
"execution_count": null,
|
| 826 |
"metadata": {
|
| 827 |
"execution": {
|
| 828 |
"iopub.execute_input": "2023-06-08T04:31:47.971942Z",
|
|
|
|
| 832 |
"shell.execute_reply.started": "2023-06-08T04:31:47.971909Z"
|
| 833 |
}
|
| 834 |
},
|
| 835 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 836 |
"source": [
|
| 837 |
"df.dtypes"
|
| 838 |
]
|
| 839 |
},
|
| 840 |
{
|
| 841 |
"cell_type": "code",
|
| 842 |
+
"execution_count": 6,
|
| 843 |
"metadata": {
|
| 844 |
"execution": {
|
| 845 |
"iopub.execute_input": "2023-06-08T04:31:47.983075Z",
|
|
|
|
| 868 |
"dtype: object"
|
| 869 |
]
|
| 870 |
},
|
| 871 |
+
"execution_count": 6,
|
| 872 |
"metadata": {},
|
| 873 |
"output_type": "execute_result"
|
| 874 |
}
|
|
|
|
| 1228 |
},
|
| 1229 |
{
|
| 1230 |
"cell_type": "code",
|
| 1231 |
+
"execution_count": 7,
|
| 1232 |
"metadata": {
|
| 1233 |
"execution": {
|
| 1234 |
"iopub.execute_input": "2023-06-08T04:58:12.183623Z",
|
|
|
|
| 1246 |
"traceback": [
|
| 1247 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1248 |
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
|
| 1249 |
+
"\u001b[0;32m<ipython-input-7-6b78e3830b05>\u001b[0m in \u001b[0;36m<cell line: 12>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[0mn\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mi\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mcol\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mn\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnombres_col\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 16\u001b[0;31m \u001b[0maxs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_title\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnombres_col\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mn\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 17\u001b[0m \u001b[0maxs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mj\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mscatter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mnombres_col\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mn\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0mN\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0mN\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1250 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 5364\u001b[0m \u001b[0;31m# GH#44051 exclude bool, which would return a 2d ndarray\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5365\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcast_scalar_indexer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 5366\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mgetitem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5367\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5368\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mslice\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1251 |
"\u001b[0;31mIndexError\u001b[0m: index 6 is out of bounds for axis 0 with size 6"
|
| 1252 |
]
|
benchmark/pandas_15/pandas_15_fixed.ipynb
CHANGED
|
@@ -51,7 +51,7 @@
|
|
| 51 |
},
|
| 52 |
{
|
| 53 |
"cell_type": "code",
|
| 54 |
-
"execution_count":
|
| 55 |
"id": "3879efdb",
|
| 56 |
"metadata": {
|
| 57 |
"execution": {
|
|
@@ -62,207 +62,7 @@
|
|
| 62 |
"shell.execute_reply.started": "2023-06-11T14:19:34.854293Z"
|
| 63 |
}
|
| 64 |
},
|
| 65 |
-
"outputs": [
|
| 66 |
-
{
|
| 67 |
-
"data": {
|
| 68 |
-
"text/html": [
|
| 69 |
-
"<div>\n",
|
| 70 |
-
"<style scoped>\n",
|
| 71 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 72 |
-
" vertical-align: middle;\n",
|
| 73 |
-
" }\n",
|
| 74 |
-
"\n",
|
| 75 |
-
" .dataframe tbody tr th {\n",
|
| 76 |
-
" vertical-align: top;\n",
|
| 77 |
-
" }\n",
|
| 78 |
-
"\n",
|
| 79 |
-
" .dataframe thead th {\n",
|
| 80 |
-
" text-align: right;\n",
|
| 81 |
-
" }\n",
|
| 82 |
-
"</style>\n",
|
| 83 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 84 |
-
" <thead>\n",
|
| 85 |
-
" <tr style=\"text-align: right;\">\n",
|
| 86 |
-
" <th></th>\n",
|
| 87 |
-
" <th>Id</th>\n",
|
| 88 |
-
" <th>MSSubClass</th>\n",
|
| 89 |
-
" <th>MSZoning</th>\n",
|
| 90 |
-
" <th>LotFrontage</th>\n",
|
| 91 |
-
" <th>LotArea</th>\n",
|
| 92 |
-
" <th>Street</th>\n",
|
| 93 |
-
" <th>Alley</th>\n",
|
| 94 |
-
" <th>LotShape</th>\n",
|
| 95 |
-
" <th>LandContour</th>\n",
|
| 96 |
-
" <th>Utilities</th>\n",
|
| 97 |
-
" <th>...</th>\n",
|
| 98 |
-
" <th>PoolArea</th>\n",
|
| 99 |
-
" <th>PoolQC</th>\n",
|
| 100 |
-
" <th>Fence</th>\n",
|
| 101 |
-
" <th>MiscFeature</th>\n",
|
| 102 |
-
" <th>MiscVal</th>\n",
|
| 103 |
-
" <th>MoSold</th>\n",
|
| 104 |
-
" <th>YrSold</th>\n",
|
| 105 |
-
" <th>SaleType</th>\n",
|
| 106 |
-
" <th>SaleCondition</th>\n",
|
| 107 |
-
" <th>SalePrice</th>\n",
|
| 108 |
-
" </tr>\n",
|
| 109 |
-
" </thead>\n",
|
| 110 |
-
" <tbody>\n",
|
| 111 |
-
" <tr>\n",
|
| 112 |
-
" <th>0</th>\n",
|
| 113 |
-
" <td>1</td>\n",
|
| 114 |
-
" <td>60</td>\n",
|
| 115 |
-
" <td>RL</td>\n",
|
| 116 |
-
" <td>65.0</td>\n",
|
| 117 |
-
" <td>8450</td>\n",
|
| 118 |
-
" <td>Pave</td>\n",
|
| 119 |
-
" <td>NaN</td>\n",
|
| 120 |
-
" <td>Reg</td>\n",
|
| 121 |
-
" <td>Lvl</td>\n",
|
| 122 |
-
" <td>AllPub</td>\n",
|
| 123 |
-
" <td>...</td>\n",
|
| 124 |
-
" <td>0</td>\n",
|
| 125 |
-
" <td>NaN</td>\n",
|
| 126 |
-
" <td>NaN</td>\n",
|
| 127 |
-
" <td>NaN</td>\n",
|
| 128 |
-
" <td>0</td>\n",
|
| 129 |
-
" <td>2</td>\n",
|
| 130 |
-
" <td>2008</td>\n",
|
| 131 |
-
" <td>WD</td>\n",
|
| 132 |
-
" <td>Normal</td>\n",
|
| 133 |
-
" <td>208500</td>\n",
|
| 134 |
-
" </tr>\n",
|
| 135 |
-
" <tr>\n",
|
| 136 |
-
" <th>1</th>\n",
|
| 137 |
-
" <td>2</td>\n",
|
| 138 |
-
" <td>20</td>\n",
|
| 139 |
-
" <td>RL</td>\n",
|
| 140 |
-
" <td>80.0</td>\n",
|
| 141 |
-
" <td>9600</td>\n",
|
| 142 |
-
" <td>Pave</td>\n",
|
| 143 |
-
" <td>NaN</td>\n",
|
| 144 |
-
" <td>Reg</td>\n",
|
| 145 |
-
" <td>Lvl</td>\n",
|
| 146 |
-
" <td>AllPub</td>\n",
|
| 147 |
-
" <td>...</td>\n",
|
| 148 |
-
" <td>0</td>\n",
|
| 149 |
-
" <td>NaN</td>\n",
|
| 150 |
-
" <td>NaN</td>\n",
|
| 151 |
-
" <td>NaN</td>\n",
|
| 152 |
-
" <td>0</td>\n",
|
| 153 |
-
" <td>5</td>\n",
|
| 154 |
-
" <td>2007</td>\n",
|
| 155 |
-
" <td>WD</td>\n",
|
| 156 |
-
" <td>Normal</td>\n",
|
| 157 |
-
" <td>181500</td>\n",
|
| 158 |
-
" </tr>\n",
|
| 159 |
-
" <tr>\n",
|
| 160 |
-
" <th>2</th>\n",
|
| 161 |
-
" <td>3</td>\n",
|
| 162 |
-
" <td>60</td>\n",
|
| 163 |
-
" <td>RL</td>\n",
|
| 164 |
-
" <td>68.0</td>\n",
|
| 165 |
-
" <td>11250</td>\n",
|
| 166 |
-
" <td>Pave</td>\n",
|
| 167 |
-
" <td>NaN</td>\n",
|
| 168 |
-
" <td>IR1</td>\n",
|
| 169 |
-
" <td>Lvl</td>\n",
|
| 170 |
-
" <td>AllPub</td>\n",
|
| 171 |
-
" <td>...</td>\n",
|
| 172 |
-
" <td>0</td>\n",
|
| 173 |
-
" <td>NaN</td>\n",
|
| 174 |
-
" <td>NaN</td>\n",
|
| 175 |
-
" <td>NaN</td>\n",
|
| 176 |
-
" <td>0</td>\n",
|
| 177 |
-
" <td>9</td>\n",
|
| 178 |
-
" <td>2008</td>\n",
|
| 179 |
-
" <td>WD</td>\n",
|
| 180 |
-
" <td>Normal</td>\n",
|
| 181 |
-
" <td>223500</td>\n",
|
| 182 |
-
" </tr>\n",
|
| 183 |
-
" <tr>\n",
|
| 184 |
-
" <th>3</th>\n",
|
| 185 |
-
" <td>4</td>\n",
|
| 186 |
-
" <td>70</td>\n",
|
| 187 |
-
" <td>RL</td>\n",
|
| 188 |
-
" <td>60.0</td>\n",
|
| 189 |
-
" <td>9550</td>\n",
|
| 190 |
-
" <td>Pave</td>\n",
|
| 191 |
-
" <td>NaN</td>\n",
|
| 192 |
-
" <td>IR1</td>\n",
|
| 193 |
-
" <td>Lvl</td>\n",
|
| 194 |
-
" <td>AllPub</td>\n",
|
| 195 |
-
" <td>...</td>\n",
|
| 196 |
-
" <td>0</td>\n",
|
| 197 |
-
" <td>NaN</td>\n",
|
| 198 |
-
" <td>NaN</td>\n",
|
| 199 |
-
" <td>NaN</td>\n",
|
| 200 |
-
" <td>0</td>\n",
|
| 201 |
-
" <td>2</td>\n",
|
| 202 |
-
" <td>2006</td>\n",
|
| 203 |
-
" <td>WD</td>\n",
|
| 204 |
-
" <td>Abnorml</td>\n",
|
| 205 |
-
" <td>140000</td>\n",
|
| 206 |
-
" </tr>\n",
|
| 207 |
-
" <tr>\n",
|
| 208 |
-
" <th>4</th>\n",
|
| 209 |
-
" <td>5</td>\n",
|
| 210 |
-
" <td>60</td>\n",
|
| 211 |
-
" <td>RL</td>\n",
|
| 212 |
-
" <td>84.0</td>\n",
|
| 213 |
-
" <td>14260</td>\n",
|
| 214 |
-
" <td>Pave</td>\n",
|
| 215 |
-
" <td>NaN</td>\n",
|
| 216 |
-
" <td>IR1</td>\n",
|
| 217 |
-
" <td>Lvl</td>\n",
|
| 218 |
-
" <td>AllPub</td>\n",
|
| 219 |
-
" <td>...</td>\n",
|
| 220 |
-
" <td>0</td>\n",
|
| 221 |
-
" <td>NaN</td>\n",
|
| 222 |
-
" <td>NaN</td>\n",
|
| 223 |
-
" <td>NaN</td>\n",
|
| 224 |
-
" <td>0</td>\n",
|
| 225 |
-
" <td>12</td>\n",
|
| 226 |
-
" <td>2008</td>\n",
|
| 227 |
-
" <td>WD</td>\n",
|
| 228 |
-
" <td>Normal</td>\n",
|
| 229 |
-
" <td>250000</td>\n",
|
| 230 |
-
" </tr>\n",
|
| 231 |
-
" </tbody>\n",
|
| 232 |
-
"</table>\n",
|
| 233 |
-
"<p>5 rows × 81 columns</p>\n",
|
| 234 |
-
"</div>"
|
| 235 |
-
],
|
| 236 |
-
"text/plain": [
|
| 237 |
-
" Id MSSubClass MSZoning LotFrontage LotArea Street Alley LotShape \\\n",
|
| 238 |
-
"0 1 60 RL 65.0 8450 Pave NaN Reg \n",
|
| 239 |
-
"1 2 20 RL 80.0 9600 Pave NaN Reg \n",
|
| 240 |
-
"2 3 60 RL 68.0 11250 Pave NaN IR1 \n",
|
| 241 |
-
"3 4 70 RL 60.0 9550 Pave NaN IR1 \n",
|
| 242 |
-
"4 5 60 RL 84.0 14260 Pave NaN IR1 \n",
|
| 243 |
-
"\n",
|
| 244 |
-
" LandContour Utilities ... PoolArea PoolQC Fence MiscFeature MiscVal MoSold \\\n",
|
| 245 |
-
"0 Lvl AllPub ... 0 NaN NaN NaN 0 2 \n",
|
| 246 |
-
"1 Lvl AllPub ... 0 NaN NaN NaN 0 5 \n",
|
| 247 |
-
"2 Lvl AllPub ... 0 NaN NaN NaN 0 9 \n",
|
| 248 |
-
"3 Lvl AllPub ... 0 NaN NaN NaN 0 2 \n",
|
| 249 |
-
"4 Lvl AllPub ... 0 NaN NaN NaN 0 12 \n",
|
| 250 |
-
"\n",
|
| 251 |
-
" YrSold SaleType SaleCondition SalePrice \n",
|
| 252 |
-
"0 2008 WD Normal 208500 \n",
|
| 253 |
-
"1 2007 WD Normal 181500 \n",
|
| 254 |
-
"2 2008 WD Normal 223500 \n",
|
| 255 |
-
"3 2006 WD Abnorml 140000 \n",
|
| 256 |
-
"4 2008 WD Normal 250000 \n",
|
| 257 |
-
"\n",
|
| 258 |
-
"[5 rows x 81 columns]"
|
| 259 |
-
]
|
| 260 |
-
},
|
| 261 |
-
"execution_count": 3,
|
| 262 |
-
"metadata": {},
|
| 263 |
-
"output_type": "execute_result"
|
| 264 |
-
}
|
| 265 |
-
],
|
| 266 |
"source": [
|
| 267 |
"train.head()"
|
| 268 |
]
|
|
@@ -818,7 +618,7 @@
|
|
| 818 |
},
|
| 819 |
{
|
| 820 |
"cell_type": "code",
|
| 821 |
-
"execution_count":
|
| 822 |
"id": "9116a799",
|
| 823 |
"metadata": {
|
| 824 |
"execution": {
|
|
@@ -829,25 +629,14 @@
|
|
| 829 |
"shell.execute_reply.started": "2023-06-11T14:20:06.472701Z"
|
| 830 |
}
|
| 831 |
},
|
| 832 |
-
"outputs": [
|
| 833 |
-
{
|
| 834 |
-
"data": {
|
| 835 |
-
"text/plain": [
|
| 836 |
-
"(1460, 81)"
|
| 837 |
-
]
|
| 838 |
-
},
|
| 839 |
-
"execution_count": 4,
|
| 840 |
-
"metadata": {},
|
| 841 |
-
"output_type": "execute_result"
|
| 842 |
-
}
|
| 843 |
-
],
|
| 844 |
"source": [
|
| 845 |
"train.shape"
|
| 846 |
]
|
| 847 |
},
|
| 848 |
{
|
| 849 |
"cell_type": "code",
|
| 850 |
-
"execution_count":
|
| 851 |
"id": "f23afceb",
|
| 852 |
"metadata": {
|
| 853 |
"execution": {
|
|
@@ -858,25 +647,14 @@
|
|
| 858 |
"shell.execute_reply.started": "2023-06-11T14:20:07.457995Z"
|
| 859 |
}
|
| 860 |
},
|
| 861 |
-
"outputs": [
|
| 862 |
-
{
|
| 863 |
-
"data": {
|
| 864 |
-
"text/plain": [
|
| 865 |
-
"(1459, 80)"
|
| 866 |
-
]
|
| 867 |
-
},
|
| 868 |
-
"execution_count": 5,
|
| 869 |
-
"metadata": {},
|
| 870 |
-
"output_type": "execute_result"
|
| 871 |
-
}
|
| 872 |
-
],
|
| 873 |
"source": [
|
| 874 |
"test.shape"
|
| 875 |
]
|
| 876 |
},
|
| 877 |
{
|
| 878 |
"cell_type": "code",
|
| 879 |
-
"execution_count":
|
| 880 |
"id": "f9409852",
|
| 881 |
"metadata": {
|
| 882 |
"execution": {
|
|
@@ -887,25 +665,14 @@
|
|
| 887 |
"shell.execute_reply.started": "2023-06-11T14:20:07.909893Z"
|
| 888 |
}
|
| 889 |
},
|
| 890 |
-
"outputs": [
|
| 891 |
-
{
|
| 892 |
-
"data": {
|
| 893 |
-
"text/plain": [
|
| 894 |
-
"(1459, 2)"
|
| 895 |
-
]
|
| 896 |
-
},
|
| 897 |
-
"execution_count": 6,
|
| 898 |
-
"metadata": {},
|
| 899 |
-
"output_type": "execute_result"
|
| 900 |
-
}
|
| 901 |
-
],
|
| 902 |
"source": [
|
| 903 |
"submission.shape"
|
| 904 |
]
|
| 905 |
},
|
| 906 |
{
|
| 907 |
"cell_type": "code",
|
| 908 |
-
"execution_count":
|
| 909 |
"id": "0eda05c7",
|
| 910 |
"metadata": {
|
| 911 |
"execution": {
|
|
@@ -917,98 +684,7 @@
|
|
| 917 |
},
|
| 918 |
"scrolled": true
|
| 919 |
},
|
| 920 |
-
"outputs": [
|
| 921 |
-
{
|
| 922 |
-
"data": {
|
| 923 |
-
"text/plain": [
|
| 924 |
-
"[0.0,\n",
|
| 925 |
-
" 0.0,\n",
|
| 926 |
-
" 0.0,\n",
|
| 927 |
-
" 17.73972602739726,\n",
|
| 928 |
-
" 0.0,\n",
|
| 929 |
-
" 0.0,\n",
|
| 930 |
-
" 93.76712328767123,\n",
|
| 931 |
-
" 0.0,\n",
|
| 932 |
-
" 0.0,\n",
|
| 933 |
-
" 0.0,\n",
|
| 934 |
-
" 0.0,\n",
|
| 935 |
-
" 0.0,\n",
|
| 936 |
-
" 0.0,\n",
|
| 937 |
-
" 0.0,\n",
|
| 938 |
-
" 0.0,\n",
|
| 939 |
-
" 0.0,\n",
|
| 940 |
-
" 0.0,\n",
|
| 941 |
-
" 0.0,\n",
|
| 942 |
-
" 0.0,\n",
|
| 943 |
-
" 0.0,\n",
|
| 944 |
-
" 0.0,\n",
|
| 945 |
-
" 0.0,\n",
|
| 946 |
-
" 0.0,\n",
|
| 947 |
-
" 0.0,\n",
|
| 948 |
-
" 0.0,\n",
|
| 949 |
-
" 59.726027397260275,\n",
|
| 950 |
-
" 0.547945205479452,\n",
|
| 951 |
-
" 0.0,\n",
|
| 952 |
-
" 0.0,\n",
|
| 953 |
-
" 0.0,\n",
|
| 954 |
-
" 2.5342465753424657,\n",
|
| 955 |
-
" 2.5342465753424657,\n",
|
| 956 |
-
" 2.6027397260273974,\n",
|
| 957 |
-
" 2.5342465753424657,\n",
|
| 958 |
-
" 0.0,\n",
|
| 959 |
-
" 2.6027397260273974,\n",
|
| 960 |
-
" 0.0,\n",
|
| 961 |
-
" 0.0,\n",
|
| 962 |
-
" 0.0,\n",
|
| 963 |
-
" 0.0,\n",
|
| 964 |
-
" 0.0,\n",
|
| 965 |
-
" 0.0,\n",
|
| 966 |
-
" 0.0684931506849315,\n",
|
| 967 |
-
" 0.0,\n",
|
| 968 |
-
" 0.0,\n",
|
| 969 |
-
" 0.0,\n",
|
| 970 |
-
" 0.0,\n",
|
| 971 |
-
" 0.0,\n",
|
| 972 |
-
" 0.0,\n",
|
| 973 |
-
" 0.0,\n",
|
| 974 |
-
" 0.0,\n",
|
| 975 |
-
" 0.0,\n",
|
| 976 |
-
" 0.0,\n",
|
| 977 |
-
" 0.0,\n",
|
| 978 |
-
" 0.0,\n",
|
| 979 |
-
" 0.0,\n",
|
| 980 |
-
" 0.0,\n",
|
| 981 |
-
" 47.26027397260274,\n",
|
| 982 |
-
" 5.5479452054794525,\n",
|
| 983 |
-
" 5.5479452054794525,\n",
|
| 984 |
-
" 5.5479452054794525,\n",
|
| 985 |
-
" 0.0,\n",
|
| 986 |
-
" 0.0,\n",
|
| 987 |
-
" 5.5479452054794525,\n",
|
| 988 |
-
" 5.5479452054794525,\n",
|
| 989 |
-
" 0.0,\n",
|
| 990 |
-
" 0.0,\n",
|
| 991 |
-
" 0.0,\n",
|
| 992 |
-
" 0.0,\n",
|
| 993 |
-
" 0.0,\n",
|
| 994 |
-
" 0.0,\n",
|
| 995 |
-
" 0.0,\n",
|
| 996 |
-
" 99.52054794520548,\n",
|
| 997 |
-
" 80.75342465753424,\n",
|
| 998 |
-
" 96.30136986301369,\n",
|
| 999 |
-
" 0.0,\n",
|
| 1000 |
-
" 0.0,\n",
|
| 1001 |
-
" 0.0,\n",
|
| 1002 |
-
" 0.0,\n",
|
| 1003 |
-
" 0.0,\n",
|
| 1004 |
-
" 0.0]"
|
| 1005 |
-
]
|
| 1006 |
-
},
|
| 1007 |
-
"execution_count": 7,
|
| 1008 |
-
"metadata": {},
|
| 1009 |
-
"output_type": "execute_result"
|
| 1010 |
-
}
|
| 1011 |
-
],
|
| 1012 |
"source": [
|
| 1013 |
"new=(((train.isnull().sum())/(train.shape[0]))*100)\n",
|
| 1014 |
"new.to_list()"
|
|
@@ -1034,7 +710,7 @@
|
|
| 1034 |
},
|
| 1035 |
{
|
| 1036 |
"cell_type": "code",
|
| 1037 |
-
"execution_count":
|
| 1038 |
"id": "a867388f",
|
| 1039 |
"metadata": {
|
| 1040 |
"execution": {
|
|
@@ -1075,7 +751,7 @@
|
|
| 1075 |
},
|
| 1076 |
{
|
| 1077 |
"cell_type": "code",
|
| 1078 |
-
"execution_count":
|
| 1079 |
"id": "6e6a2825",
|
| 1080 |
"metadata": {
|
| 1081 |
"execution": {
|
|
@@ -1086,20 +762,7 @@
|
|
| 1086 |
"shell.execute_reply.started": "2023-06-11T14:22:15.173686Z"
|
| 1087 |
}
|
| 1088 |
},
|
| 1089 |
-
"outputs": [
|
| 1090 |
-
{
|
| 1091 |
-
"name": "stdout",
|
| 1092 |
-
"output_type": "stream",
|
| 1093 |
-
"text": [
|
| 1094 |
-
"Categorical columns: ['MSZoning', 'Street', 'LotShape', 'LandContour', 'Utilities', 'LotConfig', 'LandSlope', 'Neighborhood', 'Condition1', 'Condition2', 'BldgType', 'HouseStyle', 'RoofStyle', 'RoofMatl', 'Exterior1st', 'Exterior2nd', 'ExterQual', 'ExterCond', 'Foundation', 'BsmtQual', 'BsmtCond', 'BsmtExposure', 'BsmtFinType1', 'BsmtFinType2', 'Heating', 'HeatingQC', 'CentralAir', 'Electrical', 'KitchenQual', 'Functional', 'GarageType', 'GarageFinish', 'GarageQual', 'GarageCond', 'PavedDrive', 'SaleType', 'SaleCondition'] \n",
|
| 1095 |
-
"Total Categorical column: 37\n",
|
| 1096 |
-
"\n",
|
| 1097 |
-
"\n",
|
| 1098 |
-
"Numerical columns: ['Id', 'MSSubClass', 'LotFrontage', 'LotArea', 'OverallQual', 'OverallCond', 'YearBuilt', 'YearRemodAdd', 'MasVnrArea', 'BsmtFinSF1', 'BsmtFinSF2', 'BsmtUnfSF', 'TotalBsmtSF', '1stFlrSF', '2ndFlrSF', 'LowQualFinSF', 'GrLivArea', 'BsmtFullBath', 'BsmtHalfBath', 'FullBath', 'HalfBath', 'BedroomAbvGr', 'KitchenAbvGr', 'TotRmsAbvGrd', 'Fireplaces', 'GarageYrBlt', 'GarageCars', 'GarageArea', 'WoodDeckSF', 'OpenPorchSF', 'EnclosedPorch', '3SsnPorch', 'ScreenPorch', 'PoolArea', 'MiscVal', 'MoSold', 'YrSold', 'SalePrice'] \n",
|
| 1099 |
-
"Total Numerical column: 38\n"
|
| 1100 |
-
]
|
| 1101 |
-
}
|
| 1102 |
-
],
|
| 1103 |
"source": [
|
| 1104 |
"categorical_col = list(train.select_dtypes(include=['object']).columns)\n",
|
| 1105 |
"numerical_col =list(train.select_dtypes(exclude=['object']).columns)\n",
|
|
@@ -1122,7 +785,7 @@
|
|
| 1122 |
},
|
| 1123 |
{
|
| 1124 |
"cell_type": "code",
|
| 1125 |
-
"execution_count":
|
| 1126 |
"id": "a0ab72f3",
|
| 1127 |
"metadata": {
|
| 1128 |
"execution": {
|
|
@@ -1141,7 +804,7 @@
|
|
| 1141 |
},
|
| 1142 |
{
|
| 1143 |
"cell_type": "code",
|
| 1144 |
-
"execution_count":
|
| 1145 |
"id": "085c75ed",
|
| 1146 |
"metadata": {
|
| 1147 |
"execution": {
|
|
@@ -1153,52 +816,7 @@
|
|
| 1153 |
},
|
| 1154 |
"scrolled": true
|
| 1155 |
},
|
| 1156 |
-
"outputs": [
|
| 1157 |
-
{
|
| 1158 |
-
"name": "stdout",
|
| 1159 |
-
"output_type": "stream",
|
| 1160 |
-
"text": [
|
| 1161 |
-
" Null count Unique count\n",
|
| 1162 |
-
"MSZoning 0 5\n",
|
| 1163 |
-
"Street 0 2\n",
|
| 1164 |
-
"LotShape 0 4\n",
|
| 1165 |
-
"LandContour 0 4\n",
|
| 1166 |
-
"Utilities 0 2\n",
|
| 1167 |
-
"LotConfig 0 5\n",
|
| 1168 |
-
"LandSlope 0 3\n",
|
| 1169 |
-
"Neighborhood 0 25\n",
|
| 1170 |
-
"Condition1 0 9\n",
|
| 1171 |
-
"Condition2 0 8\n",
|
| 1172 |
-
"BldgType 0 5\n",
|
| 1173 |
-
"HouseStyle 0 8\n",
|
| 1174 |
-
"RoofStyle 0 6\n",
|
| 1175 |
-
"RoofMatl 0 8\n",
|
| 1176 |
-
"Exterior1st 0 15\n",
|
| 1177 |
-
"Exterior2nd 0 16\n",
|
| 1178 |
-
"ExterQual 0 4\n",
|
| 1179 |
-
"ExterCond 0 5\n",
|
| 1180 |
-
"Foundation 0 6\n",
|
| 1181 |
-
"BsmtQual 37 4\n",
|
| 1182 |
-
"BsmtCond 37 4\n",
|
| 1183 |
-
"BsmtExposure 38 4\n",
|
| 1184 |
-
"BsmtFinType1 37 6\n",
|
| 1185 |
-
"BsmtFinType2 38 6\n",
|
| 1186 |
-
"Heating 0 6\n",
|
| 1187 |
-
"HeatingQC 0 5\n",
|
| 1188 |
-
"CentralAir 0 2\n",
|
| 1189 |
-
"Electrical 1 5\n",
|
| 1190 |
-
"KitchenQual 0 4\n",
|
| 1191 |
-
"Functional 0 7\n",
|
| 1192 |
-
"GarageType 81 6\n",
|
| 1193 |
-
"GarageFinish 81 3\n",
|
| 1194 |
-
"GarageQual 81 5\n",
|
| 1195 |
-
"GarageCond 81 5\n",
|
| 1196 |
-
"PavedDrive 0 3\n",
|
| 1197 |
-
"SaleType 0 9\n",
|
| 1198 |
-
"SaleCondition 0 6\n"
|
| 1199 |
-
]
|
| 1200 |
-
}
|
| 1201 |
-
],
|
| 1202 |
"source": [
|
| 1203 |
"data = {\n",
|
| 1204 |
" 'Null count': null_count,\n",
|
|
@@ -1210,7 +828,7 @@
|
|
| 1210 |
},
|
| 1211 |
{
|
| 1212 |
"cell_type": "code",
|
| 1213 |
-
"execution_count":
|
| 1214 |
"id": "29ebf8d9",
|
| 1215 |
"metadata": {
|
| 1216 |
"execution": {
|
|
@@ -1221,221 +839,14 @@
|
|
| 1221 |
"shell.execute_reply.started": "2023-06-11T14:20:13.734928Z"
|
| 1222 |
}
|
| 1223 |
},
|
| 1224 |
-
"outputs": [
|
| 1225 |
-
{
|
| 1226 |
-
"data": {
|
| 1227 |
-
"text/html": [
|
| 1228 |
-
"<div>\n",
|
| 1229 |
-
"<style scoped>\n",
|
| 1230 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 1231 |
-
" vertical-align: middle;\n",
|
| 1232 |
-
" }\n",
|
| 1233 |
-
"\n",
|
| 1234 |
-
" .dataframe tbody tr th {\n",
|
| 1235 |
-
" vertical-align: top;\n",
|
| 1236 |
-
" }\n",
|
| 1237 |
-
"\n",
|
| 1238 |
-
" .dataframe thead th {\n",
|
| 1239 |
-
" text-align: right;\n",
|
| 1240 |
-
" }\n",
|
| 1241 |
-
"</style>\n",
|
| 1242 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 1243 |
-
" <thead>\n",
|
| 1244 |
-
" <tr style=\"text-align: right;\">\n",
|
| 1245 |
-
" <th></th>\n",
|
| 1246 |
-
" <th>MSZoning</th>\n",
|
| 1247 |
-
" <th>Street</th>\n",
|
| 1248 |
-
" <th>LotShape</th>\n",
|
| 1249 |
-
" <th>LandContour</th>\n",
|
| 1250 |
-
" <th>Utilities</th>\n",
|
| 1251 |
-
" <th>LotConfig</th>\n",
|
| 1252 |
-
" <th>LandSlope</th>\n",
|
| 1253 |
-
" <th>Neighborhood</th>\n",
|
| 1254 |
-
" <th>Condition1</th>\n",
|
| 1255 |
-
" <th>Condition2</th>\n",
|
| 1256 |
-
" <th>...</th>\n",
|
| 1257 |
-
" <th>Electrical</th>\n",
|
| 1258 |
-
" <th>KitchenQual</th>\n",
|
| 1259 |
-
" <th>Functional</th>\n",
|
| 1260 |
-
" <th>GarageType</th>\n",
|
| 1261 |
-
" <th>GarageFinish</th>\n",
|
| 1262 |
-
" <th>GarageQual</th>\n",
|
| 1263 |
-
" <th>GarageCond</th>\n",
|
| 1264 |
-
" <th>PavedDrive</th>\n",
|
| 1265 |
-
" <th>SaleType</th>\n",
|
| 1266 |
-
" <th>SaleCondition</th>\n",
|
| 1267 |
-
" </tr>\n",
|
| 1268 |
-
" </thead>\n",
|
| 1269 |
-
" <tbody>\n",
|
| 1270 |
-
" <tr>\n",
|
| 1271 |
-
" <th>0</th>\n",
|
| 1272 |
-
" <td>RL</td>\n",
|
| 1273 |
-
" <td>Pave</td>\n",
|
| 1274 |
-
" <td>Reg</td>\n",
|
| 1275 |
-
" <td>Lvl</td>\n",
|
| 1276 |
-
" <td>AllPub</td>\n",
|
| 1277 |
-
" <td>Inside</td>\n",
|
| 1278 |
-
" <td>Gtl</td>\n",
|
| 1279 |
-
" <td>CollgCr</td>\n",
|
| 1280 |
-
" <td>Norm</td>\n",
|
| 1281 |
-
" <td>Norm</td>\n",
|
| 1282 |
-
" <td>...</td>\n",
|
| 1283 |
-
" <td>SBrkr</td>\n",
|
| 1284 |
-
" <td>Gd</td>\n",
|
| 1285 |
-
" <td>Typ</td>\n",
|
| 1286 |
-
" <td>Attchd</td>\n",
|
| 1287 |
-
" <td>RFn</td>\n",
|
| 1288 |
-
" <td>TA</td>\n",
|
| 1289 |
-
" <td>TA</td>\n",
|
| 1290 |
-
" <td>Y</td>\n",
|
| 1291 |
-
" <td>WD</td>\n",
|
| 1292 |
-
" <td>Normal</td>\n",
|
| 1293 |
-
" </tr>\n",
|
| 1294 |
-
" <tr>\n",
|
| 1295 |
-
" <th>1</th>\n",
|
| 1296 |
-
" <td>RL</td>\n",
|
| 1297 |
-
" <td>Pave</td>\n",
|
| 1298 |
-
" <td>Reg</td>\n",
|
| 1299 |
-
" <td>Lvl</td>\n",
|
| 1300 |
-
" <td>AllPub</td>\n",
|
| 1301 |
-
" <td>FR2</td>\n",
|
| 1302 |
-
" <td>Gtl</td>\n",
|
| 1303 |
-
" <td>Veenker</td>\n",
|
| 1304 |
-
" <td>Feedr</td>\n",
|
| 1305 |
-
" <td>Norm</td>\n",
|
| 1306 |
-
" <td>...</td>\n",
|
| 1307 |
-
" <td>SBrkr</td>\n",
|
| 1308 |
-
" <td>TA</td>\n",
|
| 1309 |
-
" <td>Typ</td>\n",
|
| 1310 |
-
" <td>Attchd</td>\n",
|
| 1311 |
-
" <td>RFn</td>\n",
|
| 1312 |
-
" <td>TA</td>\n",
|
| 1313 |
-
" <td>TA</td>\n",
|
| 1314 |
-
" <td>Y</td>\n",
|
| 1315 |
-
" <td>WD</td>\n",
|
| 1316 |
-
" <td>Normal</td>\n",
|
| 1317 |
-
" </tr>\n",
|
| 1318 |
-
" <tr>\n",
|
| 1319 |
-
" <th>2</th>\n",
|
| 1320 |
-
" <td>RL</td>\n",
|
| 1321 |
-
" <td>Pave</td>\n",
|
| 1322 |
-
" <td>IR1</td>\n",
|
| 1323 |
-
" <td>Lvl</td>\n",
|
| 1324 |
-
" <td>AllPub</td>\n",
|
| 1325 |
-
" <td>Inside</td>\n",
|
| 1326 |
-
" <td>Gtl</td>\n",
|
| 1327 |
-
" <td>CollgCr</td>\n",
|
| 1328 |
-
" <td>Norm</td>\n",
|
| 1329 |
-
" <td>Norm</td>\n",
|
| 1330 |
-
" <td>...</td>\n",
|
| 1331 |
-
" <td>SBrkr</td>\n",
|
| 1332 |
-
" <td>Gd</td>\n",
|
| 1333 |
-
" <td>Typ</td>\n",
|
| 1334 |
-
" <td>Attchd</td>\n",
|
| 1335 |
-
" <td>RFn</td>\n",
|
| 1336 |
-
" <td>TA</td>\n",
|
| 1337 |
-
" <td>TA</td>\n",
|
| 1338 |
-
" <td>Y</td>\n",
|
| 1339 |
-
" <td>WD</td>\n",
|
| 1340 |
-
" <td>Normal</td>\n",
|
| 1341 |
-
" </tr>\n",
|
| 1342 |
-
" <tr>\n",
|
| 1343 |
-
" <th>3</th>\n",
|
| 1344 |
-
" <td>RL</td>\n",
|
| 1345 |
-
" <td>Pave</td>\n",
|
| 1346 |
-
" <td>IR1</td>\n",
|
| 1347 |
-
" <td>Lvl</td>\n",
|
| 1348 |
-
" <td>AllPub</td>\n",
|
| 1349 |
-
" <td>Corner</td>\n",
|
| 1350 |
-
" <td>Gtl</td>\n",
|
| 1351 |
-
" <td>Crawfor</td>\n",
|
| 1352 |
-
" <td>Norm</td>\n",
|
| 1353 |
-
" <td>Norm</td>\n",
|
| 1354 |
-
" <td>...</td>\n",
|
| 1355 |
-
" <td>SBrkr</td>\n",
|
| 1356 |
-
" <td>Gd</td>\n",
|
| 1357 |
-
" <td>Typ</td>\n",
|
| 1358 |
-
" <td>Detchd</td>\n",
|
| 1359 |
-
" <td>Unf</td>\n",
|
| 1360 |
-
" <td>TA</td>\n",
|
| 1361 |
-
" <td>TA</td>\n",
|
| 1362 |
-
" <td>Y</td>\n",
|
| 1363 |
-
" <td>WD</td>\n",
|
| 1364 |
-
" <td>Abnorml</td>\n",
|
| 1365 |
-
" </tr>\n",
|
| 1366 |
-
" <tr>\n",
|
| 1367 |
-
" <th>4</th>\n",
|
| 1368 |
-
" <td>RL</td>\n",
|
| 1369 |
-
" <td>Pave</td>\n",
|
| 1370 |
-
" <td>IR1</td>\n",
|
| 1371 |
-
" <td>Lvl</td>\n",
|
| 1372 |
-
" <td>AllPub</td>\n",
|
| 1373 |
-
" <td>FR2</td>\n",
|
| 1374 |
-
" <td>Gtl</td>\n",
|
| 1375 |
-
" <td>NoRidge</td>\n",
|
| 1376 |
-
" <td>Norm</td>\n",
|
| 1377 |
-
" <td>Norm</td>\n",
|
| 1378 |
-
" <td>...</td>\n",
|
| 1379 |
-
" <td>SBrkr</td>\n",
|
| 1380 |
-
" <td>Gd</td>\n",
|
| 1381 |
-
" <td>Typ</td>\n",
|
| 1382 |
-
" <td>Attchd</td>\n",
|
| 1383 |
-
" <td>RFn</td>\n",
|
| 1384 |
-
" <td>TA</td>\n",
|
| 1385 |
-
" <td>TA</td>\n",
|
| 1386 |
-
" <td>Y</td>\n",
|
| 1387 |
-
" <td>WD</td>\n",
|
| 1388 |
-
" <td>Normal</td>\n",
|
| 1389 |
-
" </tr>\n",
|
| 1390 |
-
" </tbody>\n",
|
| 1391 |
-
"</table>\n",
|
| 1392 |
-
"<p>5 rows × 37 columns</p>\n",
|
| 1393 |
-
"</div>"
|
| 1394 |
-
],
|
| 1395 |
-
"text/plain": [
|
| 1396 |
-
" MSZoning Street LotShape LandContour Utilities LotConfig LandSlope \\\n",
|
| 1397 |
-
"0 RL Pave Reg Lvl AllPub Inside Gtl \n",
|
| 1398 |
-
"1 RL Pave Reg Lvl AllPub FR2 Gtl \n",
|
| 1399 |
-
"2 RL Pave IR1 Lvl AllPub Inside Gtl \n",
|
| 1400 |
-
"3 RL Pave IR1 Lvl AllPub Corner Gtl \n",
|
| 1401 |
-
"4 RL Pave IR1 Lvl AllPub FR2 Gtl \n",
|
| 1402 |
-
"\n",
|
| 1403 |
-
" Neighborhood Condition1 Condition2 ... Electrical KitchenQual Functional \\\n",
|
| 1404 |
-
"0 CollgCr Norm Norm ... SBrkr Gd Typ \n",
|
| 1405 |
-
"1 Veenker Feedr Norm ... SBrkr TA Typ \n",
|
| 1406 |
-
"2 CollgCr Norm Norm ... SBrkr Gd Typ \n",
|
| 1407 |
-
"3 Crawfor Norm Norm ... SBrkr Gd Typ \n",
|
| 1408 |
-
"4 NoRidge Norm Norm ... SBrkr Gd Typ \n",
|
| 1409 |
-
"\n",
|
| 1410 |
-
" GarageType GarageFinish GarageQual GarageCond PavedDrive SaleType \\\n",
|
| 1411 |
-
"0 Attchd RFn TA TA Y WD \n",
|
| 1412 |
-
"1 Attchd RFn TA TA Y WD \n",
|
| 1413 |
-
"2 Attchd RFn TA TA Y WD \n",
|
| 1414 |
-
"3 Detchd Unf TA TA Y WD \n",
|
| 1415 |
-
"4 Attchd RFn TA TA Y WD \n",
|
| 1416 |
-
"\n",
|
| 1417 |
-
" SaleCondition \n",
|
| 1418 |
-
"0 Normal \n",
|
| 1419 |
-
"1 Normal \n",
|
| 1420 |
-
"2 Normal \n",
|
| 1421 |
-
"3 Abnorml \n",
|
| 1422 |
-
"4 Normal \n",
|
| 1423 |
-
"\n",
|
| 1424 |
-
"[5 rows x 37 columns]"
|
| 1425 |
-
]
|
| 1426 |
-
},
|
| 1427 |
-
"execution_count": 12,
|
| 1428 |
-
"metadata": {},
|
| 1429 |
-
"output_type": "execute_result"
|
| 1430 |
-
}
|
| 1431 |
-
],
|
| 1432 |
"source": [
|
| 1433 |
"train[categorical_col].head()"
|
| 1434 |
]
|
| 1435 |
},
|
| 1436 |
{
|
| 1437 |
"cell_type": "code",
|
| 1438 |
-
"execution_count":
|
| 1439 |
"id": "13215608",
|
| 1440 |
"metadata": {
|
| 1441 |
"execution": {
|
|
@@ -1454,7 +865,7 @@
|
|
| 1454 |
},
|
| 1455 |
{
|
| 1456 |
"cell_type": "code",
|
| 1457 |
-
"execution_count":
|
| 1458 |
"id": "e500cc07",
|
| 1459 |
"metadata": {
|
| 1460 |
"execution": {
|
|
@@ -1466,52 +877,7 @@
|
|
| 1466 |
},
|
| 1467 |
"scrolled": true
|
| 1468 |
},
|
| 1469 |
-
"outputs": [
|
| 1470 |
-
{
|
| 1471 |
-
"name": "stdout",
|
| 1472 |
-
"output_type": "stream",
|
| 1473 |
-
"text": [
|
| 1474 |
-
" Null count Unique count\n",
|
| 1475 |
-
"MSZoning 0 5\n",
|
| 1476 |
-
"Street 0 2\n",
|
| 1477 |
-
"LotShape 0 4\n",
|
| 1478 |
-
"LandContour 0 4\n",
|
| 1479 |
-
"Utilities 0 2\n",
|
| 1480 |
-
"LotConfig 0 5\n",
|
| 1481 |
-
"LandSlope 0 3\n",
|
| 1482 |
-
"Neighborhood 0 25\n",
|
| 1483 |
-
"Condition1 0 9\n",
|
| 1484 |
-
"Condition2 0 8\n",
|
| 1485 |
-
"BldgType 0 5\n",
|
| 1486 |
-
"HouseStyle 0 8\n",
|
| 1487 |
-
"RoofStyle 0 6\n",
|
| 1488 |
-
"RoofMatl 0 8\n",
|
| 1489 |
-
"Exterior1st 0 15\n",
|
| 1490 |
-
"Exterior2nd 0 16\n",
|
| 1491 |
-
"ExterQual 0 4\n",
|
| 1492 |
-
"ExterCond 0 5\n",
|
| 1493 |
-
"Foundation 0 6\n",
|
| 1494 |
-
"BsmtQual 37 4\n",
|
| 1495 |
-
"BsmtCond 37 4\n",
|
| 1496 |
-
"BsmtExposure 38 4\n",
|
| 1497 |
-
"BsmtFinType1 37 6\n",
|
| 1498 |
-
"BsmtFinType2 38 6\n",
|
| 1499 |
-
"Heating 0 6\n",
|
| 1500 |
-
"HeatingQC 0 5\n",
|
| 1501 |
-
"CentralAir 0 2\n",
|
| 1502 |
-
"Electrical 1 5\n",
|
| 1503 |
-
"KitchenQual 0 4\n",
|
| 1504 |
-
"Functional 0 7\n",
|
| 1505 |
-
"GarageType 81 6\n",
|
| 1506 |
-
"GarageFinish 81 3\n",
|
| 1507 |
-
"GarageQual 81 5\n",
|
| 1508 |
-
"GarageCond 81 5\n",
|
| 1509 |
-
"PavedDrive 0 3\n",
|
| 1510 |
-
"SaleType 0 9\n",
|
| 1511 |
-
"SaleCondition 0 6\n"
|
| 1512 |
-
]
|
| 1513 |
-
}
|
| 1514 |
-
],
|
| 1515 |
"source": [
|
| 1516 |
"data = {\n",
|
| 1517 |
" 'Null count': null_count,\n",
|
|
@@ -1523,7 +889,7 @@
|
|
| 1523 |
},
|
| 1524 |
{
|
| 1525 |
"cell_type": "code",
|
| 1526 |
-
"execution_count":
|
| 1527 |
"id": "8fe3b97b",
|
| 1528 |
"metadata": {
|
| 1529 |
"execution": {
|
|
|
|
| 51 |
},
|
| 52 |
{
|
| 53 |
"cell_type": "code",
|
| 54 |
+
"execution_count": null,
|
| 55 |
"id": "3879efdb",
|
| 56 |
"metadata": {
|
| 57 |
"execution": {
|
|
|
|
| 62 |
"shell.execute_reply.started": "2023-06-11T14:19:34.854293Z"
|
| 63 |
}
|
| 64 |
},
|
| 65 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
"source": [
|
| 67 |
"train.head()"
|
| 68 |
]
|
|
|
|
| 618 |
},
|
| 619 |
{
|
| 620 |
"cell_type": "code",
|
| 621 |
+
"execution_count": null,
|
| 622 |
"id": "9116a799",
|
| 623 |
"metadata": {
|
| 624 |
"execution": {
|
|
|
|
| 629 |
"shell.execute_reply.started": "2023-06-11T14:20:06.472701Z"
|
| 630 |
}
|
| 631 |
},
|
| 632 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 633 |
"source": [
|
| 634 |
"train.shape"
|
| 635 |
]
|
| 636 |
},
|
| 637 |
{
|
| 638 |
"cell_type": "code",
|
| 639 |
+
"execution_count": null,
|
| 640 |
"id": "f23afceb",
|
| 641 |
"metadata": {
|
| 642 |
"execution": {
|
|
|
|
| 647 |
"shell.execute_reply.started": "2023-06-11T14:20:07.457995Z"
|
| 648 |
}
|
| 649 |
},
|
| 650 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 651 |
"source": [
|
| 652 |
"test.shape"
|
| 653 |
]
|
| 654 |
},
|
| 655 |
{
|
| 656 |
"cell_type": "code",
|
| 657 |
+
"execution_count": null,
|
| 658 |
"id": "f9409852",
|
| 659 |
"metadata": {
|
| 660 |
"execution": {
|
|
|
|
| 665 |
"shell.execute_reply.started": "2023-06-11T14:20:07.909893Z"
|
| 666 |
}
|
| 667 |
},
|
| 668 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 669 |
"source": [
|
| 670 |
"submission.shape"
|
| 671 |
]
|
| 672 |
},
|
| 673 |
{
|
| 674 |
"cell_type": "code",
|
| 675 |
+
"execution_count": null,
|
| 676 |
"id": "0eda05c7",
|
| 677 |
"metadata": {
|
| 678 |
"execution": {
|
|
|
|
| 684 |
},
|
| 685 |
"scrolled": true
|
| 686 |
},
|
| 687 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 688 |
"source": [
|
| 689 |
"new=(((train.isnull().sum())/(train.shape[0]))*100)\n",
|
| 690 |
"new.to_list()"
|
|
|
|
| 710 |
},
|
| 711 |
{
|
| 712 |
"cell_type": "code",
|
| 713 |
+
"execution_count": 3,
|
| 714 |
"id": "a867388f",
|
| 715 |
"metadata": {
|
| 716 |
"execution": {
|
|
|
|
| 751 |
},
|
| 752 |
{
|
| 753 |
"cell_type": "code",
|
| 754 |
+
"execution_count": null,
|
| 755 |
"id": "6e6a2825",
|
| 756 |
"metadata": {
|
| 757 |
"execution": {
|
|
|
|
| 762 |
"shell.execute_reply.started": "2023-06-11T14:22:15.173686Z"
|
| 763 |
}
|
| 764 |
},
|
| 765 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 766 |
"source": [
|
| 767 |
"categorical_col = list(train.select_dtypes(include=['object']).columns)\n",
|
| 768 |
"numerical_col =list(train.select_dtypes(exclude=['object']).columns)\n",
|
|
|
|
| 785 |
},
|
| 786 |
{
|
| 787 |
"cell_type": "code",
|
| 788 |
+
"execution_count": null,
|
| 789 |
"id": "a0ab72f3",
|
| 790 |
"metadata": {
|
| 791 |
"execution": {
|
|
|
|
| 804 |
},
|
| 805 |
{
|
| 806 |
"cell_type": "code",
|
| 807 |
+
"execution_count": null,
|
| 808 |
"id": "085c75ed",
|
| 809 |
"metadata": {
|
| 810 |
"execution": {
|
|
|
|
| 816 |
},
|
| 817 |
"scrolled": true
|
| 818 |
},
|
| 819 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 820 |
"source": [
|
| 821 |
"data = {\n",
|
| 822 |
" 'Null count': null_count,\n",
|
|
|
|
| 828 |
},
|
| 829 |
{
|
| 830 |
"cell_type": "code",
|
| 831 |
+
"execution_count": null,
|
| 832 |
"id": "29ebf8d9",
|
| 833 |
"metadata": {
|
| 834 |
"execution": {
|
|
|
|
| 839 |
"shell.execute_reply.started": "2023-06-11T14:20:13.734928Z"
|
| 840 |
}
|
| 841 |
},
|
| 842 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 843 |
"source": [
|
| 844 |
"train[categorical_col].head()"
|
| 845 |
]
|
| 846 |
},
|
| 847 |
{
|
| 848 |
"cell_type": "code",
|
| 849 |
+
"execution_count": null,
|
| 850 |
"id": "13215608",
|
| 851 |
"metadata": {
|
| 852 |
"execution": {
|
|
|
|
| 865 |
},
|
| 866 |
{
|
| 867 |
"cell_type": "code",
|
| 868 |
+
"execution_count": null,
|
| 869 |
"id": "e500cc07",
|
| 870 |
"metadata": {
|
| 871 |
"execution": {
|
|
|
|
| 877 |
},
|
| 878 |
"scrolled": true
|
| 879 |
},
|
| 880 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 881 |
"source": [
|
| 882 |
"data = {\n",
|
| 883 |
" 'Null count': null_count,\n",
|
|
|
|
| 889 |
},
|
| 890 |
{
|
| 891 |
"cell_type": "code",
|
| 892 |
+
"execution_count": 4,
|
| 893 |
"id": "8fe3b97b",
|
| 894 |
"metadata": {
|
| 895 |
"execution": {
|
benchmark/pandas_15/pandas_15_reproduced.ipynb
CHANGED
|
@@ -51,7 +51,7 @@
|
|
| 51 |
},
|
| 52 |
{
|
| 53 |
"cell_type": "code",
|
| 54 |
-
"execution_count":
|
| 55 |
"id": "3879efdb",
|
| 56 |
"metadata": {
|
| 57 |
"execution": {
|
|
@@ -62,207 +62,7 @@
|
|
| 62 |
"shell.execute_reply.started": "2023-06-11T14:19:34.854293Z"
|
| 63 |
}
|
| 64 |
},
|
| 65 |
-
"outputs": [
|
| 66 |
-
{
|
| 67 |
-
"data": {
|
| 68 |
-
"text/html": [
|
| 69 |
-
"<div>\n",
|
| 70 |
-
"<style scoped>\n",
|
| 71 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 72 |
-
" vertical-align: middle;\n",
|
| 73 |
-
" }\n",
|
| 74 |
-
"\n",
|
| 75 |
-
" .dataframe tbody tr th {\n",
|
| 76 |
-
" vertical-align: top;\n",
|
| 77 |
-
" }\n",
|
| 78 |
-
"\n",
|
| 79 |
-
" .dataframe thead th {\n",
|
| 80 |
-
" text-align: right;\n",
|
| 81 |
-
" }\n",
|
| 82 |
-
"</style>\n",
|
| 83 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 84 |
-
" <thead>\n",
|
| 85 |
-
" <tr style=\"text-align: right;\">\n",
|
| 86 |
-
" <th></th>\n",
|
| 87 |
-
" <th>Id</th>\n",
|
| 88 |
-
" <th>MSSubClass</th>\n",
|
| 89 |
-
" <th>MSZoning</th>\n",
|
| 90 |
-
" <th>LotFrontage</th>\n",
|
| 91 |
-
" <th>LotArea</th>\n",
|
| 92 |
-
" <th>Street</th>\n",
|
| 93 |
-
" <th>Alley</th>\n",
|
| 94 |
-
" <th>LotShape</th>\n",
|
| 95 |
-
" <th>LandContour</th>\n",
|
| 96 |
-
" <th>Utilities</th>\n",
|
| 97 |
-
" <th>...</th>\n",
|
| 98 |
-
" <th>PoolArea</th>\n",
|
| 99 |
-
" <th>PoolQC</th>\n",
|
| 100 |
-
" <th>Fence</th>\n",
|
| 101 |
-
" <th>MiscFeature</th>\n",
|
| 102 |
-
" <th>MiscVal</th>\n",
|
| 103 |
-
" <th>MoSold</th>\n",
|
| 104 |
-
" <th>YrSold</th>\n",
|
| 105 |
-
" <th>SaleType</th>\n",
|
| 106 |
-
" <th>SaleCondition</th>\n",
|
| 107 |
-
" <th>SalePrice</th>\n",
|
| 108 |
-
" </tr>\n",
|
| 109 |
-
" </thead>\n",
|
| 110 |
-
" <tbody>\n",
|
| 111 |
-
" <tr>\n",
|
| 112 |
-
" <th>0</th>\n",
|
| 113 |
-
" <td>1</td>\n",
|
| 114 |
-
" <td>60</td>\n",
|
| 115 |
-
" <td>RL</td>\n",
|
| 116 |
-
" <td>65.0</td>\n",
|
| 117 |
-
" <td>8450</td>\n",
|
| 118 |
-
" <td>Pave</td>\n",
|
| 119 |
-
" <td>NaN</td>\n",
|
| 120 |
-
" <td>Reg</td>\n",
|
| 121 |
-
" <td>Lvl</td>\n",
|
| 122 |
-
" <td>AllPub</td>\n",
|
| 123 |
-
" <td>...</td>\n",
|
| 124 |
-
" <td>0</td>\n",
|
| 125 |
-
" <td>NaN</td>\n",
|
| 126 |
-
" <td>NaN</td>\n",
|
| 127 |
-
" <td>NaN</td>\n",
|
| 128 |
-
" <td>0</td>\n",
|
| 129 |
-
" <td>2</td>\n",
|
| 130 |
-
" <td>2008</td>\n",
|
| 131 |
-
" <td>WD</td>\n",
|
| 132 |
-
" <td>Normal</td>\n",
|
| 133 |
-
" <td>208500</td>\n",
|
| 134 |
-
" </tr>\n",
|
| 135 |
-
" <tr>\n",
|
| 136 |
-
" <th>1</th>\n",
|
| 137 |
-
" <td>2</td>\n",
|
| 138 |
-
" <td>20</td>\n",
|
| 139 |
-
" <td>RL</td>\n",
|
| 140 |
-
" <td>80.0</td>\n",
|
| 141 |
-
" <td>9600</td>\n",
|
| 142 |
-
" <td>Pave</td>\n",
|
| 143 |
-
" <td>NaN</td>\n",
|
| 144 |
-
" <td>Reg</td>\n",
|
| 145 |
-
" <td>Lvl</td>\n",
|
| 146 |
-
" <td>AllPub</td>\n",
|
| 147 |
-
" <td>...</td>\n",
|
| 148 |
-
" <td>0</td>\n",
|
| 149 |
-
" <td>NaN</td>\n",
|
| 150 |
-
" <td>NaN</td>\n",
|
| 151 |
-
" <td>NaN</td>\n",
|
| 152 |
-
" <td>0</td>\n",
|
| 153 |
-
" <td>5</td>\n",
|
| 154 |
-
" <td>2007</td>\n",
|
| 155 |
-
" <td>WD</td>\n",
|
| 156 |
-
" <td>Normal</td>\n",
|
| 157 |
-
" <td>181500</td>\n",
|
| 158 |
-
" </tr>\n",
|
| 159 |
-
" <tr>\n",
|
| 160 |
-
" <th>2</th>\n",
|
| 161 |
-
" <td>3</td>\n",
|
| 162 |
-
" <td>60</td>\n",
|
| 163 |
-
" <td>RL</td>\n",
|
| 164 |
-
" <td>68.0</td>\n",
|
| 165 |
-
" <td>11250</td>\n",
|
| 166 |
-
" <td>Pave</td>\n",
|
| 167 |
-
" <td>NaN</td>\n",
|
| 168 |
-
" <td>IR1</td>\n",
|
| 169 |
-
" <td>Lvl</td>\n",
|
| 170 |
-
" <td>AllPub</td>\n",
|
| 171 |
-
" <td>...</td>\n",
|
| 172 |
-
" <td>0</td>\n",
|
| 173 |
-
" <td>NaN</td>\n",
|
| 174 |
-
" <td>NaN</td>\n",
|
| 175 |
-
" <td>NaN</td>\n",
|
| 176 |
-
" <td>0</td>\n",
|
| 177 |
-
" <td>9</td>\n",
|
| 178 |
-
" <td>2008</td>\n",
|
| 179 |
-
" <td>WD</td>\n",
|
| 180 |
-
" <td>Normal</td>\n",
|
| 181 |
-
" <td>223500</td>\n",
|
| 182 |
-
" </tr>\n",
|
| 183 |
-
" <tr>\n",
|
| 184 |
-
" <th>3</th>\n",
|
| 185 |
-
" <td>4</td>\n",
|
| 186 |
-
" <td>70</td>\n",
|
| 187 |
-
" <td>RL</td>\n",
|
| 188 |
-
" <td>60.0</td>\n",
|
| 189 |
-
" <td>9550</td>\n",
|
| 190 |
-
" <td>Pave</td>\n",
|
| 191 |
-
" <td>NaN</td>\n",
|
| 192 |
-
" <td>IR1</td>\n",
|
| 193 |
-
" <td>Lvl</td>\n",
|
| 194 |
-
" <td>AllPub</td>\n",
|
| 195 |
-
" <td>...</td>\n",
|
| 196 |
-
" <td>0</td>\n",
|
| 197 |
-
" <td>NaN</td>\n",
|
| 198 |
-
" <td>NaN</td>\n",
|
| 199 |
-
" <td>NaN</td>\n",
|
| 200 |
-
" <td>0</td>\n",
|
| 201 |
-
" <td>2</td>\n",
|
| 202 |
-
" <td>2006</td>\n",
|
| 203 |
-
" <td>WD</td>\n",
|
| 204 |
-
" <td>Abnorml</td>\n",
|
| 205 |
-
" <td>140000</td>\n",
|
| 206 |
-
" </tr>\n",
|
| 207 |
-
" <tr>\n",
|
| 208 |
-
" <th>4</th>\n",
|
| 209 |
-
" <td>5</td>\n",
|
| 210 |
-
" <td>60</td>\n",
|
| 211 |
-
" <td>RL</td>\n",
|
| 212 |
-
" <td>84.0</td>\n",
|
| 213 |
-
" <td>14260</td>\n",
|
| 214 |
-
" <td>Pave</td>\n",
|
| 215 |
-
" <td>NaN</td>\n",
|
| 216 |
-
" <td>IR1</td>\n",
|
| 217 |
-
" <td>Lvl</td>\n",
|
| 218 |
-
" <td>AllPub</td>\n",
|
| 219 |
-
" <td>...</td>\n",
|
| 220 |
-
" <td>0</td>\n",
|
| 221 |
-
" <td>NaN</td>\n",
|
| 222 |
-
" <td>NaN</td>\n",
|
| 223 |
-
" <td>NaN</td>\n",
|
| 224 |
-
" <td>0</td>\n",
|
| 225 |
-
" <td>12</td>\n",
|
| 226 |
-
" <td>2008</td>\n",
|
| 227 |
-
" <td>WD</td>\n",
|
| 228 |
-
" <td>Normal</td>\n",
|
| 229 |
-
" <td>250000</td>\n",
|
| 230 |
-
" </tr>\n",
|
| 231 |
-
" </tbody>\n",
|
| 232 |
-
"</table>\n",
|
| 233 |
-
"<p>5 rows × 81 columns</p>\n",
|
| 234 |
-
"</div>"
|
| 235 |
-
],
|
| 236 |
-
"text/plain": [
|
| 237 |
-
" Id MSSubClass MSZoning LotFrontage LotArea Street Alley LotShape \\\n",
|
| 238 |
-
"0 1 60 RL 65.0 8450 Pave NaN Reg \n",
|
| 239 |
-
"1 2 20 RL 80.0 9600 Pave NaN Reg \n",
|
| 240 |
-
"2 3 60 RL 68.0 11250 Pave NaN IR1 \n",
|
| 241 |
-
"3 4 70 RL 60.0 9550 Pave NaN IR1 \n",
|
| 242 |
-
"4 5 60 RL 84.0 14260 Pave NaN IR1 \n",
|
| 243 |
-
"\n",
|
| 244 |
-
" LandContour Utilities ... PoolArea PoolQC Fence MiscFeature MiscVal MoSold \\\n",
|
| 245 |
-
"0 Lvl AllPub ... 0 NaN NaN NaN 0 2 \n",
|
| 246 |
-
"1 Lvl AllPub ... 0 NaN NaN NaN 0 5 \n",
|
| 247 |
-
"2 Lvl AllPub ... 0 NaN NaN NaN 0 9 \n",
|
| 248 |
-
"3 Lvl AllPub ... 0 NaN NaN NaN 0 2 \n",
|
| 249 |
-
"4 Lvl AllPub ... 0 NaN NaN NaN 0 12 \n",
|
| 250 |
-
"\n",
|
| 251 |
-
" YrSold SaleType SaleCondition SalePrice \n",
|
| 252 |
-
"0 2008 WD Normal 208500 \n",
|
| 253 |
-
"1 2007 WD Normal 181500 \n",
|
| 254 |
-
"2 2008 WD Normal 223500 \n",
|
| 255 |
-
"3 2006 WD Abnorml 140000 \n",
|
| 256 |
-
"4 2008 WD Normal 250000 \n",
|
| 257 |
-
"\n",
|
| 258 |
-
"[5 rows x 81 columns]"
|
| 259 |
-
]
|
| 260 |
-
},
|
| 261 |
-
"execution_count": 3,
|
| 262 |
-
"metadata": {},
|
| 263 |
-
"output_type": "execute_result"
|
| 264 |
-
}
|
| 265 |
-
],
|
| 266 |
"source": [
|
| 267 |
"train.head()"
|
| 268 |
]
|
|
@@ -818,7 +618,7 @@
|
|
| 818 |
},
|
| 819 |
{
|
| 820 |
"cell_type": "code",
|
| 821 |
-
"execution_count":
|
| 822 |
"id": "9116a799",
|
| 823 |
"metadata": {
|
| 824 |
"execution": {
|
|
@@ -829,25 +629,14 @@
|
|
| 829 |
"shell.execute_reply.started": "2023-06-11T14:20:06.472701Z"
|
| 830 |
}
|
| 831 |
},
|
| 832 |
-
"outputs": [
|
| 833 |
-
{
|
| 834 |
-
"data": {
|
| 835 |
-
"text/plain": [
|
| 836 |
-
"(1460, 81)"
|
| 837 |
-
]
|
| 838 |
-
},
|
| 839 |
-
"execution_count": 4,
|
| 840 |
-
"metadata": {},
|
| 841 |
-
"output_type": "execute_result"
|
| 842 |
-
}
|
| 843 |
-
],
|
| 844 |
"source": [
|
| 845 |
"train.shape"
|
| 846 |
]
|
| 847 |
},
|
| 848 |
{
|
| 849 |
"cell_type": "code",
|
| 850 |
-
"execution_count":
|
| 851 |
"id": "f23afceb",
|
| 852 |
"metadata": {
|
| 853 |
"execution": {
|
|
@@ -858,25 +647,14 @@
|
|
| 858 |
"shell.execute_reply.started": "2023-06-11T14:20:07.457995Z"
|
| 859 |
}
|
| 860 |
},
|
| 861 |
-
"outputs": [
|
| 862 |
-
{
|
| 863 |
-
"data": {
|
| 864 |
-
"text/plain": [
|
| 865 |
-
"(1459, 80)"
|
| 866 |
-
]
|
| 867 |
-
},
|
| 868 |
-
"execution_count": 5,
|
| 869 |
-
"metadata": {},
|
| 870 |
-
"output_type": "execute_result"
|
| 871 |
-
}
|
| 872 |
-
],
|
| 873 |
"source": [
|
| 874 |
"test.shape"
|
| 875 |
]
|
| 876 |
},
|
| 877 |
{
|
| 878 |
"cell_type": "code",
|
| 879 |
-
"execution_count":
|
| 880 |
"id": "f9409852",
|
| 881 |
"metadata": {
|
| 882 |
"execution": {
|
|
@@ -887,25 +665,14 @@
|
|
| 887 |
"shell.execute_reply.started": "2023-06-11T14:20:07.909893Z"
|
| 888 |
}
|
| 889 |
},
|
| 890 |
-
"outputs": [
|
| 891 |
-
{
|
| 892 |
-
"data": {
|
| 893 |
-
"text/plain": [
|
| 894 |
-
"(1459, 2)"
|
| 895 |
-
]
|
| 896 |
-
},
|
| 897 |
-
"execution_count": 6,
|
| 898 |
-
"metadata": {},
|
| 899 |
-
"output_type": "execute_result"
|
| 900 |
-
}
|
| 901 |
-
],
|
| 902 |
"source": [
|
| 903 |
"submission.shape"
|
| 904 |
]
|
| 905 |
},
|
| 906 |
{
|
| 907 |
"cell_type": "code",
|
| 908 |
-
"execution_count":
|
| 909 |
"id": "0eda05c7",
|
| 910 |
"metadata": {
|
| 911 |
"execution": {
|
|
@@ -917,98 +684,7 @@
|
|
| 917 |
},
|
| 918 |
"scrolled": true
|
| 919 |
},
|
| 920 |
-
"outputs": [
|
| 921 |
-
{
|
| 922 |
-
"data": {
|
| 923 |
-
"text/plain": [
|
| 924 |
-
"[0.0,\n",
|
| 925 |
-
" 0.0,\n",
|
| 926 |
-
" 0.0,\n",
|
| 927 |
-
" 17.73972602739726,\n",
|
| 928 |
-
" 0.0,\n",
|
| 929 |
-
" 0.0,\n",
|
| 930 |
-
" 93.76712328767123,\n",
|
| 931 |
-
" 0.0,\n",
|
| 932 |
-
" 0.0,\n",
|
| 933 |
-
" 0.0,\n",
|
| 934 |
-
" 0.0,\n",
|
| 935 |
-
" 0.0,\n",
|
| 936 |
-
" 0.0,\n",
|
| 937 |
-
" 0.0,\n",
|
| 938 |
-
" 0.0,\n",
|
| 939 |
-
" 0.0,\n",
|
| 940 |
-
" 0.0,\n",
|
| 941 |
-
" 0.0,\n",
|
| 942 |
-
" 0.0,\n",
|
| 943 |
-
" 0.0,\n",
|
| 944 |
-
" 0.0,\n",
|
| 945 |
-
" 0.0,\n",
|
| 946 |
-
" 0.0,\n",
|
| 947 |
-
" 0.0,\n",
|
| 948 |
-
" 0.0,\n",
|
| 949 |
-
" 59.726027397260275,\n",
|
| 950 |
-
" 0.547945205479452,\n",
|
| 951 |
-
" 0.0,\n",
|
| 952 |
-
" 0.0,\n",
|
| 953 |
-
" 0.0,\n",
|
| 954 |
-
" 2.5342465753424657,\n",
|
| 955 |
-
" 2.5342465753424657,\n",
|
| 956 |
-
" 2.6027397260273974,\n",
|
| 957 |
-
" 2.5342465753424657,\n",
|
| 958 |
-
" 0.0,\n",
|
| 959 |
-
" 2.6027397260273974,\n",
|
| 960 |
-
" 0.0,\n",
|
| 961 |
-
" 0.0,\n",
|
| 962 |
-
" 0.0,\n",
|
| 963 |
-
" 0.0,\n",
|
| 964 |
-
" 0.0,\n",
|
| 965 |
-
" 0.0,\n",
|
| 966 |
-
" 0.0684931506849315,\n",
|
| 967 |
-
" 0.0,\n",
|
| 968 |
-
" 0.0,\n",
|
| 969 |
-
" 0.0,\n",
|
| 970 |
-
" 0.0,\n",
|
| 971 |
-
" 0.0,\n",
|
| 972 |
-
" 0.0,\n",
|
| 973 |
-
" 0.0,\n",
|
| 974 |
-
" 0.0,\n",
|
| 975 |
-
" 0.0,\n",
|
| 976 |
-
" 0.0,\n",
|
| 977 |
-
" 0.0,\n",
|
| 978 |
-
" 0.0,\n",
|
| 979 |
-
" 0.0,\n",
|
| 980 |
-
" 0.0,\n",
|
| 981 |
-
" 47.26027397260274,\n",
|
| 982 |
-
" 5.5479452054794525,\n",
|
| 983 |
-
" 5.5479452054794525,\n",
|
| 984 |
-
" 5.5479452054794525,\n",
|
| 985 |
-
" 0.0,\n",
|
| 986 |
-
" 0.0,\n",
|
| 987 |
-
" 5.5479452054794525,\n",
|
| 988 |
-
" 5.5479452054794525,\n",
|
| 989 |
-
" 0.0,\n",
|
| 990 |
-
" 0.0,\n",
|
| 991 |
-
" 0.0,\n",
|
| 992 |
-
" 0.0,\n",
|
| 993 |
-
" 0.0,\n",
|
| 994 |
-
" 0.0,\n",
|
| 995 |
-
" 0.0,\n",
|
| 996 |
-
" 99.52054794520548,\n",
|
| 997 |
-
" 80.75342465753424,\n",
|
| 998 |
-
" 96.30136986301369,\n",
|
| 999 |
-
" 0.0,\n",
|
| 1000 |
-
" 0.0,\n",
|
| 1001 |
-
" 0.0,\n",
|
| 1002 |
-
" 0.0,\n",
|
| 1003 |
-
" 0.0,\n",
|
| 1004 |
-
" 0.0]"
|
| 1005 |
-
]
|
| 1006 |
-
},
|
| 1007 |
-
"execution_count": 7,
|
| 1008 |
-
"metadata": {},
|
| 1009 |
-
"output_type": "execute_result"
|
| 1010 |
-
}
|
| 1011 |
-
],
|
| 1012 |
"source": [
|
| 1013 |
"new=(((train.isnull().sum())/(train.shape[0]))*100)\n",
|
| 1014 |
"new.to_list()"
|
|
@@ -1034,7 +710,7 @@
|
|
| 1034 |
},
|
| 1035 |
{
|
| 1036 |
"cell_type": "code",
|
| 1037 |
-
"execution_count":
|
| 1038 |
"id": "a867388f",
|
| 1039 |
"metadata": {
|
| 1040 |
"execution": {
|
|
@@ -1075,7 +751,7 @@
|
|
| 1075 |
},
|
| 1076 |
{
|
| 1077 |
"cell_type": "code",
|
| 1078 |
-
"execution_count":
|
| 1079 |
"id": "6e6a2825",
|
| 1080 |
"metadata": {
|
| 1081 |
"execution": {
|
|
@@ -1086,20 +762,7 @@
|
|
| 1086 |
"shell.execute_reply.started": "2023-06-11T14:22:15.173686Z"
|
| 1087 |
}
|
| 1088 |
},
|
| 1089 |
-
"outputs": [
|
| 1090 |
-
{
|
| 1091 |
-
"name": "stdout",
|
| 1092 |
-
"output_type": "stream",
|
| 1093 |
-
"text": [
|
| 1094 |
-
"Categorical columns: ['MSZoning', 'Street', 'LotShape', 'LandContour', 'Utilities', 'LotConfig', 'LandSlope', 'Neighborhood', 'Condition1', 'Condition2', 'BldgType', 'HouseStyle', 'RoofStyle', 'RoofMatl', 'Exterior1st', 'Exterior2nd', 'ExterQual', 'ExterCond', 'Foundation', 'BsmtQual', 'BsmtCond', 'BsmtExposure', 'BsmtFinType1', 'BsmtFinType2', 'Heating', 'HeatingQC', 'CentralAir', 'Electrical', 'KitchenQual', 'Functional', 'GarageType', 'GarageFinish', 'GarageQual', 'GarageCond', 'PavedDrive', 'SaleType', 'SaleCondition'] \n",
|
| 1095 |
-
"Total Categorical column: 37\n",
|
| 1096 |
-
"\n",
|
| 1097 |
-
"\n",
|
| 1098 |
-
"Numerical columns: ['Id', 'MSSubClass', 'LotFrontage', 'LotArea', 'OverallQual', 'OverallCond', 'YearBuilt', 'YearRemodAdd', 'MasVnrArea', 'BsmtFinSF1', 'BsmtFinSF2', 'BsmtUnfSF', 'TotalBsmtSF', '1stFlrSF', '2ndFlrSF', 'LowQualFinSF', 'GrLivArea', 'BsmtFullBath', 'BsmtHalfBath', 'FullBath', 'HalfBath', 'BedroomAbvGr', 'KitchenAbvGr', 'TotRmsAbvGrd', 'Fireplaces', 'GarageYrBlt', 'GarageCars', 'GarageArea', 'WoodDeckSF', 'OpenPorchSF', 'EnclosedPorch', '3SsnPorch', 'ScreenPorch', 'PoolArea', 'MiscVal', 'MoSold', 'YrSold', 'SalePrice'] \n",
|
| 1099 |
-
"Total Numerical column: 38\n"
|
| 1100 |
-
]
|
| 1101 |
-
}
|
| 1102 |
-
],
|
| 1103 |
"source": [
|
| 1104 |
"categorical_col = list(train.select_dtypes(include=['object']).columns)\n",
|
| 1105 |
"numerical_col =list(train.select_dtypes(exclude=['object']).columns)\n",
|
|
@@ -1122,7 +785,7 @@
|
|
| 1122 |
},
|
| 1123 |
{
|
| 1124 |
"cell_type": "code",
|
| 1125 |
-
"execution_count":
|
| 1126 |
"id": "a0ab72f3",
|
| 1127 |
"metadata": {
|
| 1128 |
"execution": {
|
|
@@ -1141,7 +804,7 @@
|
|
| 1141 |
},
|
| 1142 |
{
|
| 1143 |
"cell_type": "code",
|
| 1144 |
-
"execution_count":
|
| 1145 |
"id": "085c75ed",
|
| 1146 |
"metadata": {
|
| 1147 |
"execution": {
|
|
@@ -1153,52 +816,7 @@
|
|
| 1153 |
},
|
| 1154 |
"scrolled": true
|
| 1155 |
},
|
| 1156 |
-
"outputs": [
|
| 1157 |
-
{
|
| 1158 |
-
"name": "stdout",
|
| 1159 |
-
"output_type": "stream",
|
| 1160 |
-
"text": [
|
| 1161 |
-
" Null count Unique count\n",
|
| 1162 |
-
"MSZoning 0 5\n",
|
| 1163 |
-
"Street 0 2\n",
|
| 1164 |
-
"LotShape 0 4\n",
|
| 1165 |
-
"LandContour 0 4\n",
|
| 1166 |
-
"Utilities 0 2\n",
|
| 1167 |
-
"LotConfig 0 5\n",
|
| 1168 |
-
"LandSlope 0 3\n",
|
| 1169 |
-
"Neighborhood 0 25\n",
|
| 1170 |
-
"Condition1 0 9\n",
|
| 1171 |
-
"Condition2 0 8\n",
|
| 1172 |
-
"BldgType 0 5\n",
|
| 1173 |
-
"HouseStyle 0 8\n",
|
| 1174 |
-
"RoofStyle 0 6\n",
|
| 1175 |
-
"RoofMatl 0 8\n",
|
| 1176 |
-
"Exterior1st 0 15\n",
|
| 1177 |
-
"Exterior2nd 0 16\n",
|
| 1178 |
-
"ExterQual 0 4\n",
|
| 1179 |
-
"ExterCond 0 5\n",
|
| 1180 |
-
"Foundation 0 6\n",
|
| 1181 |
-
"BsmtQual 37 4\n",
|
| 1182 |
-
"BsmtCond 37 4\n",
|
| 1183 |
-
"BsmtExposure 38 4\n",
|
| 1184 |
-
"BsmtFinType1 37 6\n",
|
| 1185 |
-
"BsmtFinType2 38 6\n",
|
| 1186 |
-
"Heating 0 6\n",
|
| 1187 |
-
"HeatingQC 0 5\n",
|
| 1188 |
-
"CentralAir 0 2\n",
|
| 1189 |
-
"Electrical 1 5\n",
|
| 1190 |
-
"KitchenQual 0 4\n",
|
| 1191 |
-
"Functional 0 7\n",
|
| 1192 |
-
"GarageType 81 6\n",
|
| 1193 |
-
"GarageFinish 81 3\n",
|
| 1194 |
-
"GarageQual 81 5\n",
|
| 1195 |
-
"GarageCond 81 5\n",
|
| 1196 |
-
"PavedDrive 0 3\n",
|
| 1197 |
-
"SaleType 0 9\n",
|
| 1198 |
-
"SaleCondition 0 6\n"
|
| 1199 |
-
]
|
| 1200 |
-
}
|
| 1201 |
-
],
|
| 1202 |
"source": [
|
| 1203 |
"data = {\n",
|
| 1204 |
" 'Null count': null_count,\n",
|
|
@@ -1210,7 +828,7 @@
|
|
| 1210 |
},
|
| 1211 |
{
|
| 1212 |
"cell_type": "code",
|
| 1213 |
-
"execution_count":
|
| 1214 |
"id": "29ebf8d9",
|
| 1215 |
"metadata": {
|
| 1216 |
"execution": {
|
|
@@ -1221,221 +839,14 @@
|
|
| 1221 |
"shell.execute_reply.started": "2023-06-11T14:20:13.734928Z"
|
| 1222 |
}
|
| 1223 |
},
|
| 1224 |
-
"outputs": [
|
| 1225 |
-
{
|
| 1226 |
-
"data": {
|
| 1227 |
-
"text/html": [
|
| 1228 |
-
"<div>\n",
|
| 1229 |
-
"<style scoped>\n",
|
| 1230 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 1231 |
-
" vertical-align: middle;\n",
|
| 1232 |
-
" }\n",
|
| 1233 |
-
"\n",
|
| 1234 |
-
" .dataframe tbody tr th {\n",
|
| 1235 |
-
" vertical-align: top;\n",
|
| 1236 |
-
" }\n",
|
| 1237 |
-
"\n",
|
| 1238 |
-
" .dataframe thead th {\n",
|
| 1239 |
-
" text-align: right;\n",
|
| 1240 |
-
" }\n",
|
| 1241 |
-
"</style>\n",
|
| 1242 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 1243 |
-
" <thead>\n",
|
| 1244 |
-
" <tr style=\"text-align: right;\">\n",
|
| 1245 |
-
" <th></th>\n",
|
| 1246 |
-
" <th>MSZoning</th>\n",
|
| 1247 |
-
" <th>Street</th>\n",
|
| 1248 |
-
" <th>LotShape</th>\n",
|
| 1249 |
-
" <th>LandContour</th>\n",
|
| 1250 |
-
" <th>Utilities</th>\n",
|
| 1251 |
-
" <th>LotConfig</th>\n",
|
| 1252 |
-
" <th>LandSlope</th>\n",
|
| 1253 |
-
" <th>Neighborhood</th>\n",
|
| 1254 |
-
" <th>Condition1</th>\n",
|
| 1255 |
-
" <th>Condition2</th>\n",
|
| 1256 |
-
" <th>...</th>\n",
|
| 1257 |
-
" <th>Electrical</th>\n",
|
| 1258 |
-
" <th>KitchenQual</th>\n",
|
| 1259 |
-
" <th>Functional</th>\n",
|
| 1260 |
-
" <th>GarageType</th>\n",
|
| 1261 |
-
" <th>GarageFinish</th>\n",
|
| 1262 |
-
" <th>GarageQual</th>\n",
|
| 1263 |
-
" <th>GarageCond</th>\n",
|
| 1264 |
-
" <th>PavedDrive</th>\n",
|
| 1265 |
-
" <th>SaleType</th>\n",
|
| 1266 |
-
" <th>SaleCondition</th>\n",
|
| 1267 |
-
" </tr>\n",
|
| 1268 |
-
" </thead>\n",
|
| 1269 |
-
" <tbody>\n",
|
| 1270 |
-
" <tr>\n",
|
| 1271 |
-
" <th>0</th>\n",
|
| 1272 |
-
" <td>RL</td>\n",
|
| 1273 |
-
" <td>Pave</td>\n",
|
| 1274 |
-
" <td>Reg</td>\n",
|
| 1275 |
-
" <td>Lvl</td>\n",
|
| 1276 |
-
" <td>AllPub</td>\n",
|
| 1277 |
-
" <td>Inside</td>\n",
|
| 1278 |
-
" <td>Gtl</td>\n",
|
| 1279 |
-
" <td>CollgCr</td>\n",
|
| 1280 |
-
" <td>Norm</td>\n",
|
| 1281 |
-
" <td>Norm</td>\n",
|
| 1282 |
-
" <td>...</td>\n",
|
| 1283 |
-
" <td>SBrkr</td>\n",
|
| 1284 |
-
" <td>Gd</td>\n",
|
| 1285 |
-
" <td>Typ</td>\n",
|
| 1286 |
-
" <td>Attchd</td>\n",
|
| 1287 |
-
" <td>RFn</td>\n",
|
| 1288 |
-
" <td>TA</td>\n",
|
| 1289 |
-
" <td>TA</td>\n",
|
| 1290 |
-
" <td>Y</td>\n",
|
| 1291 |
-
" <td>WD</td>\n",
|
| 1292 |
-
" <td>Normal</td>\n",
|
| 1293 |
-
" </tr>\n",
|
| 1294 |
-
" <tr>\n",
|
| 1295 |
-
" <th>1</th>\n",
|
| 1296 |
-
" <td>RL</td>\n",
|
| 1297 |
-
" <td>Pave</td>\n",
|
| 1298 |
-
" <td>Reg</td>\n",
|
| 1299 |
-
" <td>Lvl</td>\n",
|
| 1300 |
-
" <td>AllPub</td>\n",
|
| 1301 |
-
" <td>FR2</td>\n",
|
| 1302 |
-
" <td>Gtl</td>\n",
|
| 1303 |
-
" <td>Veenker</td>\n",
|
| 1304 |
-
" <td>Feedr</td>\n",
|
| 1305 |
-
" <td>Norm</td>\n",
|
| 1306 |
-
" <td>...</td>\n",
|
| 1307 |
-
" <td>SBrkr</td>\n",
|
| 1308 |
-
" <td>TA</td>\n",
|
| 1309 |
-
" <td>Typ</td>\n",
|
| 1310 |
-
" <td>Attchd</td>\n",
|
| 1311 |
-
" <td>RFn</td>\n",
|
| 1312 |
-
" <td>TA</td>\n",
|
| 1313 |
-
" <td>TA</td>\n",
|
| 1314 |
-
" <td>Y</td>\n",
|
| 1315 |
-
" <td>WD</td>\n",
|
| 1316 |
-
" <td>Normal</td>\n",
|
| 1317 |
-
" </tr>\n",
|
| 1318 |
-
" <tr>\n",
|
| 1319 |
-
" <th>2</th>\n",
|
| 1320 |
-
" <td>RL</td>\n",
|
| 1321 |
-
" <td>Pave</td>\n",
|
| 1322 |
-
" <td>IR1</td>\n",
|
| 1323 |
-
" <td>Lvl</td>\n",
|
| 1324 |
-
" <td>AllPub</td>\n",
|
| 1325 |
-
" <td>Inside</td>\n",
|
| 1326 |
-
" <td>Gtl</td>\n",
|
| 1327 |
-
" <td>CollgCr</td>\n",
|
| 1328 |
-
" <td>Norm</td>\n",
|
| 1329 |
-
" <td>Norm</td>\n",
|
| 1330 |
-
" <td>...</td>\n",
|
| 1331 |
-
" <td>SBrkr</td>\n",
|
| 1332 |
-
" <td>Gd</td>\n",
|
| 1333 |
-
" <td>Typ</td>\n",
|
| 1334 |
-
" <td>Attchd</td>\n",
|
| 1335 |
-
" <td>RFn</td>\n",
|
| 1336 |
-
" <td>TA</td>\n",
|
| 1337 |
-
" <td>TA</td>\n",
|
| 1338 |
-
" <td>Y</td>\n",
|
| 1339 |
-
" <td>WD</td>\n",
|
| 1340 |
-
" <td>Normal</td>\n",
|
| 1341 |
-
" </tr>\n",
|
| 1342 |
-
" <tr>\n",
|
| 1343 |
-
" <th>3</th>\n",
|
| 1344 |
-
" <td>RL</td>\n",
|
| 1345 |
-
" <td>Pave</td>\n",
|
| 1346 |
-
" <td>IR1</td>\n",
|
| 1347 |
-
" <td>Lvl</td>\n",
|
| 1348 |
-
" <td>AllPub</td>\n",
|
| 1349 |
-
" <td>Corner</td>\n",
|
| 1350 |
-
" <td>Gtl</td>\n",
|
| 1351 |
-
" <td>Crawfor</td>\n",
|
| 1352 |
-
" <td>Norm</td>\n",
|
| 1353 |
-
" <td>Norm</td>\n",
|
| 1354 |
-
" <td>...</td>\n",
|
| 1355 |
-
" <td>SBrkr</td>\n",
|
| 1356 |
-
" <td>Gd</td>\n",
|
| 1357 |
-
" <td>Typ</td>\n",
|
| 1358 |
-
" <td>Detchd</td>\n",
|
| 1359 |
-
" <td>Unf</td>\n",
|
| 1360 |
-
" <td>TA</td>\n",
|
| 1361 |
-
" <td>TA</td>\n",
|
| 1362 |
-
" <td>Y</td>\n",
|
| 1363 |
-
" <td>WD</td>\n",
|
| 1364 |
-
" <td>Abnorml</td>\n",
|
| 1365 |
-
" </tr>\n",
|
| 1366 |
-
" <tr>\n",
|
| 1367 |
-
" <th>4</th>\n",
|
| 1368 |
-
" <td>RL</td>\n",
|
| 1369 |
-
" <td>Pave</td>\n",
|
| 1370 |
-
" <td>IR1</td>\n",
|
| 1371 |
-
" <td>Lvl</td>\n",
|
| 1372 |
-
" <td>AllPub</td>\n",
|
| 1373 |
-
" <td>FR2</td>\n",
|
| 1374 |
-
" <td>Gtl</td>\n",
|
| 1375 |
-
" <td>NoRidge</td>\n",
|
| 1376 |
-
" <td>Norm</td>\n",
|
| 1377 |
-
" <td>Norm</td>\n",
|
| 1378 |
-
" <td>...</td>\n",
|
| 1379 |
-
" <td>SBrkr</td>\n",
|
| 1380 |
-
" <td>Gd</td>\n",
|
| 1381 |
-
" <td>Typ</td>\n",
|
| 1382 |
-
" <td>Attchd</td>\n",
|
| 1383 |
-
" <td>RFn</td>\n",
|
| 1384 |
-
" <td>TA</td>\n",
|
| 1385 |
-
" <td>TA</td>\n",
|
| 1386 |
-
" <td>Y</td>\n",
|
| 1387 |
-
" <td>WD</td>\n",
|
| 1388 |
-
" <td>Normal</td>\n",
|
| 1389 |
-
" </tr>\n",
|
| 1390 |
-
" </tbody>\n",
|
| 1391 |
-
"</table>\n",
|
| 1392 |
-
"<p>5 rows × 37 columns</p>\n",
|
| 1393 |
-
"</div>"
|
| 1394 |
-
],
|
| 1395 |
-
"text/plain": [
|
| 1396 |
-
" MSZoning Street LotShape LandContour Utilities LotConfig LandSlope \\\n",
|
| 1397 |
-
"0 RL Pave Reg Lvl AllPub Inside Gtl \n",
|
| 1398 |
-
"1 RL Pave Reg Lvl AllPub FR2 Gtl \n",
|
| 1399 |
-
"2 RL Pave IR1 Lvl AllPub Inside Gtl \n",
|
| 1400 |
-
"3 RL Pave IR1 Lvl AllPub Corner Gtl \n",
|
| 1401 |
-
"4 RL Pave IR1 Lvl AllPub FR2 Gtl \n",
|
| 1402 |
-
"\n",
|
| 1403 |
-
" Neighborhood Condition1 Condition2 ... Electrical KitchenQual Functional \\\n",
|
| 1404 |
-
"0 CollgCr Norm Norm ... SBrkr Gd Typ \n",
|
| 1405 |
-
"1 Veenker Feedr Norm ... SBrkr TA Typ \n",
|
| 1406 |
-
"2 CollgCr Norm Norm ... SBrkr Gd Typ \n",
|
| 1407 |
-
"3 Crawfor Norm Norm ... SBrkr Gd Typ \n",
|
| 1408 |
-
"4 NoRidge Norm Norm ... SBrkr Gd Typ \n",
|
| 1409 |
-
"\n",
|
| 1410 |
-
" GarageType GarageFinish GarageQual GarageCond PavedDrive SaleType \\\n",
|
| 1411 |
-
"0 Attchd RFn TA TA Y WD \n",
|
| 1412 |
-
"1 Attchd RFn TA TA Y WD \n",
|
| 1413 |
-
"2 Attchd RFn TA TA Y WD \n",
|
| 1414 |
-
"3 Detchd Unf TA TA Y WD \n",
|
| 1415 |
-
"4 Attchd RFn TA TA Y WD \n",
|
| 1416 |
-
"\n",
|
| 1417 |
-
" SaleCondition \n",
|
| 1418 |
-
"0 Normal \n",
|
| 1419 |
-
"1 Normal \n",
|
| 1420 |
-
"2 Normal \n",
|
| 1421 |
-
"3 Abnorml \n",
|
| 1422 |
-
"4 Normal \n",
|
| 1423 |
-
"\n",
|
| 1424 |
-
"[5 rows x 37 columns]"
|
| 1425 |
-
]
|
| 1426 |
-
},
|
| 1427 |
-
"execution_count": 12,
|
| 1428 |
-
"metadata": {},
|
| 1429 |
-
"output_type": "execute_result"
|
| 1430 |
-
}
|
| 1431 |
-
],
|
| 1432 |
"source": [
|
| 1433 |
"train[categorical_col].head()"
|
| 1434 |
]
|
| 1435 |
},
|
| 1436 |
{
|
| 1437 |
"cell_type": "code",
|
| 1438 |
-
"execution_count":
|
| 1439 |
"id": "13215608",
|
| 1440 |
"metadata": {
|
| 1441 |
"execution": {
|
|
@@ -1454,7 +865,7 @@
|
|
| 1454 |
},
|
| 1455 |
{
|
| 1456 |
"cell_type": "code",
|
| 1457 |
-
"execution_count":
|
| 1458 |
"id": "e500cc07",
|
| 1459 |
"metadata": {
|
| 1460 |
"execution": {
|
|
@@ -1466,52 +877,7 @@
|
|
| 1466 |
},
|
| 1467 |
"scrolled": true
|
| 1468 |
},
|
| 1469 |
-
"outputs": [
|
| 1470 |
-
{
|
| 1471 |
-
"name": "stdout",
|
| 1472 |
-
"output_type": "stream",
|
| 1473 |
-
"text": [
|
| 1474 |
-
" Null count Unique count\n",
|
| 1475 |
-
"MSZoning 0 5\n",
|
| 1476 |
-
"Street 0 2\n",
|
| 1477 |
-
"LotShape 0 4\n",
|
| 1478 |
-
"LandContour 0 4\n",
|
| 1479 |
-
"Utilities 0 2\n",
|
| 1480 |
-
"LotConfig 0 5\n",
|
| 1481 |
-
"LandSlope 0 3\n",
|
| 1482 |
-
"Neighborhood 0 25\n",
|
| 1483 |
-
"Condition1 0 9\n",
|
| 1484 |
-
"Condition2 0 8\n",
|
| 1485 |
-
"BldgType 0 5\n",
|
| 1486 |
-
"HouseStyle 0 8\n",
|
| 1487 |
-
"RoofStyle 0 6\n",
|
| 1488 |
-
"RoofMatl 0 8\n",
|
| 1489 |
-
"Exterior1st 0 15\n",
|
| 1490 |
-
"Exterior2nd 0 16\n",
|
| 1491 |
-
"ExterQual 0 4\n",
|
| 1492 |
-
"ExterCond 0 5\n",
|
| 1493 |
-
"Foundation 0 6\n",
|
| 1494 |
-
"BsmtQual 37 4\n",
|
| 1495 |
-
"BsmtCond 37 4\n",
|
| 1496 |
-
"BsmtExposure 38 4\n",
|
| 1497 |
-
"BsmtFinType1 37 6\n",
|
| 1498 |
-
"BsmtFinType2 38 6\n",
|
| 1499 |
-
"Heating 0 6\n",
|
| 1500 |
-
"HeatingQC 0 5\n",
|
| 1501 |
-
"CentralAir 0 2\n",
|
| 1502 |
-
"Electrical 1 5\n",
|
| 1503 |
-
"KitchenQual 0 4\n",
|
| 1504 |
-
"Functional 0 7\n",
|
| 1505 |
-
"GarageType 81 6\n",
|
| 1506 |
-
"GarageFinish 81 3\n",
|
| 1507 |
-
"GarageQual 81 5\n",
|
| 1508 |
-
"GarageCond 81 5\n",
|
| 1509 |
-
"PavedDrive 0 3\n",
|
| 1510 |
-
"SaleType 0 9\n",
|
| 1511 |
-
"SaleCondition 0 6\n"
|
| 1512 |
-
]
|
| 1513 |
-
}
|
| 1514 |
-
],
|
| 1515 |
"source": [
|
| 1516 |
"data = {\n",
|
| 1517 |
" 'Null count': null_count,\n",
|
|
@@ -1523,7 +889,7 @@
|
|
| 1523 |
},
|
| 1524 |
{
|
| 1525 |
"cell_type": "code",
|
| 1526 |
-
"execution_count":
|
| 1527 |
"id": "8fe3b97b",
|
| 1528 |
"metadata": {
|
| 1529 |
"execution": {
|
|
@@ -1542,7 +908,7 @@
|
|
| 1542 |
"traceback": [
|
| 1543 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1544 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 1545 |
-
"\u001b[0;32m<ipython-input-
|
| 1546 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36mdrop\u001b[0;34m(self, labels, axis, index, columns, level, inplace, errors)\u001b[0m\n\u001b[1;32m 5342\u001b[0m \u001b[0mweight\u001b[0m \u001b[0;36m1.0\u001b[0m \u001b[0;36m0.8\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5343\u001b[0m \"\"\"\n\u001b[0;32m-> 5344\u001b[0;31m return super().drop(\n\u001b[0m\u001b[1;32m 5345\u001b[0m \u001b[0mlabels\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5346\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1547 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mdrop\u001b[0;34m(self, labels, axis, index, columns, level, inplace, errors)\u001b[0m\n\u001b[1;32m 4709\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;32min\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4710\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4711\u001b[0;31m \u001b[0mobj\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_drop_axis\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4712\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4713\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1548 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36m_drop_axis\u001b[0;34m(self, labels, axis, level, errors, only_slice)\u001b[0m\n\u001b[1;32m 4751\u001b[0m \u001b[0mnew_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4752\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4753\u001b[0;31m \u001b[0mnew_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4754\u001b[0m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_indexer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_axis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4755\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
|
|
| 51 |
},
|
| 52 |
{
|
| 53 |
"cell_type": "code",
|
| 54 |
+
"execution_count": null,
|
| 55 |
"id": "3879efdb",
|
| 56 |
"metadata": {
|
| 57 |
"execution": {
|
|
|
|
| 62 |
"shell.execute_reply.started": "2023-06-11T14:19:34.854293Z"
|
| 63 |
}
|
| 64 |
},
|
| 65 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
"source": [
|
| 67 |
"train.head()"
|
| 68 |
]
|
|
|
|
| 618 |
},
|
| 619 |
{
|
| 620 |
"cell_type": "code",
|
| 621 |
+
"execution_count": null,
|
| 622 |
"id": "9116a799",
|
| 623 |
"metadata": {
|
| 624 |
"execution": {
|
|
|
|
| 629 |
"shell.execute_reply.started": "2023-06-11T14:20:06.472701Z"
|
| 630 |
}
|
| 631 |
},
|
| 632 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 633 |
"source": [
|
| 634 |
"train.shape"
|
| 635 |
]
|
| 636 |
},
|
| 637 |
{
|
| 638 |
"cell_type": "code",
|
| 639 |
+
"execution_count": null,
|
| 640 |
"id": "f23afceb",
|
| 641 |
"metadata": {
|
| 642 |
"execution": {
|
|
|
|
| 647 |
"shell.execute_reply.started": "2023-06-11T14:20:07.457995Z"
|
| 648 |
}
|
| 649 |
},
|
| 650 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 651 |
"source": [
|
| 652 |
"test.shape"
|
| 653 |
]
|
| 654 |
},
|
| 655 |
{
|
| 656 |
"cell_type": "code",
|
| 657 |
+
"execution_count": null,
|
| 658 |
"id": "f9409852",
|
| 659 |
"metadata": {
|
| 660 |
"execution": {
|
|
|
|
| 665 |
"shell.execute_reply.started": "2023-06-11T14:20:07.909893Z"
|
| 666 |
}
|
| 667 |
},
|
| 668 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 669 |
"source": [
|
| 670 |
"submission.shape"
|
| 671 |
]
|
| 672 |
},
|
| 673 |
{
|
| 674 |
"cell_type": "code",
|
| 675 |
+
"execution_count": null,
|
| 676 |
"id": "0eda05c7",
|
| 677 |
"metadata": {
|
| 678 |
"execution": {
|
|
|
|
| 684 |
},
|
| 685 |
"scrolled": true
|
| 686 |
},
|
| 687 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 688 |
"source": [
|
| 689 |
"new=(((train.isnull().sum())/(train.shape[0]))*100)\n",
|
| 690 |
"new.to_list()"
|
|
|
|
| 710 |
},
|
| 711 |
{
|
| 712 |
"cell_type": "code",
|
| 713 |
+
"execution_count": 3,
|
| 714 |
"id": "a867388f",
|
| 715 |
"metadata": {
|
| 716 |
"execution": {
|
|
|
|
| 751 |
},
|
| 752 |
{
|
| 753 |
"cell_type": "code",
|
| 754 |
+
"execution_count": null,
|
| 755 |
"id": "6e6a2825",
|
| 756 |
"metadata": {
|
| 757 |
"execution": {
|
|
|
|
| 762 |
"shell.execute_reply.started": "2023-06-11T14:22:15.173686Z"
|
| 763 |
}
|
| 764 |
},
|
| 765 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 766 |
"source": [
|
| 767 |
"categorical_col = list(train.select_dtypes(include=['object']).columns)\n",
|
| 768 |
"numerical_col =list(train.select_dtypes(exclude=['object']).columns)\n",
|
|
|
|
| 785 |
},
|
| 786 |
{
|
| 787 |
"cell_type": "code",
|
| 788 |
+
"execution_count": null,
|
| 789 |
"id": "a0ab72f3",
|
| 790 |
"metadata": {
|
| 791 |
"execution": {
|
|
|
|
| 804 |
},
|
| 805 |
{
|
| 806 |
"cell_type": "code",
|
| 807 |
+
"execution_count": null,
|
| 808 |
"id": "085c75ed",
|
| 809 |
"metadata": {
|
| 810 |
"execution": {
|
|
|
|
| 816 |
},
|
| 817 |
"scrolled": true
|
| 818 |
},
|
| 819 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 820 |
"source": [
|
| 821 |
"data = {\n",
|
| 822 |
" 'Null count': null_count,\n",
|
|
|
|
| 828 |
},
|
| 829 |
{
|
| 830 |
"cell_type": "code",
|
| 831 |
+
"execution_count": null,
|
| 832 |
"id": "29ebf8d9",
|
| 833 |
"metadata": {
|
| 834 |
"execution": {
|
|
|
|
| 839 |
"shell.execute_reply.started": "2023-06-11T14:20:13.734928Z"
|
| 840 |
}
|
| 841 |
},
|
| 842 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 843 |
"source": [
|
| 844 |
"train[categorical_col].head()"
|
| 845 |
]
|
| 846 |
},
|
| 847 |
{
|
| 848 |
"cell_type": "code",
|
| 849 |
+
"execution_count": null,
|
| 850 |
"id": "13215608",
|
| 851 |
"metadata": {
|
| 852 |
"execution": {
|
|
|
|
| 865 |
},
|
| 866 |
{
|
| 867 |
"cell_type": "code",
|
| 868 |
+
"execution_count": null,
|
| 869 |
"id": "e500cc07",
|
| 870 |
"metadata": {
|
| 871 |
"execution": {
|
|
|
|
| 877 |
},
|
| 878 |
"scrolled": true
|
| 879 |
},
|
| 880 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 881 |
"source": [
|
| 882 |
"data = {\n",
|
| 883 |
" 'Null count': null_count,\n",
|
|
|
|
| 889 |
},
|
| 890 |
{
|
| 891 |
"cell_type": "code",
|
| 892 |
+
"execution_count": 4,
|
| 893 |
"id": "8fe3b97b",
|
| 894 |
"metadata": {
|
| 895 |
"execution": {
|
|
|
|
| 908 |
"traceback": [
|
| 909 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 910 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 911 |
+
"\u001b[0;32m<ipython-input-4-8d5e312935a0>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtest\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtest\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Alley'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'PoolQC'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'Fence'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'MiscFeature'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'Id'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
| 912 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36mdrop\u001b[0;34m(self, labels, axis, index, columns, level, inplace, errors)\u001b[0m\n\u001b[1;32m 5342\u001b[0m \u001b[0mweight\u001b[0m \u001b[0;36m1.0\u001b[0m \u001b[0;36m0.8\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5343\u001b[0m \"\"\"\n\u001b[0;32m-> 5344\u001b[0;31m return super().drop(\n\u001b[0m\u001b[1;32m 5345\u001b[0m \u001b[0mlabels\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5346\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 913 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mdrop\u001b[0;34m(self, labels, axis, index, columns, level, inplace, errors)\u001b[0m\n\u001b[1;32m 4709\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;32min\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4710\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4711\u001b[0;31m \u001b[0mobj\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_drop_axis\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4712\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4713\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 914 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36m_drop_axis\u001b[0;34m(self, labels, axis, level, errors, only_slice)\u001b[0m\n\u001b[1;32m 4751\u001b[0m \u001b[0mnew_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4752\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4753\u001b[0;31m \u001b[0mnew_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4754\u001b[0m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_indexer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_axis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4755\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
benchmark/pandas_2/pandas_2_fixed.ipynb
CHANGED
|
@@ -83,7 +83,7 @@
|
|
| 83 |
},
|
| 84 |
{
|
| 85 |
"cell_type": "code",
|
| 86 |
-
"execution_count":
|
| 87 |
"metadata": {
|
| 88 |
"execution": {
|
| 89 |
"iopub.execute_input": "2023-06-02T11:50:31.684884Z",
|
|
@@ -93,396 +93,7 @@
|
|
| 93 |
"shell.execute_reply.started": "2023-06-02T11:50:31.684847Z"
|
| 94 |
}
|
| 95 |
},
|
| 96 |
-
"outputs": [
|
| 97 |
-
{
|
| 98 |
-
"data": {
|
| 99 |
-
"text/html": [
|
| 100 |
-
"<div>\n",
|
| 101 |
-
"<style scoped>\n",
|
| 102 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 103 |
-
" vertical-align: middle;\n",
|
| 104 |
-
" }\n",
|
| 105 |
-
"\n",
|
| 106 |
-
" .dataframe tbody tr th {\n",
|
| 107 |
-
" vertical-align: top;\n",
|
| 108 |
-
" }\n",
|
| 109 |
-
"\n",
|
| 110 |
-
" .dataframe thead th {\n",
|
| 111 |
-
" text-align: right;\n",
|
| 112 |
-
" }\n",
|
| 113 |
-
"</style>\n",
|
| 114 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 115 |
-
" <thead>\n",
|
| 116 |
-
" <tr style=\"text-align: right;\">\n",
|
| 117 |
-
" <th></th>\n",
|
| 118 |
-
" <th>MSSubClass</th>\n",
|
| 119 |
-
" <th>MSZoning</th>\n",
|
| 120 |
-
" <th>LotFrontage</th>\n",
|
| 121 |
-
" <th>LotArea</th>\n",
|
| 122 |
-
" <th>Street</th>\n",
|
| 123 |
-
" <th>Alley</th>\n",
|
| 124 |
-
" <th>LotShape</th>\n",
|
| 125 |
-
" <th>LandContour</th>\n",
|
| 126 |
-
" <th>Utilities</th>\n",
|
| 127 |
-
" <th>LotConfig</th>\n",
|
| 128 |
-
" <th>...</th>\n",
|
| 129 |
-
" <th>PoolArea</th>\n",
|
| 130 |
-
" <th>PoolQC</th>\n",
|
| 131 |
-
" <th>Fence</th>\n",
|
| 132 |
-
" <th>MiscFeature</th>\n",
|
| 133 |
-
" <th>MiscVal</th>\n",
|
| 134 |
-
" <th>MoSold</th>\n",
|
| 135 |
-
" <th>YrSold</th>\n",
|
| 136 |
-
" <th>SaleType</th>\n",
|
| 137 |
-
" <th>SaleCondition</th>\n",
|
| 138 |
-
" <th>SalePrice</th>\n",
|
| 139 |
-
" </tr>\n",
|
| 140 |
-
" <tr>\n",
|
| 141 |
-
" <th>Id</th>\n",
|
| 142 |
-
" <th></th>\n",
|
| 143 |
-
" <th></th>\n",
|
| 144 |
-
" <th></th>\n",
|
| 145 |
-
" <th></th>\n",
|
| 146 |
-
" <th></th>\n",
|
| 147 |
-
" <th></th>\n",
|
| 148 |
-
" <th></th>\n",
|
| 149 |
-
" <th></th>\n",
|
| 150 |
-
" <th></th>\n",
|
| 151 |
-
" <th></th>\n",
|
| 152 |
-
" <th></th>\n",
|
| 153 |
-
" <th></th>\n",
|
| 154 |
-
" <th></th>\n",
|
| 155 |
-
" <th></th>\n",
|
| 156 |
-
" <th></th>\n",
|
| 157 |
-
" <th></th>\n",
|
| 158 |
-
" <th></th>\n",
|
| 159 |
-
" <th></th>\n",
|
| 160 |
-
" <th></th>\n",
|
| 161 |
-
" <th></th>\n",
|
| 162 |
-
" <th></th>\n",
|
| 163 |
-
" </tr>\n",
|
| 164 |
-
" </thead>\n",
|
| 165 |
-
" <tbody>\n",
|
| 166 |
-
" <tr>\n",
|
| 167 |
-
" <th>1</th>\n",
|
| 168 |
-
" <td>60</td>\n",
|
| 169 |
-
" <td>RL</td>\n",
|
| 170 |
-
" <td>65.0</td>\n",
|
| 171 |
-
" <td>8450</td>\n",
|
| 172 |
-
" <td>Pave</td>\n",
|
| 173 |
-
" <td>NaN</td>\n",
|
| 174 |
-
" <td>Reg</td>\n",
|
| 175 |
-
" <td>Lvl</td>\n",
|
| 176 |
-
" <td>AllPub</td>\n",
|
| 177 |
-
" <td>Inside</td>\n",
|
| 178 |
-
" <td>...</td>\n",
|
| 179 |
-
" <td>0</td>\n",
|
| 180 |
-
" <td>NaN</td>\n",
|
| 181 |
-
" <td>NaN</td>\n",
|
| 182 |
-
" <td>NaN</td>\n",
|
| 183 |
-
" <td>0</td>\n",
|
| 184 |
-
" <td>2</td>\n",
|
| 185 |
-
" <td>2008</td>\n",
|
| 186 |
-
" <td>WD</td>\n",
|
| 187 |
-
" <td>Normal</td>\n",
|
| 188 |
-
" <td>208500</td>\n",
|
| 189 |
-
" </tr>\n",
|
| 190 |
-
" <tr>\n",
|
| 191 |
-
" <th>2</th>\n",
|
| 192 |
-
" <td>20</td>\n",
|
| 193 |
-
" <td>RL</td>\n",
|
| 194 |
-
" <td>80.0</td>\n",
|
| 195 |
-
" <td>9600</td>\n",
|
| 196 |
-
" <td>Pave</td>\n",
|
| 197 |
-
" <td>NaN</td>\n",
|
| 198 |
-
" <td>Reg</td>\n",
|
| 199 |
-
" <td>Lvl</td>\n",
|
| 200 |
-
" <td>AllPub</td>\n",
|
| 201 |
-
" <td>FR2</td>\n",
|
| 202 |
-
" <td>...</td>\n",
|
| 203 |
-
" <td>0</td>\n",
|
| 204 |
-
" <td>NaN</td>\n",
|
| 205 |
-
" <td>NaN</td>\n",
|
| 206 |
-
" <td>NaN</td>\n",
|
| 207 |
-
" <td>0</td>\n",
|
| 208 |
-
" <td>5</td>\n",
|
| 209 |
-
" <td>2007</td>\n",
|
| 210 |
-
" <td>WD</td>\n",
|
| 211 |
-
" <td>Normal</td>\n",
|
| 212 |
-
" <td>181500</td>\n",
|
| 213 |
-
" </tr>\n",
|
| 214 |
-
" <tr>\n",
|
| 215 |
-
" <th>3</th>\n",
|
| 216 |
-
" <td>60</td>\n",
|
| 217 |
-
" <td>RL</td>\n",
|
| 218 |
-
" <td>68.0</td>\n",
|
| 219 |
-
" <td>11250</td>\n",
|
| 220 |
-
" <td>Pave</td>\n",
|
| 221 |
-
" <td>NaN</td>\n",
|
| 222 |
-
" <td>IR1</td>\n",
|
| 223 |
-
" <td>Lvl</td>\n",
|
| 224 |
-
" <td>AllPub</td>\n",
|
| 225 |
-
" <td>Inside</td>\n",
|
| 226 |
-
" <td>...</td>\n",
|
| 227 |
-
" <td>0</td>\n",
|
| 228 |
-
" <td>NaN</td>\n",
|
| 229 |
-
" <td>NaN</td>\n",
|
| 230 |
-
" <td>NaN</td>\n",
|
| 231 |
-
" <td>0</td>\n",
|
| 232 |
-
" <td>9</td>\n",
|
| 233 |
-
" <td>2008</td>\n",
|
| 234 |
-
" <td>WD</td>\n",
|
| 235 |
-
" <td>Normal</td>\n",
|
| 236 |
-
" <td>223500</td>\n",
|
| 237 |
-
" </tr>\n",
|
| 238 |
-
" <tr>\n",
|
| 239 |
-
" <th>4</th>\n",
|
| 240 |
-
" <td>70</td>\n",
|
| 241 |
-
" <td>RL</td>\n",
|
| 242 |
-
" <td>60.0</td>\n",
|
| 243 |
-
" <td>9550</td>\n",
|
| 244 |
-
" <td>Pave</td>\n",
|
| 245 |
-
" <td>NaN</td>\n",
|
| 246 |
-
" <td>IR1</td>\n",
|
| 247 |
-
" <td>Lvl</td>\n",
|
| 248 |
-
" <td>AllPub</td>\n",
|
| 249 |
-
" <td>Corner</td>\n",
|
| 250 |
-
" <td>...</td>\n",
|
| 251 |
-
" <td>0</td>\n",
|
| 252 |
-
" <td>NaN</td>\n",
|
| 253 |
-
" <td>NaN</td>\n",
|
| 254 |
-
" <td>NaN</td>\n",
|
| 255 |
-
" <td>0</td>\n",
|
| 256 |
-
" <td>2</td>\n",
|
| 257 |
-
" <td>2006</td>\n",
|
| 258 |
-
" <td>WD</td>\n",
|
| 259 |
-
" <td>Abnorml</td>\n",
|
| 260 |
-
" <td>140000</td>\n",
|
| 261 |
-
" </tr>\n",
|
| 262 |
-
" <tr>\n",
|
| 263 |
-
" <th>5</th>\n",
|
| 264 |
-
" <td>60</td>\n",
|
| 265 |
-
" <td>RL</td>\n",
|
| 266 |
-
" <td>84.0</td>\n",
|
| 267 |
-
" <td>14260</td>\n",
|
| 268 |
-
" <td>Pave</td>\n",
|
| 269 |
-
" <td>NaN</td>\n",
|
| 270 |
-
" <td>IR1</td>\n",
|
| 271 |
-
" <td>Lvl</td>\n",
|
| 272 |
-
" <td>AllPub</td>\n",
|
| 273 |
-
" <td>FR2</td>\n",
|
| 274 |
-
" <td>...</td>\n",
|
| 275 |
-
" <td>0</td>\n",
|
| 276 |
-
" <td>NaN</td>\n",
|
| 277 |
-
" <td>NaN</td>\n",
|
| 278 |
-
" <td>NaN</td>\n",
|
| 279 |
-
" <td>0</td>\n",
|
| 280 |
-
" <td>12</td>\n",
|
| 281 |
-
" <td>2008</td>\n",
|
| 282 |
-
" <td>WD</td>\n",
|
| 283 |
-
" <td>Normal</td>\n",
|
| 284 |
-
" <td>250000</td>\n",
|
| 285 |
-
" </tr>\n",
|
| 286 |
-
" <tr>\n",
|
| 287 |
-
" <th>...</th>\n",
|
| 288 |
-
" <td>...</td>\n",
|
| 289 |
-
" <td>...</td>\n",
|
| 290 |
-
" <td>...</td>\n",
|
| 291 |
-
" <td>...</td>\n",
|
| 292 |
-
" <td>...</td>\n",
|
| 293 |
-
" <td>...</td>\n",
|
| 294 |
-
" <td>...</td>\n",
|
| 295 |
-
" <td>...</td>\n",
|
| 296 |
-
" <td>...</td>\n",
|
| 297 |
-
" <td>...</td>\n",
|
| 298 |
-
" <td>...</td>\n",
|
| 299 |
-
" <td>...</td>\n",
|
| 300 |
-
" <td>...</td>\n",
|
| 301 |
-
" <td>...</td>\n",
|
| 302 |
-
" <td>...</td>\n",
|
| 303 |
-
" <td>...</td>\n",
|
| 304 |
-
" <td>...</td>\n",
|
| 305 |
-
" <td>...</td>\n",
|
| 306 |
-
" <td>...</td>\n",
|
| 307 |
-
" <td>...</td>\n",
|
| 308 |
-
" <td>...</td>\n",
|
| 309 |
-
" </tr>\n",
|
| 310 |
-
" <tr>\n",
|
| 311 |
-
" <th>1456</th>\n",
|
| 312 |
-
" <td>60</td>\n",
|
| 313 |
-
" <td>RL</td>\n",
|
| 314 |
-
" <td>62.0</td>\n",
|
| 315 |
-
" <td>7917</td>\n",
|
| 316 |
-
" <td>Pave</td>\n",
|
| 317 |
-
" <td>NaN</td>\n",
|
| 318 |
-
" <td>Reg</td>\n",
|
| 319 |
-
" <td>Lvl</td>\n",
|
| 320 |
-
" <td>AllPub</td>\n",
|
| 321 |
-
" <td>Inside</td>\n",
|
| 322 |
-
" <td>...</td>\n",
|
| 323 |
-
" <td>0</td>\n",
|
| 324 |
-
" <td>NaN</td>\n",
|
| 325 |
-
" <td>NaN</td>\n",
|
| 326 |
-
" <td>NaN</td>\n",
|
| 327 |
-
" <td>0</td>\n",
|
| 328 |
-
" <td>8</td>\n",
|
| 329 |
-
" <td>2007</td>\n",
|
| 330 |
-
" <td>WD</td>\n",
|
| 331 |
-
" <td>Normal</td>\n",
|
| 332 |
-
" <td>175000</td>\n",
|
| 333 |
-
" </tr>\n",
|
| 334 |
-
" <tr>\n",
|
| 335 |
-
" <th>1457</th>\n",
|
| 336 |
-
" <td>20</td>\n",
|
| 337 |
-
" <td>RL</td>\n",
|
| 338 |
-
" <td>85.0</td>\n",
|
| 339 |
-
" <td>13175</td>\n",
|
| 340 |
-
" <td>Pave</td>\n",
|
| 341 |
-
" <td>NaN</td>\n",
|
| 342 |
-
" <td>Reg</td>\n",
|
| 343 |
-
" <td>Lvl</td>\n",
|
| 344 |
-
" <td>AllPub</td>\n",
|
| 345 |
-
" <td>Inside</td>\n",
|
| 346 |
-
" <td>...</td>\n",
|
| 347 |
-
" <td>0</td>\n",
|
| 348 |
-
" <td>NaN</td>\n",
|
| 349 |
-
" <td>MnPrv</td>\n",
|
| 350 |
-
" <td>NaN</td>\n",
|
| 351 |
-
" <td>0</td>\n",
|
| 352 |
-
" <td>2</td>\n",
|
| 353 |
-
" <td>2010</td>\n",
|
| 354 |
-
" <td>WD</td>\n",
|
| 355 |
-
" <td>Normal</td>\n",
|
| 356 |
-
" <td>210000</td>\n",
|
| 357 |
-
" </tr>\n",
|
| 358 |
-
" <tr>\n",
|
| 359 |
-
" <th>1458</th>\n",
|
| 360 |
-
" <td>70</td>\n",
|
| 361 |
-
" <td>RL</td>\n",
|
| 362 |
-
" <td>66.0</td>\n",
|
| 363 |
-
" <td>9042</td>\n",
|
| 364 |
-
" <td>Pave</td>\n",
|
| 365 |
-
" <td>NaN</td>\n",
|
| 366 |
-
" <td>Reg</td>\n",
|
| 367 |
-
" <td>Lvl</td>\n",
|
| 368 |
-
" <td>AllPub</td>\n",
|
| 369 |
-
" <td>Inside</td>\n",
|
| 370 |
-
" <td>...</td>\n",
|
| 371 |
-
" <td>0</td>\n",
|
| 372 |
-
" <td>NaN</td>\n",
|
| 373 |
-
" <td>GdPrv</td>\n",
|
| 374 |
-
" <td>Shed</td>\n",
|
| 375 |
-
" <td>2500</td>\n",
|
| 376 |
-
" <td>5</td>\n",
|
| 377 |
-
" <td>2010</td>\n",
|
| 378 |
-
" <td>WD</td>\n",
|
| 379 |
-
" <td>Normal</td>\n",
|
| 380 |
-
" <td>266500</td>\n",
|
| 381 |
-
" </tr>\n",
|
| 382 |
-
" <tr>\n",
|
| 383 |
-
" <th>1459</th>\n",
|
| 384 |
-
" <td>20</td>\n",
|
| 385 |
-
" <td>RL</td>\n",
|
| 386 |
-
" <td>68.0</td>\n",
|
| 387 |
-
" <td>9717</td>\n",
|
| 388 |
-
" <td>Pave</td>\n",
|
| 389 |
-
" <td>NaN</td>\n",
|
| 390 |
-
" <td>Reg</td>\n",
|
| 391 |
-
" <td>Lvl</td>\n",
|
| 392 |
-
" <td>AllPub</td>\n",
|
| 393 |
-
" <td>Inside</td>\n",
|
| 394 |
-
" <td>...</td>\n",
|
| 395 |
-
" <td>0</td>\n",
|
| 396 |
-
" <td>NaN</td>\n",
|
| 397 |
-
" <td>NaN</td>\n",
|
| 398 |
-
" <td>NaN</td>\n",
|
| 399 |
-
" <td>0</td>\n",
|
| 400 |
-
" <td>4</td>\n",
|
| 401 |
-
" <td>2010</td>\n",
|
| 402 |
-
" <td>WD</td>\n",
|
| 403 |
-
" <td>Normal</td>\n",
|
| 404 |
-
" <td>142125</td>\n",
|
| 405 |
-
" </tr>\n",
|
| 406 |
-
" <tr>\n",
|
| 407 |
-
" <th>1460</th>\n",
|
| 408 |
-
" <td>20</td>\n",
|
| 409 |
-
" <td>RL</td>\n",
|
| 410 |
-
" <td>75.0</td>\n",
|
| 411 |
-
" <td>9937</td>\n",
|
| 412 |
-
" <td>Pave</td>\n",
|
| 413 |
-
" <td>NaN</td>\n",
|
| 414 |
-
" <td>Reg</td>\n",
|
| 415 |
-
" <td>Lvl</td>\n",
|
| 416 |
-
" <td>AllPub</td>\n",
|
| 417 |
-
" <td>Inside</td>\n",
|
| 418 |
-
" <td>...</td>\n",
|
| 419 |
-
" <td>0</td>\n",
|
| 420 |
-
" <td>NaN</td>\n",
|
| 421 |
-
" <td>NaN</td>\n",
|
| 422 |
-
" <td>NaN</td>\n",
|
| 423 |
-
" <td>0</td>\n",
|
| 424 |
-
" <td>6</td>\n",
|
| 425 |
-
" <td>2008</td>\n",
|
| 426 |
-
" <td>WD</td>\n",
|
| 427 |
-
" <td>Normal</td>\n",
|
| 428 |
-
" <td>147500</td>\n",
|
| 429 |
-
" </tr>\n",
|
| 430 |
-
" </tbody>\n",
|
| 431 |
-
"</table>\n",
|
| 432 |
-
"<p>1460 rows × 80 columns</p>\n",
|
| 433 |
-
"</div>"
|
| 434 |
-
],
|
| 435 |
-
"text/plain": [
|
| 436 |
-
" MSSubClass MSZoning LotFrontage LotArea Street Alley LotShape \\\n",
|
| 437 |
-
"Id \n",
|
| 438 |
-
"1 60 RL 65.0 8450 Pave NaN Reg \n",
|
| 439 |
-
"2 20 RL 80.0 9600 Pave NaN Reg \n",
|
| 440 |
-
"3 60 RL 68.0 11250 Pave NaN IR1 \n",
|
| 441 |
-
"4 70 RL 60.0 9550 Pave NaN IR1 \n",
|
| 442 |
-
"5 60 RL 84.0 14260 Pave NaN IR1 \n",
|
| 443 |
-
"... ... ... ... ... ... ... ... \n",
|
| 444 |
-
"1456 60 RL 62.0 7917 Pave NaN Reg \n",
|
| 445 |
-
"1457 20 RL 85.0 13175 Pave NaN Reg \n",
|
| 446 |
-
"1458 70 RL 66.0 9042 Pave NaN Reg \n",
|
| 447 |
-
"1459 20 RL 68.0 9717 Pave NaN Reg \n",
|
| 448 |
-
"1460 20 RL 75.0 9937 Pave NaN Reg \n",
|
| 449 |
-
"\n",
|
| 450 |
-
" LandContour Utilities LotConfig ... PoolArea PoolQC Fence MiscFeature \\\n",
|
| 451 |
-
"Id ... \n",
|
| 452 |
-
"1 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 453 |
-
"2 Lvl AllPub FR2 ... 0 NaN NaN NaN \n",
|
| 454 |
-
"3 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 455 |
-
"4 Lvl AllPub Corner ... 0 NaN NaN NaN \n",
|
| 456 |
-
"5 Lvl AllPub FR2 ... 0 NaN NaN NaN \n",
|
| 457 |
-
"... ... ... ... ... ... ... ... ... \n",
|
| 458 |
-
"1456 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 459 |
-
"1457 Lvl AllPub Inside ... 0 NaN MnPrv NaN \n",
|
| 460 |
-
"1458 Lvl AllPub Inside ... 0 NaN GdPrv Shed \n",
|
| 461 |
-
"1459 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 462 |
-
"1460 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 463 |
-
"\n",
|
| 464 |
-
" MiscVal MoSold YrSold SaleType SaleCondition SalePrice \n",
|
| 465 |
-
"Id \n",
|
| 466 |
-
"1 0 2 2008 WD Normal 208500 \n",
|
| 467 |
-
"2 0 5 2007 WD Normal 181500 \n",
|
| 468 |
-
"3 0 9 2008 WD Normal 223500 \n",
|
| 469 |
-
"4 0 2 2006 WD Abnorml 140000 \n",
|
| 470 |
-
"5 0 12 2008 WD Normal 250000 \n",
|
| 471 |
-
"... ... ... ... ... ... ... \n",
|
| 472 |
-
"1456 0 8 2007 WD Normal 175000 \n",
|
| 473 |
-
"1457 0 2 2010 WD Normal 210000 \n",
|
| 474 |
-
"1458 2500 5 2010 WD Normal 266500 \n",
|
| 475 |
-
"1459 0 4 2010 WD Normal 142125 \n",
|
| 476 |
-
"1460 0 6 2008 WD Normal 147500 \n",
|
| 477 |
-
"\n",
|
| 478 |
-
"[1460 rows x 80 columns]"
|
| 479 |
-
]
|
| 480 |
-
},
|
| 481 |
-
"execution_count": 3,
|
| 482 |
-
"metadata": {},
|
| 483 |
-
"output_type": "execute_result"
|
| 484 |
-
}
|
| 485 |
-
],
|
| 486 |
"source": [
|
| 487 |
"train_df"
|
| 488 |
]
|
|
@@ -927,7 +538,7 @@
|
|
| 927 |
},
|
| 928 |
{
|
| 929 |
"cell_type": "code",
|
| 930 |
-
"execution_count":
|
| 931 |
"metadata": {
|
| 932 |
"execution": {
|
| 933 |
"iopub.execute_input": "2023-06-02T12:01:20.884031Z",
|
|
@@ -1183,7 +794,7 @@
|
|
| 1183 |
"SalePrice 1459 49.98"
|
| 1184 |
]
|
| 1185 |
},
|
| 1186 |
-
"execution_count":
|
| 1187 |
"metadata": {},
|
| 1188 |
"output_type": "execute_result"
|
| 1189 |
}
|
|
@@ -1198,7 +809,7 @@
|
|
| 1198 |
},
|
| 1199 |
{
|
| 1200 |
"cell_type": "code",
|
| 1201 |
-
"execution_count":
|
| 1202 |
"metadata": {
|
| 1203 |
"execution": {
|
| 1204 |
"iopub.execute_input": "2023-06-02T12:02:21.469961Z",
|
|
|
|
| 83 |
},
|
| 84 |
{
|
| 85 |
"cell_type": "code",
|
| 86 |
+
"execution_count": null,
|
| 87 |
"metadata": {
|
| 88 |
"execution": {
|
| 89 |
"iopub.execute_input": "2023-06-02T11:50:31.684884Z",
|
|
|
|
| 93 |
"shell.execute_reply.started": "2023-06-02T11:50:31.684847Z"
|
| 94 |
}
|
| 95 |
},
|
| 96 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
"source": [
|
| 98 |
"train_df"
|
| 99 |
]
|
|
|
|
| 538 |
},
|
| 539 |
{
|
| 540 |
"cell_type": "code",
|
| 541 |
+
"execution_count": 3,
|
| 542 |
"metadata": {
|
| 543 |
"execution": {
|
| 544 |
"iopub.execute_input": "2023-06-02T12:01:20.884031Z",
|
|
|
|
| 794 |
"SalePrice 1459 49.98"
|
| 795 |
]
|
| 796 |
},
|
| 797 |
+
"execution_count": 3,
|
| 798 |
"metadata": {},
|
| 799 |
"output_type": "execute_result"
|
| 800 |
}
|
|
|
|
| 809 |
},
|
| 810 |
{
|
| 811 |
"cell_type": "code",
|
| 812 |
+
"execution_count": 4,
|
| 813 |
"metadata": {
|
| 814 |
"execution": {
|
| 815 |
"iopub.execute_input": "2023-06-02T12:02:21.469961Z",
|
benchmark/pandas_2/pandas_2_reproduced.ipynb
CHANGED
|
@@ -83,7 +83,7 @@
|
|
| 83 |
},
|
| 84 |
{
|
| 85 |
"cell_type": "code",
|
| 86 |
-
"execution_count":
|
| 87 |
"metadata": {
|
| 88 |
"execution": {
|
| 89 |
"iopub.execute_input": "2023-06-02T11:50:31.684884Z",
|
|
@@ -93,396 +93,7 @@
|
|
| 93 |
"shell.execute_reply.started": "2023-06-02T11:50:31.684847Z"
|
| 94 |
}
|
| 95 |
},
|
| 96 |
-
"outputs": [
|
| 97 |
-
{
|
| 98 |
-
"data": {
|
| 99 |
-
"text/html": [
|
| 100 |
-
"<div>\n",
|
| 101 |
-
"<style scoped>\n",
|
| 102 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 103 |
-
" vertical-align: middle;\n",
|
| 104 |
-
" }\n",
|
| 105 |
-
"\n",
|
| 106 |
-
" .dataframe tbody tr th {\n",
|
| 107 |
-
" vertical-align: top;\n",
|
| 108 |
-
" }\n",
|
| 109 |
-
"\n",
|
| 110 |
-
" .dataframe thead th {\n",
|
| 111 |
-
" text-align: right;\n",
|
| 112 |
-
" }\n",
|
| 113 |
-
"</style>\n",
|
| 114 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 115 |
-
" <thead>\n",
|
| 116 |
-
" <tr style=\"text-align: right;\">\n",
|
| 117 |
-
" <th></th>\n",
|
| 118 |
-
" <th>MSSubClass</th>\n",
|
| 119 |
-
" <th>MSZoning</th>\n",
|
| 120 |
-
" <th>LotFrontage</th>\n",
|
| 121 |
-
" <th>LotArea</th>\n",
|
| 122 |
-
" <th>Street</th>\n",
|
| 123 |
-
" <th>Alley</th>\n",
|
| 124 |
-
" <th>LotShape</th>\n",
|
| 125 |
-
" <th>LandContour</th>\n",
|
| 126 |
-
" <th>Utilities</th>\n",
|
| 127 |
-
" <th>LotConfig</th>\n",
|
| 128 |
-
" <th>...</th>\n",
|
| 129 |
-
" <th>PoolArea</th>\n",
|
| 130 |
-
" <th>PoolQC</th>\n",
|
| 131 |
-
" <th>Fence</th>\n",
|
| 132 |
-
" <th>MiscFeature</th>\n",
|
| 133 |
-
" <th>MiscVal</th>\n",
|
| 134 |
-
" <th>MoSold</th>\n",
|
| 135 |
-
" <th>YrSold</th>\n",
|
| 136 |
-
" <th>SaleType</th>\n",
|
| 137 |
-
" <th>SaleCondition</th>\n",
|
| 138 |
-
" <th>SalePrice</th>\n",
|
| 139 |
-
" </tr>\n",
|
| 140 |
-
" <tr>\n",
|
| 141 |
-
" <th>Id</th>\n",
|
| 142 |
-
" <th></th>\n",
|
| 143 |
-
" <th></th>\n",
|
| 144 |
-
" <th></th>\n",
|
| 145 |
-
" <th></th>\n",
|
| 146 |
-
" <th></th>\n",
|
| 147 |
-
" <th></th>\n",
|
| 148 |
-
" <th></th>\n",
|
| 149 |
-
" <th></th>\n",
|
| 150 |
-
" <th></th>\n",
|
| 151 |
-
" <th></th>\n",
|
| 152 |
-
" <th></th>\n",
|
| 153 |
-
" <th></th>\n",
|
| 154 |
-
" <th></th>\n",
|
| 155 |
-
" <th></th>\n",
|
| 156 |
-
" <th></th>\n",
|
| 157 |
-
" <th></th>\n",
|
| 158 |
-
" <th></th>\n",
|
| 159 |
-
" <th></th>\n",
|
| 160 |
-
" <th></th>\n",
|
| 161 |
-
" <th></th>\n",
|
| 162 |
-
" <th></th>\n",
|
| 163 |
-
" </tr>\n",
|
| 164 |
-
" </thead>\n",
|
| 165 |
-
" <tbody>\n",
|
| 166 |
-
" <tr>\n",
|
| 167 |
-
" <th>1</th>\n",
|
| 168 |
-
" <td>60</td>\n",
|
| 169 |
-
" <td>RL</td>\n",
|
| 170 |
-
" <td>65.0</td>\n",
|
| 171 |
-
" <td>8450</td>\n",
|
| 172 |
-
" <td>Pave</td>\n",
|
| 173 |
-
" <td>NaN</td>\n",
|
| 174 |
-
" <td>Reg</td>\n",
|
| 175 |
-
" <td>Lvl</td>\n",
|
| 176 |
-
" <td>AllPub</td>\n",
|
| 177 |
-
" <td>Inside</td>\n",
|
| 178 |
-
" <td>...</td>\n",
|
| 179 |
-
" <td>0</td>\n",
|
| 180 |
-
" <td>NaN</td>\n",
|
| 181 |
-
" <td>NaN</td>\n",
|
| 182 |
-
" <td>NaN</td>\n",
|
| 183 |
-
" <td>0</td>\n",
|
| 184 |
-
" <td>2</td>\n",
|
| 185 |
-
" <td>2008</td>\n",
|
| 186 |
-
" <td>WD</td>\n",
|
| 187 |
-
" <td>Normal</td>\n",
|
| 188 |
-
" <td>208500</td>\n",
|
| 189 |
-
" </tr>\n",
|
| 190 |
-
" <tr>\n",
|
| 191 |
-
" <th>2</th>\n",
|
| 192 |
-
" <td>20</td>\n",
|
| 193 |
-
" <td>RL</td>\n",
|
| 194 |
-
" <td>80.0</td>\n",
|
| 195 |
-
" <td>9600</td>\n",
|
| 196 |
-
" <td>Pave</td>\n",
|
| 197 |
-
" <td>NaN</td>\n",
|
| 198 |
-
" <td>Reg</td>\n",
|
| 199 |
-
" <td>Lvl</td>\n",
|
| 200 |
-
" <td>AllPub</td>\n",
|
| 201 |
-
" <td>FR2</td>\n",
|
| 202 |
-
" <td>...</td>\n",
|
| 203 |
-
" <td>0</td>\n",
|
| 204 |
-
" <td>NaN</td>\n",
|
| 205 |
-
" <td>NaN</td>\n",
|
| 206 |
-
" <td>NaN</td>\n",
|
| 207 |
-
" <td>0</td>\n",
|
| 208 |
-
" <td>5</td>\n",
|
| 209 |
-
" <td>2007</td>\n",
|
| 210 |
-
" <td>WD</td>\n",
|
| 211 |
-
" <td>Normal</td>\n",
|
| 212 |
-
" <td>181500</td>\n",
|
| 213 |
-
" </tr>\n",
|
| 214 |
-
" <tr>\n",
|
| 215 |
-
" <th>3</th>\n",
|
| 216 |
-
" <td>60</td>\n",
|
| 217 |
-
" <td>RL</td>\n",
|
| 218 |
-
" <td>68.0</td>\n",
|
| 219 |
-
" <td>11250</td>\n",
|
| 220 |
-
" <td>Pave</td>\n",
|
| 221 |
-
" <td>NaN</td>\n",
|
| 222 |
-
" <td>IR1</td>\n",
|
| 223 |
-
" <td>Lvl</td>\n",
|
| 224 |
-
" <td>AllPub</td>\n",
|
| 225 |
-
" <td>Inside</td>\n",
|
| 226 |
-
" <td>...</td>\n",
|
| 227 |
-
" <td>0</td>\n",
|
| 228 |
-
" <td>NaN</td>\n",
|
| 229 |
-
" <td>NaN</td>\n",
|
| 230 |
-
" <td>NaN</td>\n",
|
| 231 |
-
" <td>0</td>\n",
|
| 232 |
-
" <td>9</td>\n",
|
| 233 |
-
" <td>2008</td>\n",
|
| 234 |
-
" <td>WD</td>\n",
|
| 235 |
-
" <td>Normal</td>\n",
|
| 236 |
-
" <td>223500</td>\n",
|
| 237 |
-
" </tr>\n",
|
| 238 |
-
" <tr>\n",
|
| 239 |
-
" <th>4</th>\n",
|
| 240 |
-
" <td>70</td>\n",
|
| 241 |
-
" <td>RL</td>\n",
|
| 242 |
-
" <td>60.0</td>\n",
|
| 243 |
-
" <td>9550</td>\n",
|
| 244 |
-
" <td>Pave</td>\n",
|
| 245 |
-
" <td>NaN</td>\n",
|
| 246 |
-
" <td>IR1</td>\n",
|
| 247 |
-
" <td>Lvl</td>\n",
|
| 248 |
-
" <td>AllPub</td>\n",
|
| 249 |
-
" <td>Corner</td>\n",
|
| 250 |
-
" <td>...</td>\n",
|
| 251 |
-
" <td>0</td>\n",
|
| 252 |
-
" <td>NaN</td>\n",
|
| 253 |
-
" <td>NaN</td>\n",
|
| 254 |
-
" <td>NaN</td>\n",
|
| 255 |
-
" <td>0</td>\n",
|
| 256 |
-
" <td>2</td>\n",
|
| 257 |
-
" <td>2006</td>\n",
|
| 258 |
-
" <td>WD</td>\n",
|
| 259 |
-
" <td>Abnorml</td>\n",
|
| 260 |
-
" <td>140000</td>\n",
|
| 261 |
-
" </tr>\n",
|
| 262 |
-
" <tr>\n",
|
| 263 |
-
" <th>5</th>\n",
|
| 264 |
-
" <td>60</td>\n",
|
| 265 |
-
" <td>RL</td>\n",
|
| 266 |
-
" <td>84.0</td>\n",
|
| 267 |
-
" <td>14260</td>\n",
|
| 268 |
-
" <td>Pave</td>\n",
|
| 269 |
-
" <td>NaN</td>\n",
|
| 270 |
-
" <td>IR1</td>\n",
|
| 271 |
-
" <td>Lvl</td>\n",
|
| 272 |
-
" <td>AllPub</td>\n",
|
| 273 |
-
" <td>FR2</td>\n",
|
| 274 |
-
" <td>...</td>\n",
|
| 275 |
-
" <td>0</td>\n",
|
| 276 |
-
" <td>NaN</td>\n",
|
| 277 |
-
" <td>NaN</td>\n",
|
| 278 |
-
" <td>NaN</td>\n",
|
| 279 |
-
" <td>0</td>\n",
|
| 280 |
-
" <td>12</td>\n",
|
| 281 |
-
" <td>2008</td>\n",
|
| 282 |
-
" <td>WD</td>\n",
|
| 283 |
-
" <td>Normal</td>\n",
|
| 284 |
-
" <td>250000</td>\n",
|
| 285 |
-
" </tr>\n",
|
| 286 |
-
" <tr>\n",
|
| 287 |
-
" <th>...</th>\n",
|
| 288 |
-
" <td>...</td>\n",
|
| 289 |
-
" <td>...</td>\n",
|
| 290 |
-
" <td>...</td>\n",
|
| 291 |
-
" <td>...</td>\n",
|
| 292 |
-
" <td>...</td>\n",
|
| 293 |
-
" <td>...</td>\n",
|
| 294 |
-
" <td>...</td>\n",
|
| 295 |
-
" <td>...</td>\n",
|
| 296 |
-
" <td>...</td>\n",
|
| 297 |
-
" <td>...</td>\n",
|
| 298 |
-
" <td>...</td>\n",
|
| 299 |
-
" <td>...</td>\n",
|
| 300 |
-
" <td>...</td>\n",
|
| 301 |
-
" <td>...</td>\n",
|
| 302 |
-
" <td>...</td>\n",
|
| 303 |
-
" <td>...</td>\n",
|
| 304 |
-
" <td>...</td>\n",
|
| 305 |
-
" <td>...</td>\n",
|
| 306 |
-
" <td>...</td>\n",
|
| 307 |
-
" <td>...</td>\n",
|
| 308 |
-
" <td>...</td>\n",
|
| 309 |
-
" </tr>\n",
|
| 310 |
-
" <tr>\n",
|
| 311 |
-
" <th>1456</th>\n",
|
| 312 |
-
" <td>60</td>\n",
|
| 313 |
-
" <td>RL</td>\n",
|
| 314 |
-
" <td>62.0</td>\n",
|
| 315 |
-
" <td>7917</td>\n",
|
| 316 |
-
" <td>Pave</td>\n",
|
| 317 |
-
" <td>NaN</td>\n",
|
| 318 |
-
" <td>Reg</td>\n",
|
| 319 |
-
" <td>Lvl</td>\n",
|
| 320 |
-
" <td>AllPub</td>\n",
|
| 321 |
-
" <td>Inside</td>\n",
|
| 322 |
-
" <td>...</td>\n",
|
| 323 |
-
" <td>0</td>\n",
|
| 324 |
-
" <td>NaN</td>\n",
|
| 325 |
-
" <td>NaN</td>\n",
|
| 326 |
-
" <td>NaN</td>\n",
|
| 327 |
-
" <td>0</td>\n",
|
| 328 |
-
" <td>8</td>\n",
|
| 329 |
-
" <td>2007</td>\n",
|
| 330 |
-
" <td>WD</td>\n",
|
| 331 |
-
" <td>Normal</td>\n",
|
| 332 |
-
" <td>175000</td>\n",
|
| 333 |
-
" </tr>\n",
|
| 334 |
-
" <tr>\n",
|
| 335 |
-
" <th>1457</th>\n",
|
| 336 |
-
" <td>20</td>\n",
|
| 337 |
-
" <td>RL</td>\n",
|
| 338 |
-
" <td>85.0</td>\n",
|
| 339 |
-
" <td>13175</td>\n",
|
| 340 |
-
" <td>Pave</td>\n",
|
| 341 |
-
" <td>NaN</td>\n",
|
| 342 |
-
" <td>Reg</td>\n",
|
| 343 |
-
" <td>Lvl</td>\n",
|
| 344 |
-
" <td>AllPub</td>\n",
|
| 345 |
-
" <td>Inside</td>\n",
|
| 346 |
-
" <td>...</td>\n",
|
| 347 |
-
" <td>0</td>\n",
|
| 348 |
-
" <td>NaN</td>\n",
|
| 349 |
-
" <td>MnPrv</td>\n",
|
| 350 |
-
" <td>NaN</td>\n",
|
| 351 |
-
" <td>0</td>\n",
|
| 352 |
-
" <td>2</td>\n",
|
| 353 |
-
" <td>2010</td>\n",
|
| 354 |
-
" <td>WD</td>\n",
|
| 355 |
-
" <td>Normal</td>\n",
|
| 356 |
-
" <td>210000</td>\n",
|
| 357 |
-
" </tr>\n",
|
| 358 |
-
" <tr>\n",
|
| 359 |
-
" <th>1458</th>\n",
|
| 360 |
-
" <td>70</td>\n",
|
| 361 |
-
" <td>RL</td>\n",
|
| 362 |
-
" <td>66.0</td>\n",
|
| 363 |
-
" <td>9042</td>\n",
|
| 364 |
-
" <td>Pave</td>\n",
|
| 365 |
-
" <td>NaN</td>\n",
|
| 366 |
-
" <td>Reg</td>\n",
|
| 367 |
-
" <td>Lvl</td>\n",
|
| 368 |
-
" <td>AllPub</td>\n",
|
| 369 |
-
" <td>Inside</td>\n",
|
| 370 |
-
" <td>...</td>\n",
|
| 371 |
-
" <td>0</td>\n",
|
| 372 |
-
" <td>NaN</td>\n",
|
| 373 |
-
" <td>GdPrv</td>\n",
|
| 374 |
-
" <td>Shed</td>\n",
|
| 375 |
-
" <td>2500</td>\n",
|
| 376 |
-
" <td>5</td>\n",
|
| 377 |
-
" <td>2010</td>\n",
|
| 378 |
-
" <td>WD</td>\n",
|
| 379 |
-
" <td>Normal</td>\n",
|
| 380 |
-
" <td>266500</td>\n",
|
| 381 |
-
" </tr>\n",
|
| 382 |
-
" <tr>\n",
|
| 383 |
-
" <th>1459</th>\n",
|
| 384 |
-
" <td>20</td>\n",
|
| 385 |
-
" <td>RL</td>\n",
|
| 386 |
-
" <td>68.0</td>\n",
|
| 387 |
-
" <td>9717</td>\n",
|
| 388 |
-
" <td>Pave</td>\n",
|
| 389 |
-
" <td>NaN</td>\n",
|
| 390 |
-
" <td>Reg</td>\n",
|
| 391 |
-
" <td>Lvl</td>\n",
|
| 392 |
-
" <td>AllPub</td>\n",
|
| 393 |
-
" <td>Inside</td>\n",
|
| 394 |
-
" <td>...</td>\n",
|
| 395 |
-
" <td>0</td>\n",
|
| 396 |
-
" <td>NaN</td>\n",
|
| 397 |
-
" <td>NaN</td>\n",
|
| 398 |
-
" <td>NaN</td>\n",
|
| 399 |
-
" <td>0</td>\n",
|
| 400 |
-
" <td>4</td>\n",
|
| 401 |
-
" <td>2010</td>\n",
|
| 402 |
-
" <td>WD</td>\n",
|
| 403 |
-
" <td>Normal</td>\n",
|
| 404 |
-
" <td>142125</td>\n",
|
| 405 |
-
" </tr>\n",
|
| 406 |
-
" <tr>\n",
|
| 407 |
-
" <th>1460</th>\n",
|
| 408 |
-
" <td>20</td>\n",
|
| 409 |
-
" <td>RL</td>\n",
|
| 410 |
-
" <td>75.0</td>\n",
|
| 411 |
-
" <td>9937</td>\n",
|
| 412 |
-
" <td>Pave</td>\n",
|
| 413 |
-
" <td>NaN</td>\n",
|
| 414 |
-
" <td>Reg</td>\n",
|
| 415 |
-
" <td>Lvl</td>\n",
|
| 416 |
-
" <td>AllPub</td>\n",
|
| 417 |
-
" <td>Inside</td>\n",
|
| 418 |
-
" <td>...</td>\n",
|
| 419 |
-
" <td>0</td>\n",
|
| 420 |
-
" <td>NaN</td>\n",
|
| 421 |
-
" <td>NaN</td>\n",
|
| 422 |
-
" <td>NaN</td>\n",
|
| 423 |
-
" <td>0</td>\n",
|
| 424 |
-
" <td>6</td>\n",
|
| 425 |
-
" <td>2008</td>\n",
|
| 426 |
-
" <td>WD</td>\n",
|
| 427 |
-
" <td>Normal</td>\n",
|
| 428 |
-
" <td>147500</td>\n",
|
| 429 |
-
" </tr>\n",
|
| 430 |
-
" </tbody>\n",
|
| 431 |
-
"</table>\n",
|
| 432 |
-
"<p>1460 rows × 80 columns</p>\n",
|
| 433 |
-
"</div>"
|
| 434 |
-
],
|
| 435 |
-
"text/plain": [
|
| 436 |
-
" MSSubClass MSZoning LotFrontage LotArea Street Alley LotShape \\\n",
|
| 437 |
-
"Id \n",
|
| 438 |
-
"1 60 RL 65.0 8450 Pave NaN Reg \n",
|
| 439 |
-
"2 20 RL 80.0 9600 Pave NaN Reg \n",
|
| 440 |
-
"3 60 RL 68.0 11250 Pave NaN IR1 \n",
|
| 441 |
-
"4 70 RL 60.0 9550 Pave NaN IR1 \n",
|
| 442 |
-
"5 60 RL 84.0 14260 Pave NaN IR1 \n",
|
| 443 |
-
"... ... ... ... ... ... ... ... \n",
|
| 444 |
-
"1456 60 RL 62.0 7917 Pave NaN Reg \n",
|
| 445 |
-
"1457 20 RL 85.0 13175 Pave NaN Reg \n",
|
| 446 |
-
"1458 70 RL 66.0 9042 Pave NaN Reg \n",
|
| 447 |
-
"1459 20 RL 68.0 9717 Pave NaN Reg \n",
|
| 448 |
-
"1460 20 RL 75.0 9937 Pave NaN Reg \n",
|
| 449 |
-
"\n",
|
| 450 |
-
" LandContour Utilities LotConfig ... PoolArea PoolQC Fence MiscFeature \\\n",
|
| 451 |
-
"Id ... \n",
|
| 452 |
-
"1 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 453 |
-
"2 Lvl AllPub FR2 ... 0 NaN NaN NaN \n",
|
| 454 |
-
"3 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 455 |
-
"4 Lvl AllPub Corner ... 0 NaN NaN NaN \n",
|
| 456 |
-
"5 Lvl AllPub FR2 ... 0 NaN NaN NaN \n",
|
| 457 |
-
"... ... ... ... ... ... ... ... ... \n",
|
| 458 |
-
"1456 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 459 |
-
"1457 Lvl AllPub Inside ... 0 NaN MnPrv NaN \n",
|
| 460 |
-
"1458 Lvl AllPub Inside ... 0 NaN GdPrv Shed \n",
|
| 461 |
-
"1459 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 462 |
-
"1460 Lvl AllPub Inside ... 0 NaN NaN NaN \n",
|
| 463 |
-
"\n",
|
| 464 |
-
" MiscVal MoSold YrSold SaleType SaleCondition SalePrice \n",
|
| 465 |
-
"Id \n",
|
| 466 |
-
"1 0 2 2008 WD Normal 208500 \n",
|
| 467 |
-
"2 0 5 2007 WD Normal 181500 \n",
|
| 468 |
-
"3 0 9 2008 WD Normal 223500 \n",
|
| 469 |
-
"4 0 2 2006 WD Abnorml 140000 \n",
|
| 470 |
-
"5 0 12 2008 WD Normal 250000 \n",
|
| 471 |
-
"... ... ... ... ... ... ... \n",
|
| 472 |
-
"1456 0 8 2007 WD Normal 175000 \n",
|
| 473 |
-
"1457 0 2 2010 WD Normal 210000 \n",
|
| 474 |
-
"1458 2500 5 2010 WD Normal 266500 \n",
|
| 475 |
-
"1459 0 4 2010 WD Normal 142125 \n",
|
| 476 |
-
"1460 0 6 2008 WD Normal 147500 \n",
|
| 477 |
-
"\n",
|
| 478 |
-
"[1460 rows x 80 columns]"
|
| 479 |
-
]
|
| 480 |
-
},
|
| 481 |
-
"execution_count": 3,
|
| 482 |
-
"metadata": {},
|
| 483 |
-
"output_type": "execute_result"
|
| 484 |
-
}
|
| 485 |
-
],
|
| 486 |
"source": [
|
| 487 |
"train_df"
|
| 488 |
]
|
|
@@ -927,7 +538,7 @@
|
|
| 927 |
},
|
| 928 |
{
|
| 929 |
"cell_type": "code",
|
| 930 |
-
"execution_count":
|
| 931 |
"metadata": {
|
| 932 |
"execution": {
|
| 933 |
"iopub.execute_input": "2023-06-02T12:01:20.884031Z",
|
|
@@ -1183,7 +794,7 @@
|
|
| 1183 |
"SalePrice 1459 49.98"
|
| 1184 |
]
|
| 1185 |
},
|
| 1186 |
-
"execution_count":
|
| 1187 |
"metadata": {},
|
| 1188 |
"output_type": "execute_result"
|
| 1189 |
}
|
|
@@ -1198,7 +809,7 @@
|
|
| 1198 |
},
|
| 1199 |
{
|
| 1200 |
"cell_type": "code",
|
| 1201 |
-
"execution_count":
|
| 1202 |
"metadata": {
|
| 1203 |
"execution": {
|
| 1204 |
"iopub.execute_input": "2023-06-02T12:02:21.469961Z",
|
|
@@ -1216,7 +827,7 @@
|
|
| 1216 |
"traceback": [
|
| 1217 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1218 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 1219 |
-
"\u001b[0;32m<ipython-input-
|
| 1220 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36mdrop\u001b[0;34m(self, labels, axis, index, columns, level, inplace, errors)\u001b[0m\n\u001b[1;32m 5342\u001b[0m \u001b[0mweight\u001b[0m \u001b[0;36m1.0\u001b[0m \u001b[0;36m0.8\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5343\u001b[0m \"\"\"\n\u001b[0;32m-> 5344\u001b[0;31m return super().drop(\n\u001b[0m\u001b[1;32m 5345\u001b[0m \u001b[0mlabels\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5346\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1221 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mdrop\u001b[0;34m(self, labels, axis, index, columns, level, inplace, errors)\u001b[0m\n\u001b[1;32m 4709\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;32min\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4710\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4711\u001b[0;31m \u001b[0mobj\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_drop_axis\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4712\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4713\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1222 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36m_drop_axis\u001b[0;34m(self, labels, axis, level, errors, only_slice)\u001b[0m\n\u001b[1;32m 4751\u001b[0m \u001b[0mnew_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4752\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4753\u001b[0;31m \u001b[0mnew_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4754\u001b[0m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_indexer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_axis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4755\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
|
|
| 83 |
},
|
| 84 |
{
|
| 85 |
"cell_type": "code",
|
| 86 |
+
"execution_count": null,
|
| 87 |
"metadata": {
|
| 88 |
"execution": {
|
| 89 |
"iopub.execute_input": "2023-06-02T11:50:31.684884Z",
|
|
|
|
| 93 |
"shell.execute_reply.started": "2023-06-02T11:50:31.684847Z"
|
| 94 |
}
|
| 95 |
},
|
| 96 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
"source": [
|
| 98 |
"train_df"
|
| 99 |
]
|
|
|
|
| 538 |
},
|
| 539 |
{
|
| 540 |
"cell_type": "code",
|
| 541 |
+
"execution_count": 3,
|
| 542 |
"metadata": {
|
| 543 |
"execution": {
|
| 544 |
"iopub.execute_input": "2023-06-02T12:01:20.884031Z",
|
|
|
|
| 794 |
"SalePrice 1459 49.98"
|
| 795 |
]
|
| 796 |
},
|
| 797 |
+
"execution_count": 3,
|
| 798 |
"metadata": {},
|
| 799 |
"output_type": "execute_result"
|
| 800 |
}
|
|
|
|
| 809 |
},
|
| 810 |
{
|
| 811 |
"cell_type": "code",
|
| 812 |
+
"execution_count": 4,
|
| 813 |
"metadata": {
|
| 814 |
"execution": {
|
| 815 |
"iopub.execute_input": "2023-06-02T12:02:21.469961Z",
|
|
|
|
| 827 |
"traceback": [
|
| 828 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 829 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 830 |
+
"\u001b[0;32m<ipython-input-4-e2ddd58cfc83>\u001b[0m in \u001b[0;36m<cell line: 5>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 12\u001b[0;31m \u001b[0mdata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'LotFrontage'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'Alley'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'FireplaceQu'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'PoolQC'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'Fence'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'MiscFeature'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
| 831 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36mdrop\u001b[0;34m(self, labels, axis, index, columns, level, inplace, errors)\u001b[0m\n\u001b[1;32m 5342\u001b[0m \u001b[0mweight\u001b[0m \u001b[0;36m1.0\u001b[0m \u001b[0;36m0.8\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5343\u001b[0m \"\"\"\n\u001b[0;32m-> 5344\u001b[0;31m return super().drop(\n\u001b[0m\u001b[1;32m 5345\u001b[0m \u001b[0mlabels\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5346\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 832 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mdrop\u001b[0;34m(self, labels, axis, index, columns, level, inplace, errors)\u001b[0m\n\u001b[1;32m 4709\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;32min\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4710\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4711\u001b[0;31m \u001b[0mobj\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_drop_axis\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4712\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4713\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 833 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36m_drop_axis\u001b[0;34m(self, labels, axis, level, errors, only_slice)\u001b[0m\n\u001b[1;32m 4751\u001b[0m \u001b[0mnew_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4752\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 4753\u001b[0;31m \u001b[0mnew_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4754\u001b[0m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_indexer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_axis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4755\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
benchmark/pandas_3/pandas_3_reproduced.ipynb
CHANGED
|
@@ -26,7 +26,7 @@
|
|
| 26 |
},
|
| 27 |
{
|
| 28 |
"cell_type": "code",
|
| 29 |
-
"execution_count":
|
| 30 |
"metadata": {
|
| 31 |
"execution": {
|
| 32 |
"iopub.execute_input": "2023-10-10T01:30:04.195992Z",
|
|
@@ -67,7 +67,7 @@
|
|
| 67 |
},
|
| 68 |
{
|
| 69 |
"cell_type": "code",
|
| 70 |
-
"execution_count":
|
| 71 |
"metadata": {
|
| 72 |
"execution": {
|
| 73 |
"iopub.execute_input": "2023-10-10T01:30:11.150745Z",
|
|
@@ -101,7 +101,7 @@
|
|
| 101 |
},
|
| 102 |
{
|
| 103 |
"cell_type": "code",
|
| 104 |
-
"execution_count":
|
| 105 |
"metadata": {
|
| 106 |
"execution": {
|
| 107 |
"iopub.execute_input": "2023-10-10T01:30:13.553749Z",
|
|
@@ -119,8 +119,8 @@
|
|
| 119 |
"traceback": [
|
| 120 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 121 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 122 |
-
"\u001b[0;32m<ipython-input-
|
| 123 |
-
"\u001b[0;32m<ipython-input-
|
| 124 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36mjoin\u001b[0;34m(self, other, on, how, lsuffix, rsuffix, sort, validate)\u001b[0m\n\u001b[1;32m 10410\u001b[0m \u001b[0mvalidate\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mvalidate\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10411\u001b[0m )\n\u001b[0;32m> 10412\u001b[0;31m return merge(\n\u001b[0m\u001b[1;32m 10413\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10414\u001b[0m \u001b[0mother\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 125 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/merge.py\u001b[0m in \u001b[0;36mmerge\u001b[0;34m(left, right, how, on, left_on, right_on, left_index, right_index, sort, suffixes, copy, indicator, validate)\u001b[0m\n\u001b[1;32m 181\u001b[0m \u001b[0mvalidate\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mvalidate\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 182\u001b[0m )\n\u001b[0;32m--> 183\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mop\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_result\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 184\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 185\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 126 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/merge.py\u001b[0m in \u001b[0;36mget_result\u001b[0;34m(self, copy)\u001b[0m\n\u001b[1;32m 883\u001b[0m \u001b[0mjoin_index\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mleft_indexer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mright_indexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_join_info\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 884\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 885\u001b[0;31m result = self._reindex_and_concat(\n\u001b[0m\u001b[1;32m 886\u001b[0m \u001b[0mjoin_index\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mleft_indexer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mright_indexer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 887\u001b[0m )\n",
|
|
|
|
| 26 |
},
|
| 27 |
{
|
| 28 |
"cell_type": "code",
|
| 29 |
+
"execution_count": 1,
|
| 30 |
"metadata": {
|
| 31 |
"execution": {
|
| 32 |
"iopub.execute_input": "2023-10-10T01:30:04.195992Z",
|
|
|
|
| 67 |
},
|
| 68 |
{
|
| 69 |
"cell_type": "code",
|
| 70 |
+
"execution_count": 2,
|
| 71 |
"metadata": {
|
| 72 |
"execution": {
|
| 73 |
"iopub.execute_input": "2023-10-10T01:30:11.150745Z",
|
|
|
|
| 101 |
},
|
| 102 |
{
|
| 103 |
"cell_type": "code",
|
| 104 |
+
"execution_count": 3,
|
| 105 |
"metadata": {
|
| 106 |
"execution": {
|
| 107 |
"iopub.execute_input": "2023-10-10T01:30:13.553749Z",
|
|
|
|
| 119 |
"traceback": [
|
| 120 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 121 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 122 |
+
"\u001b[0;32m<ipython-input-3-f917086cb02f>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtrain\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mprocData\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtrain\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname_count\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRescuerID\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mtest\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mprocData\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtest\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname_count\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mRescuerID\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 123 |
+
"\u001b[0;32m<ipython-input-2-3509ebcbd1ba>\u001b[0m in \u001b[0;36mprocData\u001b[0;34m(data, name_count, RescuerID)\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"NameLen\"\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"Name\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfillna\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"SinNombre\"\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"Name\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlower\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreplace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\" \"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m\"nonameyet\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname_count\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mon\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"Name\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 15\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"name_count\"\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"name_count\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfillna\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 124 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36mjoin\u001b[0;34m(self, other, on, how, lsuffix, rsuffix, sort, validate)\u001b[0m\n\u001b[1;32m 10410\u001b[0m \u001b[0mvalidate\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mvalidate\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10411\u001b[0m )\n\u001b[0;32m> 10412\u001b[0;31m return merge(\n\u001b[0m\u001b[1;32m 10413\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10414\u001b[0m \u001b[0mother\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 125 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/merge.py\u001b[0m in \u001b[0;36mmerge\u001b[0;34m(left, right, how, on, left_on, right_on, left_index, right_index, sort, suffixes, copy, indicator, validate)\u001b[0m\n\u001b[1;32m 181\u001b[0m \u001b[0mvalidate\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mvalidate\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 182\u001b[0m )\n\u001b[0;32m--> 183\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mop\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_result\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 184\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 185\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 126 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/merge.py\u001b[0m in \u001b[0;36mget_result\u001b[0;34m(self, copy)\u001b[0m\n\u001b[1;32m 883\u001b[0m \u001b[0mjoin_index\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mleft_indexer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mright_indexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_join_info\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 884\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 885\u001b[0;31m result = self._reindex_and_concat(\n\u001b[0m\u001b[1;32m 886\u001b[0m \u001b[0mjoin_index\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mleft_indexer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mright_indexer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 887\u001b[0m )\n",
|
benchmark/pandas_4/pandas_4_fixed.ipynb
CHANGED
|
@@ -125,7 +125,7 @@
|
|
| 125 |
},
|
| 126 |
{
|
| 127 |
"cell_type": "code",
|
| 128 |
-
"execution_count":
|
| 129 |
"metadata": {
|
| 130 |
"execution": {
|
| 131 |
"iopub.execute_input": "2023-04-25T22:21:45.091494Z",
|
|
@@ -135,82 +135,7 @@
|
|
| 135 |
"shell.execute_reply.started": "2023-04-25T22:21:45.091436Z"
|
| 136 |
}
|
| 137 |
},
|
| 138 |
-
"outputs": [
|
| 139 |
-
{
|
| 140 |
-
"data": {
|
| 141 |
-
"text/html": [
|
| 142 |
-
"<div>\n",
|
| 143 |
-
"<style scoped>\n",
|
| 144 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 145 |
-
" vertical-align: middle;\n",
|
| 146 |
-
" }\n",
|
| 147 |
-
"\n",
|
| 148 |
-
" .dataframe tbody tr th {\n",
|
| 149 |
-
" vertical-align: top;\n",
|
| 150 |
-
" }\n",
|
| 151 |
-
"\n",
|
| 152 |
-
" .dataframe thead th {\n",
|
| 153 |
-
" text-align: right;\n",
|
| 154 |
-
" }\n",
|
| 155 |
-
"</style>\n",
|
| 156 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 157 |
-
" <thead>\n",
|
| 158 |
-
" <tr style=\"text-align: right;\">\n",
|
| 159 |
-
" <th></th>\n",
|
| 160 |
-
" <th>emotion</th>\n",
|
| 161 |
-
" <th>pixels</th>\n",
|
| 162 |
-
" <th>Usage</th>\n",
|
| 163 |
-
" </tr>\n",
|
| 164 |
-
" </thead>\n",
|
| 165 |
-
" <tbody>\n",
|
| 166 |
-
" <tr>\n",
|
| 167 |
-
" <th>0</th>\n",
|
| 168 |
-
" <td>0</td>\n",
|
| 169 |
-
" <td>70 80 82 72 58 58 60 63 54 58 60 48 89 115 121...</td>\n",
|
| 170 |
-
" <td>Training</td>\n",
|
| 171 |
-
" </tr>\n",
|
| 172 |
-
" <tr>\n",
|
| 173 |
-
" <th>1</th>\n",
|
| 174 |
-
" <td>0</td>\n",
|
| 175 |
-
" <td>151 150 147 155 148 133 111 140 170 174 182 15...</td>\n",
|
| 176 |
-
" <td>Training</td>\n",
|
| 177 |
-
" </tr>\n",
|
| 178 |
-
" <tr>\n",
|
| 179 |
-
" <th>2</th>\n",
|
| 180 |
-
" <td>2</td>\n",
|
| 181 |
-
" <td>231 212 156 164 174 138 161 173 182 200 106 38...</td>\n",
|
| 182 |
-
" <td>Training</td>\n",
|
| 183 |
-
" </tr>\n",
|
| 184 |
-
" <tr>\n",
|
| 185 |
-
" <th>3</th>\n",
|
| 186 |
-
" <td>4</td>\n",
|
| 187 |
-
" <td>24 32 36 30 32 23 19 20 30 41 21 22 32 34 21 1...</td>\n",
|
| 188 |
-
" <td>Training</td>\n",
|
| 189 |
-
" </tr>\n",
|
| 190 |
-
" <tr>\n",
|
| 191 |
-
" <th>4</th>\n",
|
| 192 |
-
" <td>6</td>\n",
|
| 193 |
-
" <td>4 0 0 0 0 0 0 0 0 0 0 0 3 15 23 28 48 50 58 84...</td>\n",
|
| 194 |
-
" <td>Training</td>\n",
|
| 195 |
-
" </tr>\n",
|
| 196 |
-
" </tbody>\n",
|
| 197 |
-
"</table>\n",
|
| 198 |
-
"</div>"
|
| 199 |
-
],
|
| 200 |
-
"text/plain": [
|
| 201 |
-
" emotion pixels Usage\n",
|
| 202 |
-
"0 0 70 80 82 72 58 58 60 63 54 58 60 48 89 115 121... Training\n",
|
| 203 |
-
"1 0 151 150 147 155 148 133 111 140 170 174 182 15... Training\n",
|
| 204 |
-
"2 2 231 212 156 164 174 138 161 173 182 200 106 38... Training\n",
|
| 205 |
-
"3 4 24 32 36 30 32 23 19 20 30 41 21 22 32 34 21 1... Training\n",
|
| 206 |
-
"4 6 4 0 0 0 0 0 0 0 0 0 0 0 3 15 23 28 48 50 58 84... Training"
|
| 207 |
-
]
|
| 208 |
-
},
|
| 209 |
-
"execution_count": 3,
|
| 210 |
-
"metadata": {},
|
| 211 |
-
"output_type": "execute_result"
|
| 212 |
-
}
|
| 213 |
-
],
|
| 214 |
"source": [
|
| 215 |
"#preview first 5 row of data\n",
|
| 216 |
"data.head(5)"
|
|
@@ -218,7 +143,7 @@
|
|
| 218 |
},
|
| 219 |
{
|
| 220 |
"cell_type": "code",
|
| 221 |
-
"execution_count":
|
| 222 |
"metadata": {
|
| 223 |
"execution": {
|
| 224 |
"iopub.execute_input": "2023-04-25T22:21:52.517159Z",
|
|
@@ -228,22 +153,7 @@
|
|
| 228 |
"shell.execute_reply.started": "2023-04-25T22:21:52.517101Z"
|
| 229 |
}
|
| 230 |
},
|
| 231 |
-
"outputs": [
|
| 232 |
-
{
|
| 233 |
-
"data": {
|
| 234 |
-
"text/plain": [
|
| 235 |
-
"Usage\n",
|
| 236 |
-
"Training 28709\n",
|
| 237 |
-
"PublicTest 3589\n",
|
| 238 |
-
"PrivateTest 3589\n",
|
| 239 |
-
"Name: count, dtype: int64"
|
| 240 |
-
]
|
| 241 |
-
},
|
| 242 |
-
"execution_count": 4,
|
| 243 |
-
"metadata": {},
|
| 244 |
-
"output_type": "execute_result"
|
| 245 |
-
}
|
| 246 |
-
],
|
| 247 |
"source": [
|
| 248 |
"#check usage values\n",
|
| 249 |
"#80% training, 10% validation and 10% test\n",
|
|
@@ -252,7 +162,7 @@
|
|
| 252 |
},
|
| 253 |
{
|
| 254 |
"cell_type": "code",
|
| 255 |
-
"execution_count":
|
| 256 |
"metadata": {
|
| 257 |
"execution": {
|
| 258 |
"iopub.execute_input": "2023-04-25T22:21:56.062661Z",
|
|
@@ -262,88 +172,7 @@
|
|
| 262 |
"shell.execute_reply.started": "2023-04-25T22:21:56.062605Z"
|
| 263 |
}
|
| 264 |
},
|
| 265 |
-
"outputs": [
|
| 266 |
-
{
|
| 267 |
-
"data": {
|
| 268 |
-
"text/html": [
|
| 269 |
-
"<div>\n",
|
| 270 |
-
"<style scoped>\n",
|
| 271 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 272 |
-
" vertical-align: middle;\n",
|
| 273 |
-
" }\n",
|
| 274 |
-
"\n",
|
| 275 |
-
" .dataframe tbody tr th {\n",
|
| 276 |
-
" vertical-align: top;\n",
|
| 277 |
-
" }\n",
|
| 278 |
-
"\n",
|
| 279 |
-
" .dataframe thead th {\n",
|
| 280 |
-
" text-align: right;\n",
|
| 281 |
-
" }\n",
|
| 282 |
-
"</style>\n",
|
| 283 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 284 |
-
" <thead>\n",
|
| 285 |
-
" <tr style=\"text-align: right;\">\n",
|
| 286 |
-
" <th></th>\n",
|
| 287 |
-
" <th>emotion</th>\n",
|
| 288 |
-
" <th>number</th>\n",
|
| 289 |
-
" </tr>\n",
|
| 290 |
-
" </thead>\n",
|
| 291 |
-
" <tbody>\n",
|
| 292 |
-
" <tr>\n",
|
| 293 |
-
" <th>0</th>\n",
|
| 294 |
-
" <td>Angry</td>\n",
|
| 295 |
-
" <td>4953</td>\n",
|
| 296 |
-
" </tr>\n",
|
| 297 |
-
" <tr>\n",
|
| 298 |
-
" <th>1</th>\n",
|
| 299 |
-
" <td>Fear</td>\n",
|
| 300 |
-
" <td>5121</td>\n",
|
| 301 |
-
" </tr>\n",
|
| 302 |
-
" <tr>\n",
|
| 303 |
-
" <th>2</th>\n",
|
| 304 |
-
" <td>Sad</td>\n",
|
| 305 |
-
" <td>6077</td>\n",
|
| 306 |
-
" </tr>\n",
|
| 307 |
-
" <tr>\n",
|
| 308 |
-
" <th>3</th>\n",
|
| 309 |
-
" <td>Neutral</td>\n",
|
| 310 |
-
" <td>6198</td>\n",
|
| 311 |
-
" </tr>\n",
|
| 312 |
-
" <tr>\n",
|
| 313 |
-
" <th>4</th>\n",
|
| 314 |
-
" <td>Happy</td>\n",
|
| 315 |
-
" <td>8989</td>\n",
|
| 316 |
-
" </tr>\n",
|
| 317 |
-
" <tr>\n",
|
| 318 |
-
" <th>5</th>\n",
|
| 319 |
-
" <td>Surprise</td>\n",
|
| 320 |
-
" <td>4002</td>\n",
|
| 321 |
-
" </tr>\n",
|
| 322 |
-
" <tr>\n",
|
| 323 |
-
" <th>6</th>\n",
|
| 324 |
-
" <td>Digust</td>\n",
|
| 325 |
-
" <td>547</td>\n",
|
| 326 |
-
" </tr>\n",
|
| 327 |
-
" </tbody>\n",
|
| 328 |
-
"</table>\n",
|
| 329 |
-
"</div>"
|
| 330 |
-
],
|
| 331 |
-
"text/plain": [
|
| 332 |
-
" emotion number\n",
|
| 333 |
-
"0 Angry 4953\n",
|
| 334 |
-
"1 Fear 5121\n",
|
| 335 |
-
"2 Sad 6077\n",
|
| 336 |
-
"3 Neutral 6198\n",
|
| 337 |
-
"4 Happy 8989\n",
|
| 338 |
-
"5 Surprise 4002\n",
|
| 339 |
-
"6 Digust 547"
|
| 340 |
-
]
|
| 341 |
-
},
|
| 342 |
-
"execution_count": 5,
|
| 343 |
-
"metadata": {},
|
| 344 |
-
"output_type": "execute_result"
|
| 345 |
-
}
|
| 346 |
-
],
|
| 347 |
"source": [
|
| 348 |
"#check target labels\n",
|
| 349 |
"emotion_map = {0: 'Angry', 1: 'Digust', 2: 'Fear', 3: 'Happy', 4: 'Sad', 5: 'Surprise', 6: 'Neutral'}\n",
|
|
@@ -355,7 +184,7 @@
|
|
| 355 |
},
|
| 356 |
{
|
| 357 |
"cell_type": "code",
|
| 358 |
-
"execution_count":
|
| 359 |
"metadata": {
|
| 360 |
"execution": {
|
| 361 |
"iopub.execute_input": "2023-04-25T22:21:59.919001Z",
|
|
@@ -393,7 +222,7 @@
|
|
| 393 |
},
|
| 394 |
{
|
| 395 |
"cell_type": "code",
|
| 396 |
-
"execution_count":
|
| 397 |
"metadata": {
|
| 398 |
"execution": {
|
| 399 |
"iopub.execute_input": "2023-04-25T22:22:02.488962Z",
|
|
@@ -474,7 +303,7 @@
|
|
| 474 |
"5 Surprise 4002"
|
| 475 |
]
|
| 476 |
},
|
| 477 |
-
"execution_count":
|
| 478 |
"metadata": {},
|
| 479 |
"output_type": "execute_result"
|
| 480 |
}
|
|
@@ -490,7 +319,7 @@
|
|
| 490 |
},
|
| 491 |
{
|
| 492 |
"cell_type": "code",
|
| 493 |
-
"execution_count":
|
| 494 |
"metadata": {
|
| 495 |
"execution": {
|
| 496 |
"iopub.execute_input": "2023-04-25T22:22:05.563193Z",
|
|
@@ -500,18 +329,7 @@
|
|
| 500 |
"shell.execute_reply.started": "2023-04-25T22:22:05.563141Z"
|
| 501 |
}
|
| 502 |
},
|
| 503 |
-
"outputs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3X9l8mvXbtWNptNa9eudXjdjWPerrbMthuPsOzatUtPPfWUfHx85OXlpWbNmumHH35w6DN//nzZbDZt3LhRgwYNUrFixeTp6alnnnlGZ86cufl/AGBRHEkBHmBff/21SpcurXr16t3V63/++WctWbJE7du3V2hoqBITEzV79mw1btxYBw8eVFBQkCTpo48+0oABA9SuXTu98sorunr1qvbu3astW7bohRdekCS9/PLL+uKLLxQdHa2KFSvq7Nmz2rBhgw4dOqQaNWrcsoZ9+/apefPmKlasmGJiYnTt2jWNHDlSAQEBd6w/JiZGY8eOVa9evVS7dm0lJydr+/bt2rlzp5588km99NJLOnXqlOLi4vSPf/zjpmPExsbq6tWr6tOnj1xdXVW4cGFlZGTctG96erpatGihunXravz48VqxYoVGjhypa9euafTo0Xes93rZqe16Bw4cUMOGDeXj46PXXntNBQsW1OzZs9WkSROtW7dOderUcejfv39/FSpUSCNHjtSxY8c0depURUdHa/HixTmqE8hXBsADKSkpyUgyrVu3zvZrQkJCTNeuXe3Pr169atLT0x36HD161Li6uprRo0fb21q3bm0qVap027F9fX1NVFRUtmvJ1KZNG+Pm5mZ++eUXe9vBgweNs7OzufFH1I31V61a1URGRt52/KioqCzjGPPHdkoyPj4+5vTp0zddFhsba2/r2rWrkWT69+9vb8vIyDCRkZHGxcXFnDlzxhhjzHfffWckme++++6OY96qNmOMkWRGjhxpf96mTRvj4uJijhw5Ym87deqU8fb2No0aNbK3xcbGGkkmPDzcZGRk2NtfffVV4+zsbC5cuHDT9QFWxOke4AGVnJwsSfL29r7rMVxdXe0TUdPT03X27Fl5eXmpXLlyDqdp/Pz89Ouvv2rbtm23HMvPz09btmzRqVOnsr3+9PR0rVy5Um3atFHJkiXt7RUqVFBERMQdX+/n56cDBw7o8OHD2V7njdq2batixYplu390dLT93zabTdHR0UpNTdWqVavuuoY7SU9P17fffqs2bdqodOnS9vbixYvrhRde0IYNG+zvh0x9+vRxOH3UsGFDpaen65dffrlndQJ5jZACPKB8fHwk/TEX5G5lZGRoypQpKlu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+aNWuUkZGhOnXq2PusX79eaWlp9j5xcXEqV65cllM9AAAgf1gqpLRq1UpjxozR0qVLdezYMX355ZeaPHmynnnmGUmSzWbTwIED9fbbb+urr77Svn371KVLFwUFBalNmzaSpAoVKqhFixbq3bu3tm7dqo0bNyo6OlodO3ZUUFCQJOmFF16Qi4uLevbsqQMHDmjx4sWaNm2aBg0alF+bDgAAbmCp0z3Tp0/X8OHD1a9fP50+fVpBQUF66aWXNGLECHuf1157TZcuXVKfPn104cIFNWjQQCtWrJCbm5u9z8KFCxUdHa1mzZrJyclJbdu21XvvvWdf7uvrq2+//VZRUVGqWbOmihYtqhEjRnD5MQAAFmIz19/OFdmSnJwsX19fJSUlycfHJ7/LAYD7Ysbfvs7vEvJF9KRW+V3Cn0pOfoda6nQPAABAJkIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwpAL5XQAA5Id1jRrndwn5ovH6dfldApBtHEkBAACWREgBAACWZLmQcvLkSXXu3FlFihSRu7u7KleurO3bt9uXG2M0YsQIFS9eXO7u7goPD9fhw4cdxjh37pw6deokHx8f+fn5qWfPnrp48aJDn71796phw4Zyc3NTcHCwxo8ff1+2DwAAZI+l5qScP39e9evXV9OmTbV8+XIVK1ZMhw8fVqFChex9xo8fr/fee08LFixQaGiohg8froiICB08eFBubm6SpE6dOum3335TXFyc0tLS1L17d/Xp00eLFi2SJCUnJ6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lI5OpLy73//2+F59erVtXTpUpUvX15du3bVo48+Kkk6fPiwPv74YxUuXJibuQEAgLuSo5DSrl072Ww2GWMkyeHfY8aMydL/119/1fPPP6/nnnsuD0oFAAAPkxyFlO++++5e1QEAAOAgRyGFbzQGAAD3S64mzgIAANwrub4t/oYNGzRv3jz9/PPPOn/+vH2OSiabzaY9e/bkdjUAAOAhk6uQMnnyZA0ePFhubm4qV66cChcunFd1AQCAh1yuQsqECRNUv359ff311/L19c2rmgAAAHI3J+Xy5cvq1KkTAQUAAOS5XIWUpk2bat++fXlVCwAAgF2uQsr06dO1evVqTZw4UefOncurmgAAAHIXUoKDg/XSSy9pyJAhKlasmDw9PeXj4+Pw4FQQAAC4G7maODtixAiNGTNGjzzyiGrVqkUgAQAAeSZXIWXWrFmKjIzUkiVL5OTEfeEAAEDeyVWySE1NVWRkJAEFAADkuVyli5YtW+r777/Pq1oAAADschVSRo4cqYMHD6pfv37asWOHzpw5o3PnzmV5AAAA5FSu5qSUK1dOkrR7927Nnj37lv3S09NzsxoAAPAQyvXVPTabLa9qAQAAsMtVSImJicmjMgAAABxxWQ4AALCkXB1JGT169B372Gw2DR8+PDerAQAAD6F7drrHZrPJGENIAQAAdyVXp3syMjKyPK5du6YjR47o1VdfVa1atXT69Om8qhUAADxE8nxOipOTk0JDQzVx4kSVLVtW/fv3z+tVAACAh8A9nTjbqFEjLVu27K5e++6778pms2ngwIH2tqtXryoqKkpFihSRl5eX2rZtq8TERIfXHT9+XJGRkfLw8JC/v78GDx6sa9euOfRZu3atatSoIVdXVz366KOaP3/+XdUIAADunXsaUrZv335X3+uzbds2zZ49W1WqVHFof/XVV/X111/r888/17p163Tq1Ck9++yz9uXp6emKjIxUamqqNm3apAULFmj+/PkaMWKEvc/Ro0cVGRmppk2bavfu3Ro4cKB69eqllStX3v2GAgCAPJeribMff/zxTdsvXLig9evX69///rd69eqVozEvXryoTp066aOPPtLbb79tb09KStLcuXO1aNEiPfHEE5Kk2NhYVahQQT/88IPq1q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YtXxMSEnLHu9w2adJEu3btynV9AADg3rnrkJKQkKB3331XH330kdLS0vTiiy9q2LBhCg0Nzcv6AADAQyrHIeW3336zh5Nr166pS5cuevPNNwknAAAgT+U4pJQpU0YpKSmqVq2a3njjDYWGhur8+fM6f/78LV9z/WXFAAAA2ZHjkHL16lVJ0q5du/Tcc8/dtq8xRjabTenp6XdXHQAAeGjlOKTExsbeizoAAAAc5DikdO3a9V7UAQAA4MApvwsAAAC4GUIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEuFlLFjx+rxxx+Xt7e3/P391aZNG8XHxzv0uXr1qqKiolSkSBF5eXmpbdu2SkxMdOhz/PhxRUZGysPDQ/7+/ho8eLCuXbvm0Gft2rWqUaOGXF1d9eijj2r+/Pn3evMAAEAOWCqkrFu3TlFRUfrhhx8UFxentLQ0NW/eXJcuXbL3efXVV/X111/r888/17p163Tq1Ck9++yz9uXp6emKjIxUamqqNm3apAULFmj+/PkaMWKEvc/Ro0cVGRmppk2bavfu3Ro4cKB69eqllStX3tftBQAAt1Ygvwu43ooVKxyez58/X/7+/tqxY4caNWqkpKQkzZ07V4sWLdITTzwhSYqNjVWFChX0ww8/qG7duvr222918OBBrVq1SgEBAapWrZreeustvf7664qJiZGLi4tmzZql0NBQTZo0SZJUoUIFbdiwQVOmTFFERESWulJSUpSSkmJ/npycfA/3AgAAkCx2JOVGSUlJkqTChQtLknbs2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wOi8vr7uq53YIKRZw7do1ffzxx5o0aZKaN2/usKxNmzb65JNPVL58+TuOU65cOW3btk1dunSxt10/z+R2ChQooK5duyo2NlYuLi7q2LGj3N3dc7YhFlejRg3Fx8dn+cGZaceOHcrIyNCkSZPsV+t89tln97NEy6pYsaKWLFmSrX1UoUIFbdmyxaHthx9+uG+15rV3331X1apVs08wlP54Lx08ePCW7yXpj6vJrp8Hcfjw4SxH5CQ5HBG4lf/+9786e/as3n33XQUHB0uStm/fnuNtsZKNGzeqdevW6ty5s6Q//tj68ccfVbFiRYd+N3svlS1b1uEX5I3vrx9++EEVKlSwPy9SpIjatGmj2NhYbd682ZJz7TI/Y5lX2fz222+qXr26JOXoMvXjx487XBn6ww8/yMnJyeH9mx3u7u5q1aqVWrVqpaioKJUvX1779u1T9erVlZ6ertOnT9+XoEdIsYBvvvlG58+fV8+ePeXr6+uwrG3btpo7d64mTJhwx3H69++v3r17q1atWqpXr54WL16svXv3qnTp0tmqo1evXvYP9p/xnhgjRoxQy5YtVbJkSbVr105OTk7as2eP9u/fr7fffluPPvqo0tLSNH36dLVq1UobN27UrFmz8rvs++rs2bNq3769evTooSpVqsjb21vbt2/X+PHj1bp162ztowEDBqh+/fqaOHGiWrdurZUrV2rFihX5tEW5V7lyZXXq1Envvfeeve31119X3bp1FR0drV69esnT01MHDx5UXFyc/cjnE088oRkzZigsLEzp6el6/fXXHY6E+vv7y93dXStWrFCJEiXk5uaW5fOfqWTJknJxcdH06dP18ssva//+/Xrrrbfu7YbfY2XLltUXX3yhTZs2qVChQpo8ebISExOzhJTjx49r0KBBeumll7Rz505Nnz5dkyZNcuizceNGjR8/Xm3atFFcXJw+//xzLV261KFPr1691LJlS6Wnp6tr1673fPtu5U6fMXd3d9WtW1fvvvuuQkNDdfr0aQ0bNizb47u5ualr166aOHGikpOTNWDAAD333HMKDAzM9hjz589Xenq66tSpIw8PD/3zn/+Uu7u7QkJCVKRIEXXq1EldunTRpEmTVL16dZ05c0arV69WlSpV8v4e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027uUAngwcFcbAHlm9OjRCg0NzdJ+u28LvhcWLVqk/fv3Z7lVekhIiK5cueLwRX8ArIuQAiDPPPXUU6pVq1Z+l3FLNptNbm5u+V0GgGzidA+A+yJzPsjEiRM1c+ZMlS5dWh4eHmrevLlOnDghY4zeeustlShRQu7u7mrdurXOnTuXZZz3339flSpVkqurq4KCghQVFaULFy7Ylzdp0kRLly7VL7/8Yj/dVKpUKYcabpyTsmbNGjVs2FCenp7y8/NT69atdejQIYc+MTExstls+umnn9StWzf5+fnJ19dX3bt31+XLlx36xsXFqUGDBvLz85OXl5fKlSunN954I0/2I/Aw4UgKgDyTlJSk//3vfw5tNptNRYoUsT9fuHChUlNT1b9/f507d07jx4/Xc889pyeeeEJr167V66+/rp9++knTp0/X3//+d82bN8/+2piYGI0aNUrh4eHq27ev4uPj9cEHH2jbtm3auHGjChYsqDfffFNJSUn69ddfNWXKFEmSl5fXLWtetWqVnnrqKZUuXVoxMTG6cuWKpk+frvr162vnzp32gJPpueeeU2hoqMaOHaudO3dqzpw58vf317hx4yRJBw4cUMuWLVWlShWNHj1arq6u+umnn7Rx48bc7l7g4WMAIJdiY2ONpJs+XF1djTHGHD161EgyxYoVMxcuXLC/dujQoUaSqVq1qklLS7O3P//888bFxcVcvXrVGGPM6dOnjYuLi2nevLlJT0+395sxY4aRZObNm2dvi4yMNCEhIVnqzKwhNjbW3latWjXj7+9vzp49a2/bs2ePcXJyMl26dLG3jRw50kgyPXr0cBjzmWeeMUWKFLE/nzJlipFkzpw5k93dB+AWON0DIM/MnDlTcXFxDo/ly5c79Gnfvr18fX3tz+vUqSNJ6ty5s8M31NapU0epqak6efKkpD+OeKSmpmrgwIFycvq/H129e/eWj4+Pli5dmuN6f/vtN+3evVvdunVT4cKF7e1VqlTRk08+qWXLlmV5zcsvv+zwvGHDhjp79qySk5MlSX5+fpKk//znP8rIyMhxTQD+D6d7AOSZ2rVr33HibMmSJR2eZwaW4ODgm7afP39ekvTLL79IksqVK+fQz8XFRaVLl7Yvz4lbjSlJFSpU0MqVK3Xp0iV5enresv5ChQrZ6/Tx8VGHDh00Z84c9erVS0OGDFGzZs307LPPql27dg7hCsCd8YkBcF85OzvnqN0Ycy/LybE71enu7q7169dr1apVevHFF7V371516NBBTz75pNLT0+9nqcADj5AC4IEQEhIiSYqPj3doT01N1dGjR+3LpT8m6+ZmTEn673//q6JFizocRckuJycnNWvWTJMnT9bBgwc1ZswYrVmzRt99912OxwIeZoQUAA+E8PBwubi46L333nM4ujJ37lwlJSUpMjLS3ubp6amkpKQ7jlm8eHFVq1ZNCxYscLiMef/+/fr222/19NNP57jOm102Xa1aNUlSSkpKjscDHmbMSQGQZ5YvX67//ve/Wdrr1auX6/kYxYoV09ChQzVq1Ci1aNFCf/3rXxUfH6/3339fjz/+uDp37mzvW7NmTS1evFiDBg3S448/Li8vL7Vq1eqm406YMEFPPfWUwsLC1LNnT/slyL6+voqJiclxnaNHj9b69esVGRmpkJAQnT59Wu+//75KlCihBg0a3O3mAw8lQgqAPDNixIibtsfGxqpJkya5Hj8mJkbFihXTjBkz9Oqrr6pw4cLq06eP3nnnHYdb3ffr10+7d+9WbGyspkyZopCQkFuGlPDwcK1YsUIjR47UiBEjVLBgQTVu3Fjjxo276S3+7+Svf/2rjh07pnnz5ul///ufihYtqsaNG2vUqFEOVzUBuDObsdqsNAAAADEnBQAAWBQhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWNL/A5UNj9/6nrcAAAAAAElFTkSuQmCC\n",
|
| 507 |
-
"text/plain": [
|
| 508 |
-
"<Figure size 600x400 with 1 Axes>"
|
| 509 |
-
]
|
| 510 |
-
},
|
| 511 |
-
"metadata": {},
|
| 512 |
-
"output_type": "display_data"
|
| 513 |
-
}
|
| 514 |
-
],
|
| 515 |
"source": [
|
| 516 |
"# Plotting a bar graph of the class distributions\n",
|
| 517 |
"plt.figure(figsize=(6,4))\n",
|
|
@@ -531,7 +349,7 @@
|
|
| 531 |
},
|
| 532 |
{
|
| 533 |
"cell_type": "code",
|
| 534 |
-
"execution_count":
|
| 535 |
"metadata": {
|
| 536 |
"execution": {
|
| 537 |
"iopub.execute_input": "2023-04-25T22:22:12.246026Z",
|
|
|
|
| 125 |
},
|
| 126 |
{
|
| 127 |
"cell_type": "code",
|
| 128 |
+
"execution_count": null,
|
| 129 |
"metadata": {
|
| 130 |
"execution": {
|
| 131 |
"iopub.execute_input": "2023-04-25T22:21:45.091494Z",
|
|
|
|
| 135 |
"shell.execute_reply.started": "2023-04-25T22:21:45.091436Z"
|
| 136 |
}
|
| 137 |
},
|
| 138 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
"source": [
|
| 140 |
"#preview first 5 row of data\n",
|
| 141 |
"data.head(5)"
|
|
|
|
| 143 |
},
|
| 144 |
{
|
| 145 |
"cell_type": "code",
|
| 146 |
+
"execution_count": null,
|
| 147 |
"metadata": {
|
| 148 |
"execution": {
|
| 149 |
"iopub.execute_input": "2023-04-25T22:21:52.517159Z",
|
|
|
|
| 153 |
"shell.execute_reply.started": "2023-04-25T22:21:52.517101Z"
|
| 154 |
}
|
| 155 |
},
|
| 156 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
"source": [
|
| 158 |
"#check usage values\n",
|
| 159 |
"#80% training, 10% validation and 10% test\n",
|
|
|
|
| 162 |
},
|
| 163 |
{
|
| 164 |
"cell_type": "code",
|
| 165 |
+
"execution_count": null,
|
| 166 |
"metadata": {
|
| 167 |
"execution": {
|
| 168 |
"iopub.execute_input": "2023-04-25T22:21:56.062661Z",
|
|
|
|
| 172 |
"shell.execute_reply.started": "2023-04-25T22:21:56.062605Z"
|
| 173 |
}
|
| 174 |
},
|
| 175 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
"source": [
|
| 177 |
"#check target labels\n",
|
| 178 |
"emotion_map = {0: 'Angry', 1: 'Digust', 2: 'Fear', 3: 'Happy', 4: 'Sad', 5: 'Surprise', 6: 'Neutral'}\n",
|
|
|
|
| 184 |
},
|
| 185 |
{
|
| 186 |
"cell_type": "code",
|
| 187 |
+
"execution_count": 3,
|
| 188 |
"metadata": {
|
| 189 |
"execution": {
|
| 190 |
"iopub.execute_input": "2023-04-25T22:21:59.919001Z",
|
|
|
|
| 222 |
},
|
| 223 |
{
|
| 224 |
"cell_type": "code",
|
| 225 |
+
"execution_count": 4,
|
| 226 |
"metadata": {
|
| 227 |
"execution": {
|
| 228 |
"iopub.execute_input": "2023-04-25T22:22:02.488962Z",
|
|
|
|
| 303 |
"5 Surprise 4002"
|
| 304 |
]
|
| 305 |
},
|
| 306 |
+
"execution_count": 4,
|
| 307 |
"metadata": {},
|
| 308 |
"output_type": "execute_result"
|
| 309 |
}
|
|
|
|
| 319 |
},
|
| 320 |
{
|
| 321 |
"cell_type": "code",
|
| 322 |
+
"execution_count": null,
|
| 323 |
"metadata": {
|
| 324 |
"execution": {
|
| 325 |
"iopub.execute_input": "2023-04-25T22:22:05.563193Z",
|
|
|
|
| 329 |
"shell.execute_reply.started": "2023-04-25T22:22:05.563141Z"
|
| 330 |
}
|
| 331 |
},
|
| 332 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
"source": [
|
| 334 |
"# Plotting a bar graph of the class distributions\n",
|
| 335 |
"plt.figure(figsize=(6,4))\n",
|
|
|
|
| 349 |
},
|
| 350 |
{
|
| 351 |
"cell_type": "code",
|
| 352 |
+
"execution_count": 5,
|
| 353 |
"metadata": {
|
| 354 |
"execution": {
|
| 355 |
"iopub.execute_input": "2023-04-25T22:22:12.246026Z",
|
benchmark/pandas_4/pandas_4_reproduced.ipynb
CHANGED
|
@@ -125,7 +125,7 @@
|
|
| 125 |
},
|
| 126 |
{
|
| 127 |
"cell_type": "code",
|
| 128 |
-
"execution_count":
|
| 129 |
"metadata": {
|
| 130 |
"execution": {
|
| 131 |
"iopub.execute_input": "2023-04-25T22:21:45.091494Z",
|
|
@@ -135,82 +135,7 @@
|
|
| 135 |
"shell.execute_reply.started": "2023-04-25T22:21:45.091436Z"
|
| 136 |
}
|
| 137 |
},
|
| 138 |
-
"outputs": [
|
| 139 |
-
{
|
| 140 |
-
"data": {
|
| 141 |
-
"text/html": [
|
| 142 |
-
"<div>\n",
|
| 143 |
-
"<style scoped>\n",
|
| 144 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 145 |
-
" vertical-align: middle;\n",
|
| 146 |
-
" }\n",
|
| 147 |
-
"\n",
|
| 148 |
-
" .dataframe tbody tr th {\n",
|
| 149 |
-
" vertical-align: top;\n",
|
| 150 |
-
" }\n",
|
| 151 |
-
"\n",
|
| 152 |
-
" .dataframe thead th {\n",
|
| 153 |
-
" text-align: right;\n",
|
| 154 |
-
" }\n",
|
| 155 |
-
"</style>\n",
|
| 156 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 157 |
-
" <thead>\n",
|
| 158 |
-
" <tr style=\"text-align: right;\">\n",
|
| 159 |
-
" <th></th>\n",
|
| 160 |
-
" <th>emotion</th>\n",
|
| 161 |
-
" <th>pixels</th>\n",
|
| 162 |
-
" <th>Usage</th>\n",
|
| 163 |
-
" </tr>\n",
|
| 164 |
-
" </thead>\n",
|
| 165 |
-
" <tbody>\n",
|
| 166 |
-
" <tr>\n",
|
| 167 |
-
" <th>0</th>\n",
|
| 168 |
-
" <td>0</td>\n",
|
| 169 |
-
" <td>70 80 82 72 58 58 60 63 54 58 60 48 89 115 121...</td>\n",
|
| 170 |
-
" <td>Training</td>\n",
|
| 171 |
-
" </tr>\n",
|
| 172 |
-
" <tr>\n",
|
| 173 |
-
" <th>1</th>\n",
|
| 174 |
-
" <td>0</td>\n",
|
| 175 |
-
" <td>151 150 147 155 148 133 111 140 170 174 182 15...</td>\n",
|
| 176 |
-
" <td>Training</td>\n",
|
| 177 |
-
" </tr>\n",
|
| 178 |
-
" <tr>\n",
|
| 179 |
-
" <th>2</th>\n",
|
| 180 |
-
" <td>2</td>\n",
|
| 181 |
-
" <td>231 212 156 164 174 138 161 173 182 200 106 38...</td>\n",
|
| 182 |
-
" <td>Training</td>\n",
|
| 183 |
-
" </tr>\n",
|
| 184 |
-
" <tr>\n",
|
| 185 |
-
" <th>3</th>\n",
|
| 186 |
-
" <td>4</td>\n",
|
| 187 |
-
" <td>24 32 36 30 32 23 19 20 30 41 21 22 32 34 21 1...</td>\n",
|
| 188 |
-
" <td>Training</td>\n",
|
| 189 |
-
" </tr>\n",
|
| 190 |
-
" <tr>\n",
|
| 191 |
-
" <th>4</th>\n",
|
| 192 |
-
" <td>6</td>\n",
|
| 193 |
-
" <td>4 0 0 0 0 0 0 0 0 0 0 0 3 15 23 28 48 50 58 84...</td>\n",
|
| 194 |
-
" <td>Training</td>\n",
|
| 195 |
-
" </tr>\n",
|
| 196 |
-
" </tbody>\n",
|
| 197 |
-
"</table>\n",
|
| 198 |
-
"</div>"
|
| 199 |
-
],
|
| 200 |
-
"text/plain": [
|
| 201 |
-
" emotion pixels Usage\n",
|
| 202 |
-
"0 0 70 80 82 72 58 58 60 63 54 58 60 48 89 115 121... Training\n",
|
| 203 |
-
"1 0 151 150 147 155 148 133 111 140 170 174 182 15... Training\n",
|
| 204 |
-
"2 2 231 212 156 164 174 138 161 173 182 200 106 38... Training\n",
|
| 205 |
-
"3 4 24 32 36 30 32 23 19 20 30 41 21 22 32 34 21 1... Training\n",
|
| 206 |
-
"4 6 4 0 0 0 0 0 0 0 0 0 0 0 3 15 23 28 48 50 58 84... Training"
|
| 207 |
-
]
|
| 208 |
-
},
|
| 209 |
-
"execution_count": 3,
|
| 210 |
-
"metadata": {},
|
| 211 |
-
"output_type": "execute_result"
|
| 212 |
-
}
|
| 213 |
-
],
|
| 214 |
"source": [
|
| 215 |
"#preview first 5 row of data\n",
|
| 216 |
"data.head(5)"
|
|
@@ -218,7 +143,7 @@
|
|
| 218 |
},
|
| 219 |
{
|
| 220 |
"cell_type": "code",
|
| 221 |
-
"execution_count":
|
| 222 |
"metadata": {
|
| 223 |
"execution": {
|
| 224 |
"iopub.execute_input": "2023-04-25T22:21:52.517159Z",
|
|
@@ -228,22 +153,7 @@
|
|
| 228 |
"shell.execute_reply.started": "2023-04-25T22:21:52.517101Z"
|
| 229 |
}
|
| 230 |
},
|
| 231 |
-
"outputs": [
|
| 232 |
-
{
|
| 233 |
-
"data": {
|
| 234 |
-
"text/plain": [
|
| 235 |
-
"Usage\n",
|
| 236 |
-
"Training 28709\n",
|
| 237 |
-
"PublicTest 3589\n",
|
| 238 |
-
"PrivateTest 3589\n",
|
| 239 |
-
"Name: count, dtype: int64"
|
| 240 |
-
]
|
| 241 |
-
},
|
| 242 |
-
"execution_count": 4,
|
| 243 |
-
"metadata": {},
|
| 244 |
-
"output_type": "execute_result"
|
| 245 |
-
}
|
| 246 |
-
],
|
| 247 |
"source": [
|
| 248 |
"#check usage values\n",
|
| 249 |
"#80% training, 10% validation and 10% test\n",
|
|
@@ -252,7 +162,7 @@
|
|
| 252 |
},
|
| 253 |
{
|
| 254 |
"cell_type": "code",
|
| 255 |
-
"execution_count":
|
| 256 |
"metadata": {
|
| 257 |
"execution": {
|
| 258 |
"iopub.execute_input": "2023-04-25T22:21:56.062661Z",
|
|
@@ -262,88 +172,7 @@
|
|
| 262 |
"shell.execute_reply.started": "2023-04-25T22:21:56.062605Z"
|
| 263 |
}
|
| 264 |
},
|
| 265 |
-
"outputs": [
|
| 266 |
-
{
|
| 267 |
-
"data": {
|
| 268 |
-
"text/html": [
|
| 269 |
-
"<div>\n",
|
| 270 |
-
"<style scoped>\n",
|
| 271 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 272 |
-
" vertical-align: middle;\n",
|
| 273 |
-
" }\n",
|
| 274 |
-
"\n",
|
| 275 |
-
" .dataframe tbody tr th {\n",
|
| 276 |
-
" vertical-align: top;\n",
|
| 277 |
-
" }\n",
|
| 278 |
-
"\n",
|
| 279 |
-
" .dataframe thead th {\n",
|
| 280 |
-
" text-align: right;\n",
|
| 281 |
-
" }\n",
|
| 282 |
-
"</style>\n",
|
| 283 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 284 |
-
" <thead>\n",
|
| 285 |
-
" <tr style=\"text-align: right;\">\n",
|
| 286 |
-
" <th></th>\n",
|
| 287 |
-
" <th>emotion</th>\n",
|
| 288 |
-
" <th>number</th>\n",
|
| 289 |
-
" </tr>\n",
|
| 290 |
-
" </thead>\n",
|
| 291 |
-
" <tbody>\n",
|
| 292 |
-
" <tr>\n",
|
| 293 |
-
" <th>0</th>\n",
|
| 294 |
-
" <td>Angry</td>\n",
|
| 295 |
-
" <td>4953</td>\n",
|
| 296 |
-
" </tr>\n",
|
| 297 |
-
" <tr>\n",
|
| 298 |
-
" <th>1</th>\n",
|
| 299 |
-
" <td>Fear</td>\n",
|
| 300 |
-
" <td>5121</td>\n",
|
| 301 |
-
" </tr>\n",
|
| 302 |
-
" <tr>\n",
|
| 303 |
-
" <th>2</th>\n",
|
| 304 |
-
" <td>Sad</td>\n",
|
| 305 |
-
" <td>6077</td>\n",
|
| 306 |
-
" </tr>\n",
|
| 307 |
-
" <tr>\n",
|
| 308 |
-
" <th>3</th>\n",
|
| 309 |
-
" <td>Neutral</td>\n",
|
| 310 |
-
" <td>6198</td>\n",
|
| 311 |
-
" </tr>\n",
|
| 312 |
-
" <tr>\n",
|
| 313 |
-
" <th>4</th>\n",
|
| 314 |
-
" <td>Happy</td>\n",
|
| 315 |
-
" <td>8989</td>\n",
|
| 316 |
-
" </tr>\n",
|
| 317 |
-
" <tr>\n",
|
| 318 |
-
" <th>5</th>\n",
|
| 319 |
-
" <td>Surprise</td>\n",
|
| 320 |
-
" <td>4002</td>\n",
|
| 321 |
-
" </tr>\n",
|
| 322 |
-
" <tr>\n",
|
| 323 |
-
" <th>6</th>\n",
|
| 324 |
-
" <td>Digust</td>\n",
|
| 325 |
-
" <td>547</td>\n",
|
| 326 |
-
" </tr>\n",
|
| 327 |
-
" </tbody>\n",
|
| 328 |
-
"</table>\n",
|
| 329 |
-
"</div>"
|
| 330 |
-
],
|
| 331 |
-
"text/plain": [
|
| 332 |
-
" emotion number\n",
|
| 333 |
-
"0 Angry 4953\n",
|
| 334 |
-
"1 Fear 5121\n",
|
| 335 |
-
"2 Sad 6077\n",
|
| 336 |
-
"3 Neutral 6198\n",
|
| 337 |
-
"4 Happy 8989\n",
|
| 338 |
-
"5 Surprise 4002\n",
|
| 339 |
-
"6 Digust 547"
|
| 340 |
-
]
|
| 341 |
-
},
|
| 342 |
-
"execution_count": 5,
|
| 343 |
-
"metadata": {},
|
| 344 |
-
"output_type": "execute_result"
|
| 345 |
-
}
|
| 346 |
-
],
|
| 347 |
"source": [
|
| 348 |
"#check target labels\n",
|
| 349 |
"emotion_map = {0: 'Angry', 1: 'Digust', 2: 'Fear', 3: 'Happy', 4: 'Sad', 5: 'Surprise', 6: 'Neutral'}\n",
|
|
@@ -355,7 +184,7 @@
|
|
| 355 |
},
|
| 356 |
{
|
| 357 |
"cell_type": "code",
|
| 358 |
-
"execution_count":
|
| 359 |
"metadata": {
|
| 360 |
"execution": {
|
| 361 |
"iopub.execute_input": "2023-04-25T22:21:59.919001Z",
|
|
@@ -393,7 +222,7 @@
|
|
| 393 |
},
|
| 394 |
{
|
| 395 |
"cell_type": "code",
|
| 396 |
-
"execution_count":
|
| 397 |
"metadata": {
|
| 398 |
"execution": {
|
| 399 |
"iopub.execute_input": "2023-04-25T22:22:02.488962Z",
|
|
@@ -474,7 +303,7 @@
|
|
| 474 |
"5 Surprise 4002"
|
| 475 |
]
|
| 476 |
},
|
| 477 |
-
"execution_count":
|
| 478 |
"metadata": {},
|
| 479 |
"output_type": "execute_result"
|
| 480 |
}
|
|
@@ -490,7 +319,7 @@
|
|
| 490 |
},
|
| 491 |
{
|
| 492 |
"cell_type": "code",
|
| 493 |
-
"execution_count":
|
| 494 |
"metadata": {
|
| 495 |
"execution": {
|
| 496 |
"iopub.execute_input": "2023-04-25T22:22:05.563193Z",
|
|
@@ -500,18 +329,7 @@
|
|
| 500 |
"shell.execute_reply.started": "2023-04-25T22:22:05.563141Z"
|
| 501 |
}
|
| 502 |
},
|
| 503 |
-
"outputs": [
|
| 504 |
-
{
|
| 505 |
-
"data": {
|
| 506 |
-
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAikAAAGNCAYAAADU9uF7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABAI0lEQVR4nO3deXxOZ/7/8fedkH2zJZGKCDW22hWxq1S0YWhRWmqnJaFqRktrCa2qnaKlRegMrbYzNW1tDYpaat+ZVJVSmjCWpLYkkuv3R3+5v26xJBJy1Ov5eNyPh/s6132dzznuO3nnnOuc22aMMQIAALAYp/wuAAAA4GYIKQAAwJIIKQAAwJIIKQAAwJIIKQAAwJIIKQAAwJIIKQAAwJIIKQAAwJIIKQAAwJIIKcBDpFSpUurWrVt+l5EtMTExstlsDm33q/5jx47JZrNp/vz59rZu3brJy8vrnq87k81mU0xMzH1bH2BFhBTgT+DIkSN66aWXVLp0abm5ucnHx0f169fXtGnTdOXKlfwuL18tW7bMsr/srVwbYAUF8rsAALmzdOlStW/fXq6ururSpYsee+wxpaamasOGDRo8eLAOHDigDz/8ML/LzBPx8fFycsrZ31bLli3TzJkzcxQGQkJCdOXKFRUsWDCHFebM7Wq7cuWKChTgRzQebnwCgAfY0aNH1bFjR4WEhGjNmjUqXry4fVlUVJR++uknLV26NB8rzFuurq73dPxr164pIyNDLi4ucnNzu6frupP8Xj9gBZzuAR5g48eP18WLFzV37lyHgJLp0Ucf1SuvvHLL1587d05///vfVblyZXl5ecnHx0dPPfWU9uzZk6Xv9OnTValSJXl4eKhQoUKqVauWFi1aZF/++++/a+DAgSpVqpRcXV3l7++vJ598Ujt37rzjdmzYsEGPP/643NzcVKZMGc2ePfum/W6ck5KWlqZRo0apbNmycnNzU5EiRdSgQQPFxcVJ+mMeycyZMyX9Mccj8yH937yTiRMnaurUqSpTpoxcXV118ODBm85JyfTzzz8rIiJCnp6eCgoK0ujRo3X9l8mvXbtWNptNa9eudXjdjWPerrbMthuPsOzatUtPPfWUfHx85OXlpWbNmumHH35w6DN//nzZbDZt3LhRgwYNUrFixeTp6alnnnlGZ86cufl/AGBRHEkBHmBff/21SpcurXr16t3V63/++WctWbJE7du3V2hoqBITEzV79mw1btxYBw8eVFBQkCTpo48+0oABA9SuXTu98sorunr1qvbu3astW7bohRdekCS9/PLL+uKLLxQdHa2KFSvq7Nmz2rBhgw4dOqQaNWrcsoZ9+/apefPmKlasmGJiYnTt2jWNHDlSAQEBd6w/JiZGY8eOVa9evVS7dm0lJydr+/bt2rlzp5588km99NJLOnXqlOLi4vSPf/zjpmPExsbq6tWr6tOnj1xdXVW4cGFlZGTctG96erpatGihunXravz48VqxYoVGjhypa9euafTo0Xes93rZqe16Bw4cUMOGDeXj46PXXntNBQsW1OzZs9WkSROtW7dOderUcejfv39/FSpUSCNHjtSxY8c0depURUdHa/HixTmqE8hXBsADKSkpyUgyrVu3zvZrQkJCTNeuXe3Pr169atLT0x36HD161Li6uprRo0fb21q3bm0qVap027F9fX1NVFRUtmvJ1KZNG+Pm5mZ++eUXe9vBgweNs7OzufFH1I31V61a1URGRt52/KioqCzjGPPHdkoyPj4+5vTp0zddFhsba2/r2rWrkWT69+9vb8vIyDCRkZHGxcXFnDlzxhhjzHfffWckme++++6OY96qNmOMkWRGjhxpf96mTRvj4uJijhw5Ym87deqU8fb2No0aNbK3xcbGGkkmPDzcZGRk2NtfffVV4+zsbC5cuHDT9QFWxOke4AGVnJwsSfL29r7rMVxdXe0TUdPT03X27Fl5eXmpXLlyDqdp/Pz89Ouvv2rbtm23HMvPz09btmzRqVOnsr3+9PR0rVy5Um3atFHJkiXt7RUqVFBERMQdX+/n56cDBw7o8OHD2V7njdq2batixYplu390dLT93zabTdHR0UpNTdWqVavuuoY7SU9P17fffqs2bdqodOn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AAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLIqQAAABLslRISU9P1/DhwxUaGip3d3eVKVNGb731lowx9j7GGI0YMULFixeXu7u7wsPDdfjwYYdxzp07p06dOsnHx0d+fn7q2bOnLl686NBn7969atiwodzc3BQcHKzx48ffl20EAADZY6mQMm7cOH3wwQeaMWOGDh06pHHjxmn8+PGaPn26vc/48eP13nvvadasWdqyZYs8PT0VERGhq1ev2vt06tRJBw4cUFxcnL755hutX79effr0sS9PTk5W8+bNFRISoh07dmjChAmKiYnRhx9+eF+3FwAA3FqB/C7geps2bVLr1q0VGRkpSSpVqpQ++eQTbd26VdIfR1GmTp2qYcOGqXXr1pKkjz/+WAEBAVqyZIk6duyoQ4cOacWKFdq2bZtq1aolSZo+fbqefvppTZw4UUFBQVq4cKFSU1M1b948ubi4qFKlStq9e7cmT57sEGYAAED+sdSRlHr16mn16tX68ccfJUl79uzRhg0b9NRTT0mSjh49qoSEBIWHh9tf4+vrqzp16mjz5s2SpM2bN8vPz88eUCQpPDxcTk5O2rJli71Po0aN5OLiYu8TERGh+Ph4nT9/PktdKSkpSk5OdngAAIB7y1JHUoYMGaLk5GSVL19ezs7OSk9P15gxY9SpUydJUkJCgiQpICDA4XUBAQH2ZQkJCfL393dYXqBAARUuXNihT2hoaJYxMpcVKlTIYdnYsWM1atSoPNpKAACQHZY6kvLZZ59p4cKFWrRokXbu3KkFCxZo4sSJWrBgQb7WNXToUCUlJdkfJ06cyNd6AAB4GFjqSMrgwYM1ZMgQdezYUZJUuXJl/fLLLxo7dqy6du2qwMBASVJiYqKKFy9uf11iYqKqVasmSQoMDNTp06cdxr127ZrOnTtnf31gYKASExMd+mQ+z+xzPVdXV7m6uubNR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lgYKC8vb1zs4oHVs3BH+d3Cflix4Qu+V0CAOBPIlene7p376758+fr8uXLWZZdvHhRsbGx6tmzZ25WAQAAHlI5OpLy73//2+F59erVtXTpUpUvX15du3bVo48+Kkk6fPiwPv74YxUuXJibuQEAgLuSo5DSrl072Ww2GWMkyeHfY8aMydL/119/1fPPP6/nnnsuD0oFAAAPkxyFlO++++5e1QEAAOAgRyGFbzQGAAD3S64mzgIAANwrub4t/oYNGzRv3jz9/PPPOn/+vH2OSiabzaY9e/bkdjUAAOAhk6uQMnnyZA0ePFhubm4qV66cChcunFd1AQCAh1yuQsqECRNUv359ff311/L19c2rmgAAAHI3J+Xy5cvq1KkTAQUAAOS5XIWUpk2bat++fXlVCwAAgF2uQsr06dO1evVqTZw4UefOncurmgAAAHIXUoKDg/XSSy9pyJAhKlasmDw9PeXj4+Pw4FQQAAC4G7maODtixAiNGTNGjzzyiGrVqkUgAQAAeSZXIWXWrFmKjIzUkiVL5OTEfeEAAEDeyVWySE1NVWRkJAEFAADkuVyli5YtW+r777/Pq1oAAADschVSRo4cqYMHD6pfv37asWOHzpw5o3PnzmV5AAAA5FSu5qSUK1dOkrR7927Nnj37lv3S09NzsxoAAPAQyvXVPTabLa9qAQAAsMtVSImJicmjMgAAABxxWQ4AALCkXB1JGT169B372Gw2DR8+PDerAQAAD6F7drrHZrPJGENIAQAAdyVXp3syMjKyPK5du6YjR47o1VdfVa1atXT69Om8qhUAADxE8nxOipOTk0JDQzVx4kSVLVtW/fv3z+tVAACAh8A9nTjbqFEjLVu27K5e++6778pms2ngwIH2tqtXryoqKkpFihSRl5eX2rZtq8TERIfXHT9+XJGRkfLw8JC/v78GDx6sa9euOfRZu3atatSoIVdXVz366KOaP3/+XdUIAADunXsaUrZv335X3+uzbds2zZ49W1WqVHFof/XVV/X111/r888/17p163Tq1Ck9++yz9uXp6emKjIxUamqqNm3apAULFmj+/PkaMWKEvc/Ro0cVGRmppk2bavfu3Ro4cKB69eqllStX3v2GAgCAPJeribMff/z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wRYmhoqJYuXapXX31V06ZNU4kSJTRnzhwuPwYAwGJyHVIyj5xcH06GDRum0qVL57q4G4/auLm5aebMmZo5c+YtXxMSEnLHu9w2adJEu3btynV9AADg3rnrkJKQkKB3331XH330kdLS0vTiiy9q2LBhCg0Nzcv6AADAQyrHIeW3336zh5Nr166pS5cuevPNNwknAAAgT+U4pJQpU0YpKSmqVq2a3njjDYWGhur8+fM6f/78LV9z/WXFAAAA2ZHjkHL16lVJ0q5du/Tcc8/dtq8xRjabTenp6XdXHQAAeGjlOKTExsbeizoAAAAc5DikdO3a9V7UAQAA4MApvwsAAAC4GUIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEIKAACwJEuFlLFjx+rxxx+Xt7e3/P391aZNG8XHxzv0uXr1qqKiolSkSBF5eXmpbdu2SkxMdOhz/PhxRUZGysPDQ/7+/ho8eLCuXbvm0Gft2rWqUaOGXF1d9eijj2r+/Pn3evMAAEAOWCqkrFu3TlFRUfrhhx8UFxentLQ0NW/eXJcuXbL3efXVV/X111/r888/17p163Tq1Ck9++yz9uXp6emKjIxUamqqNm3apAULFmj+/PkaMWKEvc/Ro0cVGRmppk2bavfu3Ro4cKB69eqllStX3tftBQAAt1Ygvwu43ooVKxyez58/X/7+/tqxY4caNWqkpKQkzZ07V4sWLdITTzwhSYqNjVWFChX0ww8/qG7duvr222918OBBrVq1SgEBAapWrZreeustvf7664qJiZGLi4tmz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UZ+/777yXJ4b1zq/fNzX6WZ8edXhccHKz4+HitWrVKcXFx6tevnyZMmKB169bp4sWLcnZ21o4dO+Ts7OzwOi8vr7uq53YIKRZw7do1ffzxx5o0aZKaN2/usKxNmzb65JNPVL58+TuOU65cOW3btk1dunSxt10/z+R2ChQooK5duyo2NlYuLi7q2LGj3N3dc7YhFlejRg3Fx8dn+cGZaceOHcrIyNCkSZPsV+t89tln97NEy6pYsaKWLFmSrX1UoUIFbdmyxaHthx9+uG+15rV3331X1apVs08wlP54Lx08ePCW7yXpj6vJrp8Hcfjw4SxH5CQ5HBG4lf/+9786e/as3n33XQUHB0uStm/fnuNtsZKNGzeqdevW6ty5s6Q//tj68ccfVbFiRYd+N3svlS1b1uEX5I3vrx9++EEVKlSwPy9SpIjatGmj2NhYbd682ZJz7TI/Y5lX2fz222+qXr26JOXoMvXjx487XBn6ww8/yMnJyeH9mx3u7u5q1aqVWrVqpaioKJUvX1779u1T9erVlZ6ertOnT9+XoEdIsYBvvvlG58+fV8+ePeXr6+uwrG3btpo7d64mTJhwx3H69++v3r17q1atWqpXr54WL16svXv3qnTp0tmqo1evXvYP9p/xnhgjRoxQy5YtVbJkSbVr105OTk7as2eP9u/fr7fffluPPvqo0tLSNH36dLVq1UobN27UrFmz8rvs++rs2bNq3769evTooSpVqsjb21vbt2/X+PHj1bp162ztowEDBqh+/fqaOHGiWrdurZUrV2rFihX5tEW5V7lyZXXq1Envvfeeve31119X3bp1FR0drV69esnT01MHDx5UXFyc/cjnE088oRkzZigsLEzp6el6/fXXHY6E+vv7y93dXStWrFCJEiXk5uaW5fOfqWTJknJxcdH06dP18ssva//+/Xrrrbfu7YbfY2XLltUXX3yhTZs2qVChQpo8ebISExOzhJTjx49r0KBBeumll7Rz505Nnz5dkyZNcuizceNGjR8/Xm3atFFcXJw+//xzLV261KFPr1691LJlS6Wnp6tr1673fPtu5U6fMXd3d9WtW1fvvvuuQkNDdfr0aQ0bNizb47u5ualr166aOHGikpOTNWDAAD333HMK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Kk//znP8rIyMhxTQD+D6d7AOSZ2rVr33HibMmSJR2eZwaW4ODgm7afP39ekvTLL79IksqVK+fQz8XFRaVLl7Yvz4lbjSlJFSpU0MqVK3Xp0iV5enresv5ChQrZ6/Tx8VGHDh00Z84c9erVS0OGDFGzZs307LPPql27dg7hCsCd8YkBcF85OzvnqN0Ycy/LybE71enu7q7169dr1apVevHFF7V371516NBBTz75pNLT0+9nqcADj5AC4IEQEhIiSYqPj3doT01N1dGjR+3LpT8m6+ZmTEn673//q6JFizocRckuJycnNWvWTJMnT9bBgwc1ZswYrVmzRt99912OxwIeZoQUAA+E8PBwubi46L333nM4ujJ37lwlJSUpMjLS3ubp6amkpKQ7jlm8eHFVq1ZNCxYscLiMef/+/fr222/19NNP57jOm102Xa1aNUlSSkpKjscDHmbMSQGQZ5YvX67//ve/Wdrr1auX6/kYxYoV09ChQzVq1Ci1aNFCf/3rXxUfH6/3339fjz/+uDp37mzvW7NmTS1evFiDBg3S448/Li8vL7Vq1eqm406YMEFPPfWUwsLC1LNnT/slyL6+voqJiclxnaNHj9b69esVGRmpkJAQnT59Wu+//75KlCihBg0a3O3mAw8lQgqAPDNixIibtsfGxqpJkya5Hj8mJkbFihXTjBkz9Oqrr6pw4cLq06eP3nnnHYdb3ffr10+7d+9WbGyspkyZopCQkFuGlPDwcK1YsUIjR47UiBEjVLBgQTVu3Fjjxo276S3+7+Svf/2rjh07pnnz5ul///ufihYtqsaNG2vUqFEOVzUBuDObsdqsNAAAADEnBQAAWBQhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWBIhBQAAWNL/A5UNj9/6nrcAAAAAAElFTkSuQmCC\n",
|
| 507 |
-
"text/plain": [
|
| 508 |
-
"<Figure size 600x400 with 1 Axes>"
|
| 509 |
-
]
|
| 510 |
-
},
|
| 511 |
-
"metadata": {},
|
| 512 |
-
"output_type": "display_data"
|
| 513 |
-
}
|
| 514 |
-
],
|
| 515 |
"source": [
|
| 516 |
"# Plotting a bar graph of the class distributions\n",
|
| 517 |
"plt.figure(figsize=(6,4))\n",
|
|
@@ -531,7 +349,7 @@
|
|
| 531 |
},
|
| 532 |
{
|
| 533 |
"cell_type": "code",
|
| 534 |
-
"execution_count":
|
| 535 |
"metadata": {
|
| 536 |
"execution": {
|
| 537 |
"iopub.execute_input": "2023-04-25T22:22:12.246026Z",
|
|
@@ -549,7 +367,7 @@
|
|
| 549 |
"traceback": [
|
| 550 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 551 |
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
|
| 552 |
-
"\u001b[0;32m<ipython-input-
|
| 553 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexing.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 1151\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1152\u001b[0m \u001b[0mmaybe_callable\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply_if_callable\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1153\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_getitem_axis\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmaybe_callable\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1154\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1155\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_is_scalar_access\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtuple\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 554 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexing.py\u001b[0m in \u001b[0;36m_getitem_axis\u001b[0;34m(self, key, axis)\u001b[0m\n\u001b[1;32m 1712\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1713\u001b[0m \u001b[0;31m# validate the location\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1714\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_validate_integer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1715\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1716\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_ixs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 555 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexing.py\u001b[0m in \u001b[0;36m_validate_integer\u001b[0;34m(self, key, axis)\u001b[0m\n\u001b[1;32m 1645\u001b[0m \u001b[0mlen_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_axis\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1646\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;34m>=\u001b[0m \u001b[0mlen_axis\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0;34m-\u001b[0m\u001b[0mlen_axis\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1647\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"single positional indexer is out-of-bounds\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1648\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1649\u001b[0m \u001b[0;31m# -------------------------------------------------------------------\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
|
|
| 125 |
},
|
| 126 |
{
|
| 127 |
"cell_type": "code",
|
| 128 |
+
"execution_count": null,
|
| 129 |
"metadata": {
|
| 130 |
"execution": {
|
| 131 |
"iopub.execute_input": "2023-04-25T22:21:45.091494Z",
|
|
|
|
| 135 |
"shell.execute_reply.started": "2023-04-25T22:21:45.091436Z"
|
| 136 |
}
|
| 137 |
},
|
| 138 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
"source": [
|
| 140 |
"#preview first 5 row of data\n",
|
| 141 |
"data.head(5)"
|
|
|
|
| 143 |
},
|
| 144 |
{
|
| 145 |
"cell_type": "code",
|
| 146 |
+
"execution_count": null,
|
| 147 |
"metadata": {
|
| 148 |
"execution": {
|
| 149 |
"iopub.execute_input": "2023-04-25T22:21:52.517159Z",
|
|
|
|
| 153 |
"shell.execute_reply.started": "2023-04-25T22:21:52.517101Z"
|
| 154 |
}
|
| 155 |
},
|
| 156 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
"source": [
|
| 158 |
"#check usage values\n",
|
| 159 |
"#80% training, 10% validation and 10% test\n",
|
|
|
|
| 162 |
},
|
| 163 |
{
|
| 164 |
"cell_type": "code",
|
| 165 |
+
"execution_count": null,
|
| 166 |
"metadata": {
|
| 167 |
"execution": {
|
| 168 |
"iopub.execute_input": "2023-04-25T22:21:56.062661Z",
|
|
|
|
| 172 |
"shell.execute_reply.started": "2023-04-25T22:21:56.062605Z"
|
| 173 |
}
|
| 174 |
},
|
| 175 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
"source": [
|
| 177 |
"#check target labels\n",
|
| 178 |
"emotion_map = {0: 'Angry', 1: 'Digust', 2: 'Fear', 3: 'Happy', 4: 'Sad', 5: 'Surprise', 6: 'Neutral'}\n",
|
|
|
|
| 184 |
},
|
| 185 |
{
|
| 186 |
"cell_type": "code",
|
| 187 |
+
"execution_count": 3,
|
| 188 |
"metadata": {
|
| 189 |
"execution": {
|
| 190 |
"iopub.execute_input": "2023-04-25T22:21:59.919001Z",
|
|
|
|
| 222 |
},
|
| 223 |
{
|
| 224 |
"cell_type": "code",
|
| 225 |
+
"execution_count": 5,
|
| 226 |
"metadata": {
|
| 227 |
"execution": {
|
| 228 |
"iopub.execute_input": "2023-04-25T22:22:02.488962Z",
|
|
|
|
| 303 |
"5 Surprise 4002"
|
| 304 |
]
|
| 305 |
},
|
| 306 |
+
"execution_count": 5,
|
| 307 |
"metadata": {},
|
| 308 |
"output_type": "execute_result"
|
| 309 |
}
|
|
|
|
| 319 |
},
|
| 320 |
{
|
| 321 |
"cell_type": "code",
|
| 322 |
+
"execution_count": null,
|
| 323 |
"metadata": {
|
| 324 |
"execution": {
|
| 325 |
"iopub.execute_input": "2023-04-25T22:22:05.563193Z",
|
|
|
|
| 329 |
"shell.execute_reply.started": "2023-04-25T22:22:05.563141Z"
|
| 330 |
}
|
| 331 |
},
|
| 332 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
"source": [
|
| 334 |
"# Plotting a bar graph of the class distributions\n",
|
| 335 |
"plt.figure(figsize=(6,4))\n",
|
|
|
|
| 349 |
},
|
| 350 |
{
|
| 351 |
"cell_type": "code",
|
| 352 |
+
"execution_count": 6,
|
| 353 |
"metadata": {
|
| 354 |
"execution": {
|
| 355 |
"iopub.execute_input": "2023-04-25T22:22:12.246026Z",
|
|
|
|
| 367 |
"traceback": [
|
| 368 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 369 |
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
|
| 370 |
+
"\u001b[0;32m<ipython-input-6-48ca96f763ed>\u001b[0m in \u001b[0;36m<cell line: 13>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfigure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfigsize\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m16\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m10\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m8\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0mface\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'emotion'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mi\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0miloc\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 15\u001b[0m \u001b[0;31m# fix 1 (corresponding fixes)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0mimg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrow2image\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mface\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# img = row2image(face)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 371 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexing.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 1151\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1152\u001b[0m \u001b[0mmaybe_callable\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply_if_callable\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1153\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_getitem_axis\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmaybe_callable\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1154\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1155\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_is_scalar_access\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mtuple\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 372 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexing.py\u001b[0m in \u001b[0;36m_getitem_axis\u001b[0;34m(self, key, axis)\u001b[0m\n\u001b[1;32m 1712\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1713\u001b[0m \u001b[0;31m# validate the location\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1714\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_validate_integer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1715\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1716\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_ixs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 373 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexing.py\u001b[0m in \u001b[0;36m_validate_integer\u001b[0;34m(self, key, axis)\u001b[0m\n\u001b[1;32m 1645\u001b[0m \u001b[0mlen_axis\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_axis\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1646\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;34m>=\u001b[0m \u001b[0mlen_axis\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0;34m-\u001b[0m\u001b[0mlen_axis\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1647\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"single positional indexer is out-of-bounds\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1648\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1649\u001b[0m \u001b[0;31m# -------------------------------------------------------------------\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
benchmark/pandas_5/pandas_5_fixed.ipynb
CHANGED
|
@@ -603,7 +603,7 @@
|
|
| 603 |
},
|
| 604 |
{
|
| 605 |
"cell_type": "code",
|
| 606 |
-
"execution_count":
|
| 607 |
"metadata": {
|
| 608 |
"execution": {
|
| 609 |
"iopub.execute_input": "2023-11-16T05:40:08.587382Z",
|
|
@@ -613,150 +613,7 @@
|
|
| 613 |
"shell.execute_reply.started": "2023-11-16T05:40:08.587345Z"
|
| 614 |
}
|
| 615 |
},
|
| 616 |
-
"outputs": [
|
| 617 |
-
{
|
| 618 |
-
"data": {
|
| 619 |
-
"text/html": [
|
| 620 |
-
"<div>\n",
|
| 621 |
-
"<style scoped>\n",
|
| 622 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 623 |
-
" vertical-align: middle;\n",
|
| 624 |
-
" }\n",
|
| 625 |
-
"\n",
|
| 626 |
-
" .dataframe tbody tr th {\n",
|
| 627 |
-
" vertical-align: top;\n",
|
| 628 |
-
" }\n",
|
| 629 |
-
"\n",
|
| 630 |
-
" .dataframe thead th {\n",
|
| 631 |
-
" text-align: right;\n",
|
| 632 |
-
" }\n",
|
| 633 |
-
"</style>\n",
|
| 634 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 635 |
-
" <thead>\n",
|
| 636 |
-
" <tr style=\"text-align: right;\">\n",
|
| 637 |
-
" <th></th>\n",
|
| 638 |
-
" <th>id</th>\n",
|
| 639 |
-
" <th>Gender</th>\n",
|
| 640 |
-
" <th>Age</th>\n",
|
| 641 |
-
" <th>Driving_License</th>\n",
|
| 642 |
-
" <th>Region_Code</th>\n",
|
| 643 |
-
" <th>Previously_Insured</th>\n",
|
| 644 |
-
" <th>Vehicle_Age</th>\n",
|
| 645 |
-
" <th>Vehicle_Damage</th>\n",
|
| 646 |
-
" <th>Annual_Premium</th>\n",
|
| 647 |
-
" <th>Policy_Sales_Channel</th>\n",
|
| 648 |
-
" <th>Vintage</th>\n",
|
| 649 |
-
" <th>Response</th>\n",
|
| 650 |
-
" </tr>\n",
|
| 651 |
-
" </thead>\n",
|
| 652 |
-
" <tbody>\n",
|
| 653 |
-
" <tr>\n",
|
| 654 |
-
" <th>0</th>\n",
|
| 655 |
-
" <td>1</td>\n",
|
| 656 |
-
" <td>Male</td>\n",
|
| 657 |
-
" <td>44</td>\n",
|
| 658 |
-
" <td>1</td>\n",
|
| 659 |
-
" <td>28.0</td>\n",
|
| 660 |
-
" <td>0</td>\n",
|
| 661 |
-
" <td>> 2 Years</td>\n",
|
| 662 |
-
" <td>Yes</td>\n",
|
| 663 |
-
" <td>40454.0</td>\n",
|
| 664 |
-
" <td>26.0</td>\n",
|
| 665 |
-
" <td>217</td>\n",
|
| 666 |
-
" <td>1</td>\n",
|
| 667 |
-
" </tr>\n",
|
| 668 |
-
" <tr>\n",
|
| 669 |
-
" <th>1</th>\n",
|
| 670 |
-
" <td>2</td>\n",
|
| 671 |
-
" <td>Male</td>\n",
|
| 672 |
-
" <td>76</td>\n",
|
| 673 |
-
" <td>1</td>\n",
|
| 674 |
-
" <td>3.0</td>\n",
|
| 675 |
-
" <td>0</td>\n",
|
| 676 |
-
" <td>1-2 Year</td>\n",
|
| 677 |
-
" <td>No</td>\n",
|
| 678 |
-
" <td>33536.0</td>\n",
|
| 679 |
-
" <td>26.0</td>\n",
|
| 680 |
-
" <td>183</td>\n",
|
| 681 |
-
" <td>0</td>\n",
|
| 682 |
-
" </tr>\n",
|
| 683 |
-
" <tr>\n",
|
| 684 |
-
" <th>2</th>\n",
|
| 685 |
-
" <td>3</td>\n",
|
| 686 |
-
" <td>Male</td>\n",
|
| 687 |
-
" <td>47</td>\n",
|
| 688 |
-
" <td>1</td>\n",
|
| 689 |
-
" <td>28.0</td>\n",
|
| 690 |
-
" <td>0</td>\n",
|
| 691 |
-
" <td>> 2 Years</td>\n",
|
| 692 |
-
" <td>Yes</td>\n",
|
| 693 |
-
" <td>38294.0</td>\n",
|
| 694 |
-
" <td>26.0</td>\n",
|
| 695 |
-
" <td>27</td>\n",
|
| 696 |
-
" <td>1</td>\n",
|
| 697 |
-
" </tr>\n",
|
| 698 |
-
" <tr>\n",
|
| 699 |
-
" <th>3</th>\n",
|
| 700 |
-
" <td>4</td>\n",
|
| 701 |
-
" <td>Male</td>\n",
|
| 702 |
-
" <td>21</td>\n",
|
| 703 |
-
" <td>1</td>\n",
|
| 704 |
-
" <td>11.0</td>\n",
|
| 705 |
-
" <td>1</td>\n",
|
| 706 |
-
" <td>< 1 Year</td>\n",
|
| 707 |
-
" <td>No</td>\n",
|
| 708 |
-
" <td>28619.0</td>\n",
|
| 709 |
-
" <td>152.0</td>\n",
|
| 710 |
-
" <td>203</td>\n",
|
| 711 |
-
" <td>0</td>\n",
|
| 712 |
-
" </tr>\n",
|
| 713 |
-
" <tr>\n",
|
| 714 |
-
" <th>4</th>\n",
|
| 715 |
-
" <td>5</td>\n",
|
| 716 |
-
" <td>Female</td>\n",
|
| 717 |
-
" <td>29</td>\n",
|
| 718 |
-
" <td>1</td>\n",
|
| 719 |
-
" <td>41.0</td>\n",
|
| 720 |
-
" <td>1</td>\n",
|
| 721 |
-
" <td>< 1 Year</td>\n",
|
| 722 |
-
" <td>No</td>\n",
|
| 723 |
-
" <td>27496.0</td>\n",
|
| 724 |
-
" <td>152.0</td>\n",
|
| 725 |
-
" <td>39</td>\n",
|
| 726 |
-
" <td>0</td>\n",
|
| 727 |
-
" </tr>\n",
|
| 728 |
-
" </tbody>\n",
|
| 729 |
-
"</table>\n",
|
| 730 |
-
"</div>"
|
| 731 |
-
],
|
| 732 |
-
"text/plain": [
|
| 733 |
-
" id Gender Age Driving_License Region_Code Previously_Insured \\\n",
|
| 734 |
-
"0 1 Male 44 1 28.0 0 \n",
|
| 735 |
-
"1 2 Male 76 1 3.0 0 \n",
|
| 736 |
-
"2 3 Male 47 1 28.0 0 \n",
|
| 737 |
-
"3 4 Male 21 1 11.0 1 \n",
|
| 738 |
-
"4 5 Female 29 1 41.0 1 \n",
|
| 739 |
-
"\n",
|
| 740 |
-
" Vehicle_Age Vehicle_Damage Annual_Premium Policy_Sales_Channel Vintage \\\n",
|
| 741 |
-
"0 > 2 Years Yes 40454.0 26.0 217 \n",
|
| 742 |
-
"1 1-2 Year No 33536.0 26.0 183 \n",
|
| 743 |
-
"2 > 2 Years Yes 38294.0 26.0 27 \n",
|
| 744 |
-
"3 < 1 Year No 28619.0 152.0 203 \n",
|
| 745 |
-
"4 < 1 Year No 27496.0 152.0 39 \n",
|
| 746 |
-
"\n",
|
| 747 |
-
" Response \n",
|
| 748 |
-
"0 1 \n",
|
| 749 |
-
"1 0 \n",
|
| 750 |
-
"2 1 \n",
|
| 751 |
-
"3 0 \n",
|
| 752 |
-
"4 0 "
|
| 753 |
-
]
|
| 754 |
-
},
|
| 755 |
-
"execution_count": 3,
|
| 756 |
-
"metadata": {},
|
| 757 |
-
"output_type": "execute_result"
|
| 758 |
-
}
|
| 759 |
-
],
|
| 760 |
"source": [
|
| 761 |
"# Different id nos from the other notebook\n",
|
| 762 |
"test.head() "
|
|
@@ -764,7 +621,7 @@
|
|
| 764 |
},
|
| 765 |
{
|
| 766 |
"cell_type": "code",
|
| 767 |
-
"execution_count":
|
| 768 |
"metadata": {
|
| 769 |
"execution": {
|
| 770 |
"iopub.execute_input": "2023-11-16T05:39:42.640987Z",
|
|
@@ -774,157 +631,14 @@
|
|
| 774 |
"shell.execute_reply.started": "2023-11-16T05:39:42.640955Z"
|
| 775 |
}
|
| 776 |
},
|
| 777 |
-
"outputs": [
|
| 778 |
-
{
|
| 779 |
-
"data": {
|
| 780 |
-
"text/html": [
|
| 781 |
-
"<div>\n",
|
| 782 |
-
"<style scoped>\n",
|
| 783 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 784 |
-
" vertical-align: middle;\n",
|
| 785 |
-
" }\n",
|
| 786 |
-
"\n",
|
| 787 |
-
" .dataframe tbody tr th {\n",
|
| 788 |
-
" vertical-align: top;\n",
|
| 789 |
-
" }\n",
|
| 790 |
-
"\n",
|
| 791 |
-
" .dataframe thead th {\n",
|
| 792 |
-
" text-align: right;\n",
|
| 793 |
-
" }\n",
|
| 794 |
-
"</style>\n",
|
| 795 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 796 |
-
" <thead>\n",
|
| 797 |
-
" <tr style=\"text-align: right;\">\n",
|
| 798 |
-
" <th></th>\n",
|
| 799 |
-
" <th>id</th>\n",
|
| 800 |
-
" <th>Gender</th>\n",
|
| 801 |
-
" <th>Age</th>\n",
|
| 802 |
-
" <th>Driving_License</th>\n",
|
| 803 |
-
" <th>Region_Code</th>\n",
|
| 804 |
-
" <th>Previously_Insured</th>\n",
|
| 805 |
-
" <th>Vehicle_Age</th>\n",
|
| 806 |
-
" <th>Vehicle_Damage</th>\n",
|
| 807 |
-
" <th>Annual_Premium</th>\n",
|
| 808 |
-
" <th>Policy_Sales_Channel</th>\n",
|
| 809 |
-
" <th>Vintage</th>\n",
|
| 810 |
-
" <th>Response</th>\n",
|
| 811 |
-
" </tr>\n",
|
| 812 |
-
" </thead>\n",
|
| 813 |
-
" <tbody>\n",
|
| 814 |
-
" <tr>\n",
|
| 815 |
-
" <th>0</th>\n",
|
| 816 |
-
" <td>1</td>\n",
|
| 817 |
-
" <td>Male</td>\n",
|
| 818 |
-
" <td>44</td>\n",
|
| 819 |
-
" <td>1</td>\n",
|
| 820 |
-
" <td>28.0</td>\n",
|
| 821 |
-
" <td>0</td>\n",
|
| 822 |
-
" <td>> 2 Years</td>\n",
|
| 823 |
-
" <td>Yes</td>\n",
|
| 824 |
-
" <td>40454.0</td>\n",
|
| 825 |
-
" <td>26.0</td>\n",
|
| 826 |
-
" <td>217</td>\n",
|
| 827 |
-
" <td>1</td>\n",
|
| 828 |
-
" </tr>\n",
|
| 829 |
-
" <tr>\n",
|
| 830 |
-
" <th>1</th>\n",
|
| 831 |
-
" <td>2</td>\n",
|
| 832 |
-
" <td>Male</td>\n",
|
| 833 |
-
" <td>76</td>\n",
|
| 834 |
-
" <td>1</td>\n",
|
| 835 |
-
" <td>3.0</td>\n",
|
| 836 |
-
" <td>0</td>\n",
|
| 837 |
-
" <td>1-2 Year</td>\n",
|
| 838 |
-
" <td>No</td>\n",
|
| 839 |
-
" <td>33536.0</td>\n",
|
| 840 |
-
" <td>26.0</td>\n",
|
| 841 |
-
" <td>183</td>\n",
|
| 842 |
-
" <td>0</td>\n",
|
| 843 |
-
" </tr>\n",
|
| 844 |
-
" <tr>\n",
|
| 845 |
-
" <th>2</th>\n",
|
| 846 |
-
" <td>3</td>\n",
|
| 847 |
-
" <td>Male</td>\n",
|
| 848 |
-
" <td>47</td>\n",
|
| 849 |
-
" <td>1</td>\n",
|
| 850 |
-
" <td>28.0</td>\n",
|
| 851 |
-
" <td>0</td>\n",
|
| 852 |
-
" <td>> 2 Years</td>\n",
|
| 853 |
-
" <td>Yes</td>\n",
|
| 854 |
-
" <td>38294.0</td>\n",
|
| 855 |
-
" <td>26.0</td>\n",
|
| 856 |
-
" <td>27</td>\n",
|
| 857 |
-
" <td>1</td>\n",
|
| 858 |
-
" </tr>\n",
|
| 859 |
-
" <tr>\n",
|
| 860 |
-
" <th>3</th>\n",
|
| 861 |
-
" <td>4</td>\n",
|
| 862 |
-
" <td>Male</td>\n",
|
| 863 |
-
" <td>21</td>\n",
|
| 864 |
-
" <td>1</td>\n",
|
| 865 |
-
" <td>11.0</td>\n",
|
| 866 |
-
" <td>1</td>\n",
|
| 867 |
-
" <td>< 1 Year</td>\n",
|
| 868 |
-
" <td>No</td>\n",
|
| 869 |
-
" <td>28619.0</td>\n",
|
| 870 |
-
" <td>152.0</td>\n",
|
| 871 |
-
" <td>203</td>\n",
|
| 872 |
-
" <td>0</td>\n",
|
| 873 |
-
" </tr>\n",
|
| 874 |
-
" <tr>\n",
|
| 875 |
-
" <th>4</th>\n",
|
| 876 |
-
" <td>5</td>\n",
|
| 877 |
-
" <td>Female</td>\n",
|
| 878 |
-
" <td>29</td>\n",
|
| 879 |
-
" <td>1</td>\n",
|
| 880 |
-
" <td>41.0</td>\n",
|
| 881 |
-
" <td>1</td>\n",
|
| 882 |
-
" <td>< 1 Year</td>\n",
|
| 883 |
-
" <td>No</td>\n",
|
| 884 |
-
" <td>27496.0</td>\n",
|
| 885 |
-
" <td>152.0</td>\n",
|
| 886 |
-
" <td>39</td>\n",
|
| 887 |
-
" <td>0</td>\n",
|
| 888 |
-
" </tr>\n",
|
| 889 |
-
" </tbody>\n",
|
| 890 |
-
"</table>\n",
|
| 891 |
-
"</div>"
|
| 892 |
-
],
|
| 893 |
-
"text/plain": [
|
| 894 |
-
" id Gender Age Driving_License Region_Code Previously_Insured \\\n",
|
| 895 |
-
"0 1 Male 44 1 28.0 0 \n",
|
| 896 |
-
"1 2 Male 76 1 3.0 0 \n",
|
| 897 |
-
"2 3 Male 47 1 28.0 0 \n",
|
| 898 |
-
"3 4 Male 21 1 11.0 1 \n",
|
| 899 |
-
"4 5 Female 29 1 41.0 1 \n",
|
| 900 |
-
"\n",
|
| 901 |
-
" Vehicle_Age Vehicle_Damage Annual_Premium Policy_Sales_Channel Vintage \\\n",
|
| 902 |
-
"0 > 2 Years Yes 40454.0 26.0 217 \n",
|
| 903 |
-
"1 1-2 Year No 33536.0 26.0 183 \n",
|
| 904 |
-
"2 > 2 Years Yes 38294.0 26.0 27 \n",
|
| 905 |
-
"3 < 1 Year No 28619.0 152.0 203 \n",
|
| 906 |
-
"4 < 1 Year No 27496.0 152.0 39 \n",
|
| 907 |
-
"\n",
|
| 908 |
-
" Response \n",
|
| 909 |
-
"0 1 \n",
|
| 910 |
-
"1 0 \n",
|
| 911 |
-
"2 1 \n",
|
| 912 |
-
"3 0 \n",
|
| 913 |
-
"4 0 "
|
| 914 |
-
]
|
| 915 |
-
},
|
| 916 |
-
"execution_count": 4,
|
| 917 |
-
"metadata": {},
|
| 918 |
-
"output_type": "execute_result"
|
| 919 |
-
}
|
| 920 |
-
],
|
| 921 |
"source": [
|
| 922 |
"train.head()"
|
| 923 |
]
|
| 924 |
},
|
| 925 |
{
|
| 926 |
"cell_type": "code",
|
| 927 |
-
"execution_count":
|
| 928 |
"metadata": {
|
| 929 |
"execution": {
|
| 930 |
"iopub.execute_input": "2023-11-16T05:40:31.853856Z",
|
|
@@ -934,18 +648,7 @@
|
|
| 934 |
"shell.execute_reply.started": "2023-11-16T05:40:31.853824Z"
|
| 935 |
}
|
| 936 |
},
|
| 937 |
-
"outputs": [
|
| 938 |
-
{
|
| 939 |
-
"data": {
|
| 940 |
-
"text/plain": [
|
| 941 |
-
"(381109, 12)"
|
| 942 |
-
]
|
| 943 |
-
},
|
| 944 |
-
"execution_count": 5,
|
| 945 |
-
"metadata": {},
|
| 946 |
-
"output_type": "execute_result"
|
| 947 |
-
}
|
| 948 |
-
],
|
| 949 |
"source": [
|
| 950 |
"\n",
|
| 951 |
"train.shape"
|
|
@@ -953,7 +656,7 @@
|
|
| 953 |
},
|
| 954 |
{
|
| 955 |
"cell_type": "code",
|
| 956 |
-
"execution_count":
|
| 957 |
"metadata": {
|
| 958 |
"execution": {
|
| 959 |
"iopub.execute_input": "2023-11-16T05:40:39.805712Z",
|
|
@@ -963,37 +666,14 @@
|
|
| 963 |
"shell.execute_reply.started": "2023-11-16T05:40:39.805681Z"
|
| 964 |
}
|
| 965 |
},
|
| 966 |
-
"outputs": [
|
| 967 |
-
{
|
| 968 |
-
"data": {
|
| 969 |
-
"text/plain": [
|
| 970 |
-
"id 0\n",
|
| 971 |
-
"Gender 0\n",
|
| 972 |
-
"Age 0\n",
|
| 973 |
-
"Driving_License 0\n",
|
| 974 |
-
"Region_Code 0\n",
|
| 975 |
-
"Previously_Insured 0\n",
|
| 976 |
-
"Vehicle_Age 0\n",
|
| 977 |
-
"Vehicle_Damage 0\n",
|
| 978 |
-
"Annual_Premium 0\n",
|
| 979 |
-
"Policy_Sales_Channel 0\n",
|
| 980 |
-
"Vintage 0\n",
|
| 981 |
-
"Response 0\n",
|
| 982 |
-
"dtype: int64"
|
| 983 |
-
]
|
| 984 |
-
},
|
| 985 |
-
"execution_count": 6,
|
| 986 |
-
"metadata": {},
|
| 987 |
-
"output_type": "execute_result"
|
| 988 |
-
}
|
| 989 |
-
],
|
| 990 |
"source": [
|
| 991 |
"train.isnull().sum()"
|
| 992 |
]
|
| 993 |
},
|
| 994 |
{
|
| 995 |
"cell_type": "code",
|
| 996 |
-
"execution_count":
|
| 997 |
"metadata": {
|
| 998 |
"execution": {
|
| 999 |
"iopub.execute_input": "2023-11-16T05:40:48.806458Z",
|
|
@@ -1011,7 +691,7 @@
|
|
| 1011 |
},
|
| 1012 |
{
|
| 1013 |
"cell_type": "code",
|
| 1014 |
-
"execution_count":
|
| 1015 |
"metadata": {
|
| 1016 |
"execution": {
|
| 1017 |
"iopub.execute_input": "2023-11-16T05:40:54.938097Z",
|
|
@@ -1021,112 +701,7 @@
|
|
| 1021 |
"shell.execute_reply.started": "2023-11-16T05:40:54.938068Z"
|
| 1022 |
}
|
| 1023 |
},
|
| 1024 |
-
"outputs": [
|
| 1025 |
-
{
|
| 1026 |
-
"data": {
|
| 1027 |
-
"text/html": [
|
| 1028 |
-
"<div>\n",
|
| 1029 |
-
"<style scoped>\n",
|
| 1030 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 1031 |
-
" vertical-align: middle;\n",
|
| 1032 |
-
" }\n",
|
| 1033 |
-
"\n",
|
| 1034 |
-
" .dataframe tbody tr th {\n",
|
| 1035 |
-
" vertical-align: top;\n",
|
| 1036 |
-
" }\n",
|
| 1037 |
-
"\n",
|
| 1038 |
-
" .dataframe thead th {\n",
|
| 1039 |
-
" text-align: right;\n",
|
| 1040 |
-
" }\n",
|
| 1041 |
-
"</style>\n",
|
| 1042 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 1043 |
-
" <thead>\n",
|
| 1044 |
-
" <tr style=\"text-align: right;\">\n",
|
| 1045 |
-
" <th></th>\n",
|
| 1046 |
-
" <th>Age</th>\n",
|
| 1047 |
-
" <th>Region_Code</th>\n",
|
| 1048 |
-
" <th>Annual_Premium</th>\n",
|
| 1049 |
-
" <th>Vintage</th>\n",
|
| 1050 |
-
" </tr>\n",
|
| 1051 |
-
" </thead>\n",
|
| 1052 |
-
" <tbody>\n",
|
| 1053 |
-
" <tr>\n",
|
| 1054 |
-
" <th>count</th>\n",
|
| 1055 |
-
" <td>381109.000000</td>\n",
|
| 1056 |
-
" <td>381109.000000</td>\n",
|
| 1057 |
-
" <td>381109.000000</td>\n",
|
| 1058 |
-
" <td>381109.000000</td>\n",
|
| 1059 |
-
" </tr>\n",
|
| 1060 |
-
" <tr>\n",
|
| 1061 |
-
" <th>mean</th>\n",
|
| 1062 |
-
" <td>38.822584</td>\n",
|
| 1063 |
-
" <td>26.388807</td>\n",
|
| 1064 |
-
" <td>30564.389581</td>\n",
|
| 1065 |
-
" <td>154.347397</td>\n",
|
| 1066 |
-
" </tr>\n",
|
| 1067 |
-
" <tr>\n",
|
| 1068 |
-
" <th>std</th>\n",
|
| 1069 |
-
" <td>15.511611</td>\n",
|
| 1070 |
-
" <td>13.229888</td>\n",
|
| 1071 |
-
" <td>17213.155057</td>\n",
|
| 1072 |
-
" <td>83.671304</td>\n",
|
| 1073 |
-
" </tr>\n",
|
| 1074 |
-
" <tr>\n",
|
| 1075 |
-
" <th>min</th>\n",
|
| 1076 |
-
" <td>20.000000</td>\n",
|
| 1077 |
-
" <td>0.000000</td>\n",
|
| 1078 |
-
" <td>2630.000000</td>\n",
|
| 1079 |
-
" <td>10.000000</td>\n",
|
| 1080 |
-
" </tr>\n",
|
| 1081 |
-
" <tr>\n",
|
| 1082 |
-
" <th>25%</th>\n",
|
| 1083 |
-
" <td>25.000000</td>\n",
|
| 1084 |
-
" <td>15.000000</td>\n",
|
| 1085 |
-
" <td>24405.000000</td>\n",
|
| 1086 |
-
" <td>82.000000</td>\n",
|
| 1087 |
-
" </tr>\n",
|
| 1088 |
-
" <tr>\n",
|
| 1089 |
-
" <th>50%</th>\n",
|
| 1090 |
-
" <td>36.000000</td>\n",
|
| 1091 |
-
" <td>28.000000</td>\n",
|
| 1092 |
-
" <td>31669.000000</td>\n",
|
| 1093 |
-
" <td>154.000000</td>\n",
|
| 1094 |
-
" </tr>\n",
|
| 1095 |
-
" <tr>\n",
|
| 1096 |
-
" <th>75%</th>\n",
|
| 1097 |
-
" <td>49.000000</td>\n",
|
| 1098 |
-
" <td>35.000000</td>\n",
|
| 1099 |
-
" <td>39400.000000</td>\n",
|
| 1100 |
-
" <td>227.000000</td>\n",
|
| 1101 |
-
" </tr>\n",
|
| 1102 |
-
" <tr>\n",
|
| 1103 |
-
" <th>max</th>\n",
|
| 1104 |
-
" <td>85.000000</td>\n",
|
| 1105 |
-
" <td>52.000000</td>\n",
|
| 1106 |
-
" <td>540165.000000</td>\n",
|
| 1107 |
-
" <td>299.000000</td>\n",
|
| 1108 |
-
" </tr>\n",
|
| 1109 |
-
" </tbody>\n",
|
| 1110 |
-
"</table>\n",
|
| 1111 |
-
"</div>"
|
| 1112 |
-
],
|
| 1113 |
-
"text/plain": [
|
| 1114 |
-
" Age Region_Code Annual_Premium Vintage\n",
|
| 1115 |
-
"count 381109.000000 381109.000000 381109.000000 381109.000000\n",
|
| 1116 |
-
"mean 38.822584 26.388807 30564.389581 154.347397\n",
|
| 1117 |
-
"std 15.511611 13.229888 17213.155057 83.671304\n",
|
| 1118 |
-
"min 20.000000 0.000000 2630.000000 10.000000\n",
|
| 1119 |
-
"25% 25.000000 15.000000 24405.000000 82.000000\n",
|
| 1120 |
-
"50% 36.000000 28.000000 31669.000000 154.000000\n",
|
| 1121 |
-
"75% 49.000000 35.000000 39400.000000 227.000000\n",
|
| 1122 |
-
"max 85.000000 52.000000 540165.000000 299.000000"
|
| 1123 |
-
]
|
| 1124 |
-
},
|
| 1125 |
-
"execution_count": 8,
|
| 1126 |
-
"metadata": {},
|
| 1127 |
-
"output_type": "execute_result"
|
| 1128 |
-
}
|
| 1129 |
-
],
|
| 1130 |
"source": [
|
| 1131 |
"train[numerical_columns].describe()"
|
| 1132 |
]
|
|
@@ -1519,7 +1094,7 @@
|
|
| 1519 |
},
|
| 1520 |
{
|
| 1521 |
"cell_type": "code",
|
| 1522 |
-
"execution_count":
|
| 1523 |
"metadata": {
|
| 1524 |
"execution": {
|
| 1525 |
"iopub.execute_input": "2023-11-16T05:46:58.312193Z",
|
|
@@ -1537,7 +1112,7 @@
|
|
| 1537 |
},
|
| 1538 |
{
|
| 1539 |
"cell_type": "code",
|
| 1540 |
-
"execution_count":
|
| 1541 |
"metadata": {
|
| 1542 |
"execution": {
|
| 1543 |
"iopub.execute_input": "2023-11-16T05:47:08.177008Z",
|
|
@@ -1554,7 +1129,7 @@
|
|
| 1554 |
},
|
| 1555 |
{
|
| 1556 |
"cell_type": "code",
|
| 1557 |
-
"execution_count":
|
| 1558 |
"metadata": {
|
| 1559 |
"execution": {
|
| 1560 |
"iopub.execute_input": "2023-11-16T05:47:14.997163Z",
|
|
@@ -1571,7 +1146,7 @@
|
|
| 1571 |
},
|
| 1572 |
{
|
| 1573 |
"cell_type": "code",
|
| 1574 |
-
"execution_count":
|
| 1575 |
"metadata": {
|
| 1576 |
"execution": {
|
| 1577 |
"iopub.execute_input": "2023-11-16T05:47:22.318839Z",
|
|
@@ -1591,7 +1166,7 @@
|
|
| 1591 |
},
|
| 1592 |
{
|
| 1593 |
"cell_type": "code",
|
| 1594 |
-
"execution_count":
|
| 1595 |
"metadata": {
|
| 1596 |
"execution": {
|
| 1597 |
"iopub.execute_input": "2023-11-16T05:47:29.960566Z",
|
|
@@ -1614,7 +1189,7 @@
|
|
| 1614 |
},
|
| 1615 |
{
|
| 1616 |
"cell_type": "code",
|
| 1617 |
-
"execution_count":
|
| 1618 |
"metadata": {
|
| 1619 |
"execution": {
|
| 1620 |
"iopub.execute_input": "2023-11-16T05:47:35.704010Z",
|
|
@@ -1631,7 +1206,7 @@
|
|
| 1631 |
},
|
| 1632 |
{
|
| 1633 |
"cell_type": "code",
|
| 1634 |
-
"execution_count":
|
| 1635 |
"metadata": {
|
| 1636 |
"execution": {
|
| 1637 |
"iopub.execute_input": "2023-11-16T05:47:42.692055Z",
|
|
@@ -1649,7 +1224,7 @@
|
|
| 1649 |
},
|
| 1650 |
{
|
| 1651 |
"cell_type": "code",
|
| 1652 |
-
"execution_count":
|
| 1653 |
"metadata": {
|
| 1654 |
"execution": {
|
| 1655 |
"iopub.execute_input": "2023-11-16T05:47:52.984270Z",
|
|
@@ -1659,268 +1234,14 @@
|
|
| 1659 |
"shell.execute_reply.started": "2023-11-16T05:47:52.984232Z"
|
| 1660 |
}
|
| 1661 |
},
|
| 1662 |
-
"outputs": [
|
| 1663 |
-
{
|
| 1664 |
-
"data": {
|
| 1665 |
-
"text/html": [
|
| 1666 |
-
"<div>\n",
|
| 1667 |
-
"<style scoped>\n",
|
| 1668 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 1669 |
-
" vertical-align: middle;\n",
|
| 1670 |
-
" }\n",
|
| 1671 |
-
"\n",
|
| 1672 |
-
" .dataframe tbody tr th {\n",
|
| 1673 |
-
" vertical-align: top;\n",
|
| 1674 |
-
" }\n",
|
| 1675 |
-
"\n",
|
| 1676 |
-
" .dataframe thead th {\n",
|
| 1677 |
-
" text-align: right;\n",
|
| 1678 |
-
" }\n",
|
| 1679 |
-
"</style>\n",
|
| 1680 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 1681 |
-
" <thead>\n",
|
| 1682 |
-
" <tr style=\"text-align: right;\">\n",
|
| 1683 |
-
" <th></th>\n",
|
| 1684 |
-
" <th>Gender</th>\n",
|
| 1685 |
-
" <th>Age</th>\n",
|
| 1686 |
-
" <th>Driving_License</th>\n",
|
| 1687 |
-
" <th>Region_Code</th>\n",
|
| 1688 |
-
" <th>Previously_Insured</th>\n",
|
| 1689 |
-
" <th>Annual_Premium</th>\n",
|
| 1690 |
-
" <th>Policy_Sales_Channel</th>\n",
|
| 1691 |
-
" <th>Vintage</th>\n",
|
| 1692 |
-
" <th>Response</th>\n",
|
| 1693 |
-
" <th>Vehicle_Age_lt_1_Year</th>\n",
|
| 1694 |
-
" <th>Vehicle_Age_gt_2_Years</th>\n",
|
| 1695 |
-
" <th>Vehicle_Damage_Yes</th>\n",
|
| 1696 |
-
" </tr>\n",
|
| 1697 |
-
" </thead>\n",
|
| 1698 |
-
" <tbody>\n",
|
| 1699 |
-
" <tr>\n",
|
| 1700 |
-
" <th>0</th>\n",
|
| 1701 |
-
" <td>1</td>\n",
|
| 1702 |
-
" <td>0.333777</td>\n",
|
| 1703 |
-
" <td>1</td>\n",
|
| 1704 |
-
" <td>28.0</td>\n",
|
| 1705 |
-
" <td>0</td>\n",
|
| 1706 |
-
" <td>0.070366</td>\n",
|
| 1707 |
-
" <td>26.0</td>\n",
|
| 1708 |
-
" <td>0.748795</td>\n",
|
| 1709 |
-
" <td>1</td>\n",
|
| 1710 |
-
" <td>0</td>\n",
|
| 1711 |
-
" <td>1</td>\n",
|
| 1712 |
-
" <td>1</td>\n",
|
| 1713 |
-
" </tr>\n",
|
| 1714 |
-
" <tr>\n",
|
| 1715 |
-
" <th>1</th>\n",
|
| 1716 |
-
" <td>1</td>\n",
|
| 1717 |
-
" <td>2.396751</td>\n",
|
| 1718 |
-
" <td>1</td>\n",
|
| 1719 |
-
" <td>3.0</td>\n",
|
| 1720 |
-
" <td>0</td>\n",
|
| 1721 |
-
" <td>0.057496</td>\n",
|
| 1722 |
-
" <td>26.0</td>\n",
|
| 1723 |
-
" <td>0.342443</td>\n",
|
| 1724 |
-
" <td>0</td>\n",
|
| 1725 |
-
" <td>0</td>\n",
|
| 1726 |
-
" <td>0</td>\n",
|
| 1727 |
-
" <td>0</td>\n",
|
| 1728 |
-
" </tr>\n",
|
| 1729 |
-
" <tr>\n",
|
| 1730 |
-
" <th>2</th>\n",
|
| 1731 |
-
" <td>1</td>\n",
|
| 1732 |
-
" <td>0.527181</td>\n",
|
| 1733 |
-
" <td>1</td>\n",
|
| 1734 |
-
" <td>28.0</td>\n",
|
| 1735 |
-
" <td>0</td>\n",
|
| 1736 |
-
" <td>0.066347</td>\n",
|
| 1737 |
-
" <td>26.0</td>\n",
|
| 1738 |
-
" <td>-1.521998</td>\n",
|
| 1739 |
-
" <td>1</td>\n",
|
| 1740 |
-
" <td>0</td>\n",
|
| 1741 |
-
" <td>1</td>\n",
|
| 1742 |
-
" <td>1</td>\n",
|
| 1743 |
-
" </tr>\n",
|
| 1744 |
-
" <tr>\n",
|
| 1745 |
-
" <th>3</th>\n",
|
| 1746 |
-
" <td>1</td>\n",
|
| 1747 |
-
" <td>-1.148985</td>\n",
|
| 1748 |
-
" <td>1</td>\n",
|
| 1749 |
-
" <td>11.0</td>\n",
|
| 1750 |
-
" <td>1</td>\n",
|
| 1751 |
-
" <td>0.048348</td>\n",
|
| 1752 |
-
" <td>152.0</td>\n",
|
| 1753 |
-
" <td>0.581474</td>\n",
|
| 1754 |
-
" <td>0</td>\n",
|
| 1755 |
-
" <td>1</td>\n",
|
| 1756 |
-
" <td>0</td>\n",
|
| 1757 |
-
" <td>0</td>\n",
|
| 1758 |
-
" </tr>\n",
|
| 1759 |
-
" <tr>\n",
|
| 1760 |
-
" <th>4</th>\n",
|
| 1761 |
-
" <td>0</td>\n",
|
| 1762 |
-
" <td>-0.633242</td>\n",
|
| 1763 |
-
" <td>1</td>\n",
|
| 1764 |
-
" <td>41.0</td>\n",
|
| 1765 |
-
" <td>1</td>\n",
|
| 1766 |
-
" <td>0.046259</td>\n",
|
| 1767 |
-
" <td>152.0</td>\n",
|
| 1768 |
-
" <td>-1.378580</td>\n",
|
| 1769 |
-
" <td>0</td>\n",
|
| 1770 |
-
" <td>1</td>\n",
|
| 1771 |
-
" <td>0</td>\n",
|
| 1772 |
-
" <td>0</td>\n",
|
| 1773 |
-
" </tr>\n",
|
| 1774 |
-
" <tr>\n",
|
| 1775 |
-
" <th>...</th>\n",
|
| 1776 |
-
" <td>...</td>\n",
|
| 1777 |
-
" <td>...</td>\n",
|
| 1778 |
-
" <td>...</td>\n",
|
| 1779 |
-
" <td>...</td>\n",
|
| 1780 |
-
" <td>...</td>\n",
|
| 1781 |
-
" <td>...</td>\n",
|
| 1782 |
-
" <td>...</td>\n",
|
| 1783 |
-
" <td>...</td>\n",
|
| 1784 |
-
" <td>...</td>\n",
|
| 1785 |
-
" <td>...</td>\n",
|
| 1786 |
-
" <td>...</td>\n",
|
| 1787 |
-
" <td>...</td>\n",
|
| 1788 |
-
" </tr>\n",
|
| 1789 |
-
" <tr>\n",
|
| 1790 |
-
" <th>381104</th>\n",
|
| 1791 |
-
" <td>1</td>\n",
|
| 1792 |
-
" <td>2.267815</td>\n",
|
| 1793 |
-
" <td>1</td>\n",
|
| 1794 |
-
" <td>26.0</td>\n",
|
| 1795 |
-
" <td>1</td>\n",
|
| 1796 |
-
" <td>0.051234</td>\n",
|
| 1797 |
-
" <td>26.0</td>\n",
|
| 1798 |
-
" <td>-0.792954</td>\n",
|
| 1799 |
-
" <td>0</td>\n",
|
| 1800 |
-
" <td>0</td>\n",
|
| 1801 |
-
" <td>0</td>\n",
|
| 1802 |
-
" <td>0</td>\n",
|
| 1803 |
-
" </tr>\n",
|
| 1804 |
-
" <tr>\n",
|
| 1805 |
-
" <th>381105</th>\n",
|
| 1806 |
-
" <td>1</td>\n",
|
| 1807 |
-
" <td>-0.568774</td>\n",
|
| 1808 |
-
" <td>1</td>\n",
|
| 1809 |
-
" <td>37.0</td>\n",
|
| 1810 |
-
" <td>1</td>\n",
|
| 1811 |
-
" <td>0.069551</td>\n",
|
| 1812 |
-
" <td>152.0</td>\n",
|
| 1813 |
-
" <td>-0.279037</td>\n",
|
| 1814 |
-
" <td>0</td>\n",
|
| 1815 |
-
" <td>1</td>\n",
|
| 1816 |
-
" <td>0</td>\n",
|
| 1817 |
-
" <td>0</td>\n",
|
| 1818 |
-
" </tr>\n",
|
| 1819 |
-
" <tr>\n",
|
| 1820 |
-
" <th>381106</th>\n",
|
| 1821 |
-
" <td>1</td>\n",
|
| 1822 |
-
" <td>-1.148985</td>\n",
|
| 1823 |
-
" <td>1</td>\n",
|
| 1824 |
-
" <td>30.0</td>\n",
|
| 1825 |
-
" <td>1</td>\n",
|
| 1826 |
-
" <td>0.060439</td>\n",
|
| 1827 |
-
" <td>160.0</td>\n",
|
| 1828 |
-
" <td>0.079509</td>\n",
|
| 1829 |
-
" <td>0</td>\n",
|
| 1830 |
-
" <td>1</td>\n",
|
| 1831 |
-
" <td>0</td>\n",
|
| 1832 |
-
" <td>0</td>\n",
|
| 1833 |
-
" </tr>\n",
|
| 1834 |
-
" <tr>\n",
|
| 1835 |
-
" <th>381107</th>\n",
|
| 1836 |
-
" <td>0</td>\n",
|
| 1837 |
-
" <td>1.881007</td>\n",
|
| 1838 |
-
" <td>1</td>\n",
|
| 1839 |
-
" <td>14.0</td>\n",
|
| 1840 |
-
" <td>0</td>\n",
|
| 1841 |
-
" <td>0.078110</td>\n",
|
| 1842 |
-
" <td>124.0</td>\n",
|
| 1843 |
-
" <td>-0.960275</td>\n",
|
| 1844 |
-
" <td>0</td>\n",
|
| 1845 |
-
" <td>0</td>\n",
|
| 1846 |
-
" <td>1</td>\n",
|
| 1847 |
-
" <td>1</td>\n",
|
| 1848 |
-
" </tr>\n",
|
| 1849 |
-
" <tr>\n",
|
| 1850 |
-
" <th>381108</th>\n",
|
| 1851 |
-
" <td>1</td>\n",
|
| 1852 |
-
" <td>0.462713</td>\n",
|
| 1853 |
-
" <td>1</td>\n",
|
| 1854 |
-
" <td>29.0</td>\n",
|
| 1855 |
-
" <td>0</td>\n",
|
| 1856 |
-
" <td>0.072827</td>\n",
|
| 1857 |
-
" <td>26.0</td>\n",
|
| 1858 |
-
" <td>0.987826</td>\n",
|
| 1859 |
-
" <td>0</td>\n",
|
| 1860 |
-
" <td>0</td>\n",
|
| 1861 |
-
" <td>0</td>\n",
|
| 1862 |
-
" <td>0</td>\n",
|
| 1863 |
-
" </tr>\n",
|
| 1864 |
-
" </tbody>\n",
|
| 1865 |
-
"</table>\n",
|
| 1866 |
-
"<p>381109 rows × 12 columns</p>\n",
|
| 1867 |
-
"</div>"
|
| 1868 |
-
],
|
| 1869 |
-
"text/plain": [
|
| 1870 |
-
" Gender Age Driving_License Region_Code Previously_Insured \\\n",
|
| 1871 |
-
"0 1 0.333777 1 28.0 0 \n",
|
| 1872 |
-
"1 1 2.396751 1 3.0 0 \n",
|
| 1873 |
-
"2 1 0.527181 1 28.0 0 \n",
|
| 1874 |
-
"3 1 -1.148985 1 11.0 1 \n",
|
| 1875 |
-
"4 0 -0.633242 1 41.0 1 \n",
|
| 1876 |
-
"... ... ... ... ... ... \n",
|
| 1877 |
-
"381104 1 2.267815 1 26.0 1 \n",
|
| 1878 |
-
"381105 1 -0.568774 1 37.0 1 \n",
|
| 1879 |
-
"381106 1 -1.148985 1 30.0 1 \n",
|
| 1880 |
-
"381107 0 1.881007 1 14.0 0 \n",
|
| 1881 |
-
"381108 1 0.462713 1 29.0 0 \n",
|
| 1882 |
-
"\n",
|
| 1883 |
-
" Annual_Premium Policy_Sales_Channel Vintage Response \\\n",
|
| 1884 |
-
"0 0.070366 26.0 0.748795 1 \n",
|
| 1885 |
-
"1 0.057496 26.0 0.342443 0 \n",
|
| 1886 |
-
"2 0.066347 26.0 -1.521998 1 \n",
|
| 1887 |
-
"3 0.048348 152.0 0.581474 0 \n",
|
| 1888 |
-
"4 0.046259 152.0 -1.378580 0 \n",
|
| 1889 |
-
"... ... ... ... ... \n",
|
| 1890 |
-
"381104 0.051234 26.0 -0.792954 0 \n",
|
| 1891 |
-
"381105 0.069551 152.0 -0.279037 0 \n",
|
| 1892 |
-
"381106 0.060439 160.0 0.079509 0 \n",
|
| 1893 |
-
"381107 0.078110 124.0 -0.960275 0 \n",
|
| 1894 |
-
"381108 0.072827 26.0 0.987826 0 \n",
|
| 1895 |
-
"\n",
|
| 1896 |
-
" Vehicle_Age_lt_1_Year Vehicle_Age_gt_2_Years Vehicle_Damage_Yes \n",
|
| 1897 |
-
"0 0 1 1 \n",
|
| 1898 |
-
"1 0 0 0 \n",
|
| 1899 |
-
"2 0 1 1 \n",
|
| 1900 |
-
"3 1 0 0 \n",
|
| 1901 |
-
"4 1 0 0 \n",
|
| 1902 |
-
"... ... ... ... \n",
|
| 1903 |
-
"381104 0 0 0 \n",
|
| 1904 |
-
"381105 1 0 0 \n",
|
| 1905 |
-
"381106 1 0 0 \n",
|
| 1906 |
-
"381107 0 1 1 \n",
|
| 1907 |
-
"381108 0 0 0 \n",
|
| 1908 |
-
"\n",
|
| 1909 |
-
"[381109 rows x 12 columns]"
|
| 1910 |
-
]
|
| 1911 |
-
},
|
| 1912 |
-
"execution_count": 16,
|
| 1913 |
-
"metadata": {},
|
| 1914 |
-
"output_type": "execute_result"
|
| 1915 |
-
}
|
| 1916 |
-
],
|
| 1917 |
"source": [
|
| 1918 |
"train"
|
| 1919 |
]
|
| 1920 |
},
|
| 1921 |
{
|
| 1922 |
"cell_type": "code",
|
| 1923 |
-
"execution_count":
|
| 1924 |
"metadata": {
|
| 1925 |
"execution": {
|
| 1926 |
"iopub.execute_input": "2023-11-16T05:48:05.334543Z",
|
|
@@ -1942,7 +1263,7 @@
|
|
| 1942 |
},
|
| 1943 |
{
|
| 1944 |
"cell_type": "code",
|
| 1945 |
-
"execution_count":
|
| 1946 |
"metadata": {
|
| 1947 |
"execution": {
|
| 1948 |
"iopub.execute_input": "2023-11-16T05:48:12.294471Z",
|
|
@@ -1965,7 +1286,7 @@
|
|
| 1965 |
},
|
| 1966 |
{
|
| 1967 |
"cell_type": "code",
|
| 1968 |
-
"execution_count":
|
| 1969 |
"metadata": {
|
| 1970 |
"execution": {
|
| 1971 |
"iopub.execute_input": "2023-11-16T05:48:18.989930Z",
|
|
@@ -1983,7 +1304,7 @@
|
|
| 1983 |
},
|
| 1984 |
{
|
| 1985 |
"cell_type": "code",
|
| 1986 |
-
"execution_count":
|
| 1987 |
"metadata": {
|
| 1988 |
"execution": {
|
| 1989 |
"iopub.execute_input": "2023-11-16T05:48:25.677104Z",
|
|
@@ -2004,7 +1325,7 @@
|
|
| 2004 |
},
|
| 2005 |
{
|
| 2006 |
"cell_type": "code",
|
| 2007 |
-
"execution_count":
|
| 2008 |
"metadata": {
|
| 2009 |
"execution": {
|
| 2010 |
"iopub.execute_input": "2023-11-16T05:48:32.755356Z",
|
|
@@ -2021,7 +1342,7 @@
|
|
| 2021 |
},
|
| 2022 |
{
|
| 2023 |
"cell_type": "code",
|
| 2024 |
-
"execution_count":
|
| 2025 |
"metadata": {
|
| 2026 |
"execution": {
|
| 2027 |
"iopub.execute_input": "2023-11-16T05:48:39.182421Z",
|
|
@@ -2038,7 +1359,7 @@
|
|
| 2038 |
},
|
| 2039 |
{
|
| 2040 |
"cell_type": "code",
|
| 2041 |
-
"execution_count":
|
| 2042 |
"metadata": {
|
| 2043 |
"execution": {
|
| 2044 |
"iopub.execute_input": "2023-11-16T05:48:46.496489Z",
|
|
@@ -2048,22 +1369,7 @@
|
|
| 2048 |
"shell.execute_reply.started": "2023-11-16T05:48:46.496460Z"
|
| 2049 |
}
|
| 2050 |
},
|
| 2051 |
-
"outputs": [
|
| 2052 |
-
{
|
| 2053 |
-
"data": {
|
| 2054 |
-
"text/plain": [
|
| 2055 |
-
"Index(['Gender', 'Age', 'Driving_License', 'Region_Code', 'Previously_Insured',\n",
|
| 2056 |
-
" 'Annual_Premium', 'Policy_Sales_Channel', 'Vintage',\n",
|
| 2057 |
-
" 'Vehicle_Age_lt_1_Year', 'Vehicle_Age_gt_2_Years',\n",
|
| 2058 |
-
" 'Vehicle_Damage_Yes'],\n",
|
| 2059 |
-
" dtype='object')"
|
| 2060 |
-
]
|
| 2061 |
-
},
|
| 2062 |
-
"execution_count": 23,
|
| 2063 |
-
"metadata": {},
|
| 2064 |
-
"output_type": "execute_result"
|
| 2065 |
-
}
|
| 2066 |
-
],
|
| 2067 |
"source": [
|
| 2068 |
"x_train.columns"
|
| 2069 |
]
|
|
@@ -2289,7 +1595,7 @@
|
|
| 2289 |
},
|
| 2290 |
{
|
| 2291 |
"cell_type": "code",
|
| 2292 |
-
"execution_count":
|
| 2293 |
"metadata": {
|
| 2294 |
"execution": {
|
| 2295 |
"iopub.execute_input": "2023-11-16T06:08:40.887491Z",
|
|
|
|
| 603 |
},
|
| 604 |
{
|
| 605 |
"cell_type": "code",
|
| 606 |
+
"execution_count": null,
|
| 607 |
"metadata": {
|
| 608 |
"execution": {
|
| 609 |
"iopub.execute_input": "2023-11-16T05:40:08.587382Z",
|
|
|
|
| 613 |
"shell.execute_reply.started": "2023-11-16T05:40:08.587345Z"
|
| 614 |
}
|
| 615 |
},
|
| 616 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 617 |
"source": [
|
| 618 |
"# Different id nos from the other notebook\n",
|
| 619 |
"test.head() "
|
|
|
|
| 621 |
},
|
| 622 |
{
|
| 623 |
"cell_type": "code",
|
| 624 |
+
"execution_count": null,
|
| 625 |
"metadata": {
|
| 626 |
"execution": {
|
| 627 |
"iopub.execute_input": "2023-11-16T05:39:42.640987Z",
|
|
|
|
| 631 |
"shell.execute_reply.started": "2023-11-16T05:39:42.640955Z"
|
| 632 |
}
|
| 633 |
},
|
| 634 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 635 |
"source": [
|
| 636 |
"train.head()"
|
| 637 |
]
|
| 638 |
},
|
| 639 |
{
|
| 640 |
"cell_type": "code",
|
| 641 |
+
"execution_count": null,
|
| 642 |
"metadata": {
|
| 643 |
"execution": {
|
| 644 |
"iopub.execute_input": "2023-11-16T05:40:31.853856Z",
|
|
|
|
| 648 |
"shell.execute_reply.started": "2023-11-16T05:40:31.853824Z"
|
| 649 |
}
|
| 650 |
},
|
| 651 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 652 |
"source": [
|
| 653 |
"\n",
|
| 654 |
"train.shape"
|
|
|
|
| 656 |
},
|
| 657 |
{
|
| 658 |
"cell_type": "code",
|
| 659 |
+
"execution_count": null,
|
| 660 |
"metadata": {
|
| 661 |
"execution": {
|
| 662 |
"iopub.execute_input": "2023-11-16T05:40:39.805712Z",
|
|
|
|
| 666 |
"shell.execute_reply.started": "2023-11-16T05:40:39.805681Z"
|
| 667 |
}
|
| 668 |
},
|
| 669 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 670 |
"source": [
|
| 671 |
"train.isnull().sum()"
|
| 672 |
]
|
| 673 |
},
|
| 674 |
{
|
| 675 |
"cell_type": "code",
|
| 676 |
+
"execution_count": null,
|
| 677 |
"metadata": {
|
| 678 |
"execution": {
|
| 679 |
"iopub.execute_input": "2023-11-16T05:40:48.806458Z",
|
|
|
|
| 691 |
},
|
| 692 |
{
|
| 693 |
"cell_type": "code",
|
| 694 |
+
"execution_count": null,
|
| 695 |
"metadata": {
|
| 696 |
"execution": {
|
| 697 |
"iopub.execute_input": "2023-11-16T05:40:54.938097Z",
|
|
|
|
| 701 |
"shell.execute_reply.started": "2023-11-16T05:40:54.938068Z"
|
| 702 |
}
|
| 703 |
},
|
| 704 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 705 |
"source": [
|
| 706 |
"train[numerical_columns].describe()"
|
| 707 |
]
|
|
|
|
| 1094 |
},
|
| 1095 |
{
|
| 1096 |
"cell_type": "code",
|
| 1097 |
+
"execution_count": 3,
|
| 1098 |
"metadata": {
|
| 1099 |
"execution": {
|
| 1100 |
"iopub.execute_input": "2023-11-16T05:46:58.312193Z",
|
|
|
|
| 1112 |
},
|
| 1113 |
{
|
| 1114 |
"cell_type": "code",
|
| 1115 |
+
"execution_count": 4,
|
| 1116 |
"metadata": {
|
| 1117 |
"execution": {
|
| 1118 |
"iopub.execute_input": "2023-11-16T05:47:08.177008Z",
|
|
|
|
| 1129 |
},
|
| 1130 |
{
|
| 1131 |
"cell_type": "code",
|
| 1132 |
+
"execution_count": 5,
|
| 1133 |
"metadata": {
|
| 1134 |
"execution": {
|
| 1135 |
"iopub.execute_input": "2023-11-16T05:47:14.997163Z",
|
|
|
|
| 1146 |
},
|
| 1147 |
{
|
| 1148 |
"cell_type": "code",
|
| 1149 |
+
"execution_count": 6,
|
| 1150 |
"metadata": {
|
| 1151 |
"execution": {
|
| 1152 |
"iopub.execute_input": "2023-11-16T05:47:22.318839Z",
|
|
|
|
| 1166 |
},
|
| 1167 |
{
|
| 1168 |
"cell_type": "code",
|
| 1169 |
+
"execution_count": 7,
|
| 1170 |
"metadata": {
|
| 1171 |
"execution": {
|
| 1172 |
"iopub.execute_input": "2023-11-16T05:47:29.960566Z",
|
|
|
|
| 1189 |
},
|
| 1190 |
{
|
| 1191 |
"cell_type": "code",
|
| 1192 |
+
"execution_count": 8,
|
| 1193 |
"metadata": {
|
| 1194 |
"execution": {
|
| 1195 |
"iopub.execute_input": "2023-11-16T05:47:35.704010Z",
|
|
|
|
| 1206 |
},
|
| 1207 |
{
|
| 1208 |
"cell_type": "code",
|
| 1209 |
+
"execution_count": 9,
|
| 1210 |
"metadata": {
|
| 1211 |
"execution": {
|
| 1212 |
"iopub.execute_input": "2023-11-16T05:47:42.692055Z",
|
|
|
|
| 1224 |
},
|
| 1225 |
{
|
| 1226 |
"cell_type": "code",
|
| 1227 |
+
"execution_count": null,
|
| 1228 |
"metadata": {
|
| 1229 |
"execution": {
|
| 1230 |
"iopub.execute_input": "2023-11-16T05:47:52.984270Z",
|
|
|
|
| 1234 |
"shell.execute_reply.started": "2023-11-16T05:47:52.984232Z"
|
| 1235 |
}
|
| 1236 |
},
|
| 1237 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1238 |
"source": [
|
| 1239 |
"train"
|
| 1240 |
]
|
| 1241 |
},
|
| 1242 |
{
|
| 1243 |
"cell_type": "code",
|
| 1244 |
+
"execution_count": 10,
|
| 1245 |
"metadata": {
|
| 1246 |
"execution": {
|
| 1247 |
"iopub.execute_input": "2023-11-16T05:48:05.334543Z",
|
|
|
|
| 1263 |
},
|
| 1264 |
{
|
| 1265 |
"cell_type": "code",
|
| 1266 |
+
"execution_count": 11,
|
| 1267 |
"metadata": {
|
| 1268 |
"execution": {
|
| 1269 |
"iopub.execute_input": "2023-11-16T05:48:12.294471Z",
|
|
|
|
| 1286 |
},
|
| 1287 |
{
|
| 1288 |
"cell_type": "code",
|
| 1289 |
+
"execution_count": 12,
|
| 1290 |
"metadata": {
|
| 1291 |
"execution": {
|
| 1292 |
"iopub.execute_input": "2023-11-16T05:48:18.989930Z",
|
|
|
|
| 1304 |
},
|
| 1305 |
{
|
| 1306 |
"cell_type": "code",
|
| 1307 |
+
"execution_count": 13,
|
| 1308 |
"metadata": {
|
| 1309 |
"execution": {
|
| 1310 |
"iopub.execute_input": "2023-11-16T05:48:25.677104Z",
|
|
|
|
| 1325 |
},
|
| 1326 |
{
|
| 1327 |
"cell_type": "code",
|
| 1328 |
+
"execution_count": null,
|
| 1329 |
"metadata": {
|
| 1330 |
"execution": {
|
| 1331 |
"iopub.execute_input": "2023-11-16T05:48:32.755356Z",
|
|
|
|
| 1342 |
},
|
| 1343 |
{
|
| 1344 |
"cell_type": "code",
|
| 1345 |
+
"execution_count": 14,
|
| 1346 |
"metadata": {
|
| 1347 |
"execution": {
|
| 1348 |
"iopub.execute_input": "2023-11-16T05:48:39.182421Z",
|
|
|
|
| 1359 |
},
|
| 1360 |
{
|
| 1361 |
"cell_type": "code",
|
| 1362 |
+
"execution_count": null,
|
| 1363 |
"metadata": {
|
| 1364 |
"execution": {
|
| 1365 |
"iopub.execute_input": "2023-11-16T05:48:46.496489Z",
|
|
|
|
| 1369 |
"shell.execute_reply.started": "2023-11-16T05:48:46.496460Z"
|
| 1370 |
}
|
| 1371 |
},
|
| 1372 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1373 |
"source": [
|
| 1374 |
"x_train.columns"
|
| 1375 |
]
|
|
|
|
| 1595 |
},
|
| 1596 |
{
|
| 1597 |
"cell_type": "code",
|
| 1598 |
+
"execution_count": 15,
|
| 1599 |
"metadata": {
|
| 1600 |
"execution": {
|
| 1601 |
"iopub.execute_input": "2023-11-16T06:08:40.887491Z",
|
benchmark/pandas_5/pandas_5_reproduced.ipynb
CHANGED
|
@@ -603,7 +603,7 @@
|
|
| 603 |
},
|
| 604 |
{
|
| 605 |
"cell_type": "code",
|
| 606 |
-
"execution_count":
|
| 607 |
"metadata": {
|
| 608 |
"execution": {
|
| 609 |
"iopub.execute_input": "2023-11-16T05:40:08.587382Z",
|
|
@@ -613,150 +613,7 @@
|
|
| 613 |
"shell.execute_reply.started": "2023-11-16T05:40:08.587345Z"
|
| 614 |
}
|
| 615 |
},
|
| 616 |
-
"outputs": [
|
| 617 |
-
{
|
| 618 |
-
"data": {
|
| 619 |
-
"text/html": [
|
| 620 |
-
"<div>\n",
|
| 621 |
-
"<style scoped>\n",
|
| 622 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 623 |
-
" vertical-align: middle;\n",
|
| 624 |
-
" }\n",
|
| 625 |
-
"\n",
|
| 626 |
-
" .dataframe tbody tr th {\n",
|
| 627 |
-
" vertical-align: top;\n",
|
| 628 |
-
" }\n",
|
| 629 |
-
"\n",
|
| 630 |
-
" .dataframe thead th {\n",
|
| 631 |
-
" text-align: right;\n",
|
| 632 |
-
" }\n",
|
| 633 |
-
"</style>\n",
|
| 634 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 635 |
-
" <thead>\n",
|
| 636 |
-
" <tr style=\"text-align: right;\">\n",
|
| 637 |
-
" <th></th>\n",
|
| 638 |
-
" <th>id</th>\n",
|
| 639 |
-
" <th>Gender</th>\n",
|
| 640 |
-
" <th>Age</th>\n",
|
| 641 |
-
" <th>Driving_License</th>\n",
|
| 642 |
-
" <th>Region_Code</th>\n",
|
| 643 |
-
" <th>Previously_Insured</th>\n",
|
| 644 |
-
" <th>Vehicle_Age</th>\n",
|
| 645 |
-
" <th>Vehicle_Damage</th>\n",
|
| 646 |
-
" <th>Annual_Premium</th>\n",
|
| 647 |
-
" <th>Policy_Sales_Channel</th>\n",
|
| 648 |
-
" <th>Vintage</th>\n",
|
| 649 |
-
" <th>Response</th>\n",
|
| 650 |
-
" </tr>\n",
|
| 651 |
-
" </thead>\n",
|
| 652 |
-
" <tbody>\n",
|
| 653 |
-
" <tr>\n",
|
| 654 |
-
" <th>0</th>\n",
|
| 655 |
-
" <td>1</td>\n",
|
| 656 |
-
" <td>Male</td>\n",
|
| 657 |
-
" <td>44</td>\n",
|
| 658 |
-
" <td>1</td>\n",
|
| 659 |
-
" <td>28.0</td>\n",
|
| 660 |
-
" <td>0</td>\n",
|
| 661 |
-
" <td>> 2 Years</td>\n",
|
| 662 |
-
" <td>Yes</td>\n",
|
| 663 |
-
" <td>40454.0</td>\n",
|
| 664 |
-
" <td>26.0</td>\n",
|
| 665 |
-
" <td>217</td>\n",
|
| 666 |
-
" <td>1</td>\n",
|
| 667 |
-
" </tr>\n",
|
| 668 |
-
" <tr>\n",
|
| 669 |
-
" <th>1</th>\n",
|
| 670 |
-
" <td>2</td>\n",
|
| 671 |
-
" <td>Male</td>\n",
|
| 672 |
-
" <td>76</td>\n",
|
| 673 |
-
" <td>1</td>\n",
|
| 674 |
-
" <td>3.0</td>\n",
|
| 675 |
-
" <td>0</td>\n",
|
| 676 |
-
" <td>1-2 Year</td>\n",
|
| 677 |
-
" <td>No</td>\n",
|
| 678 |
-
" <td>33536.0</td>\n",
|
| 679 |
-
" <td>26.0</td>\n",
|
| 680 |
-
" <td>183</td>\n",
|
| 681 |
-
" <td>0</td>\n",
|
| 682 |
-
" </tr>\n",
|
| 683 |
-
" <tr>\n",
|
| 684 |
-
" <th>2</th>\n",
|
| 685 |
-
" <td>3</td>\n",
|
| 686 |
-
" <td>Male</td>\n",
|
| 687 |
-
" <td>47</td>\n",
|
| 688 |
-
" <td>1</td>\n",
|
| 689 |
-
" <td>28.0</td>\n",
|
| 690 |
-
" <td>0</td>\n",
|
| 691 |
-
" <td>> 2 Years</td>\n",
|
| 692 |
-
" <td>Yes</td>\n",
|
| 693 |
-
" <td>38294.0</td>\n",
|
| 694 |
-
" <td>26.0</td>\n",
|
| 695 |
-
" <td>27</td>\n",
|
| 696 |
-
" <td>1</td>\n",
|
| 697 |
-
" </tr>\n",
|
| 698 |
-
" <tr>\n",
|
| 699 |
-
" <th>3</th>\n",
|
| 700 |
-
" <td>4</td>\n",
|
| 701 |
-
" <td>Male</td>\n",
|
| 702 |
-
" <td>21</td>\n",
|
| 703 |
-
" <td>1</td>\n",
|
| 704 |
-
" <td>11.0</td>\n",
|
| 705 |
-
" <td>1</td>\n",
|
| 706 |
-
" <td>< 1 Year</td>\n",
|
| 707 |
-
" <td>No</td>\n",
|
| 708 |
-
" <td>28619.0</td>\n",
|
| 709 |
-
" <td>152.0</td>\n",
|
| 710 |
-
" <td>203</td>\n",
|
| 711 |
-
" <td>0</td>\n",
|
| 712 |
-
" </tr>\n",
|
| 713 |
-
" <tr>\n",
|
| 714 |
-
" <th>4</th>\n",
|
| 715 |
-
" <td>5</td>\n",
|
| 716 |
-
" <td>Female</td>\n",
|
| 717 |
-
" <td>29</td>\n",
|
| 718 |
-
" <td>1</td>\n",
|
| 719 |
-
" <td>41.0</td>\n",
|
| 720 |
-
" <td>1</td>\n",
|
| 721 |
-
" <td>< 1 Year</td>\n",
|
| 722 |
-
" <td>No</td>\n",
|
| 723 |
-
" <td>27496.0</td>\n",
|
| 724 |
-
" <td>152.0</td>\n",
|
| 725 |
-
" <td>39</td>\n",
|
| 726 |
-
" <td>0</td>\n",
|
| 727 |
-
" </tr>\n",
|
| 728 |
-
" </tbody>\n",
|
| 729 |
-
"</table>\n",
|
| 730 |
-
"</div>"
|
| 731 |
-
],
|
| 732 |
-
"text/plain": [
|
| 733 |
-
" id Gender Age Driving_License Region_Code Previously_Insured \\\n",
|
| 734 |
-
"0 1 Male 44 1 28.0 0 \n",
|
| 735 |
-
"1 2 Male 76 1 3.0 0 \n",
|
| 736 |
-
"2 3 Male 47 1 28.0 0 \n",
|
| 737 |
-
"3 4 Male 21 1 11.0 1 \n",
|
| 738 |
-
"4 5 Female 29 1 41.0 1 \n",
|
| 739 |
-
"\n",
|
| 740 |
-
" Vehicle_Age Vehicle_Damage Annual_Premium Policy_Sales_Channel Vintage \\\n",
|
| 741 |
-
"0 > 2 Years Yes 40454.0 26.0 217 \n",
|
| 742 |
-
"1 1-2 Year No 33536.0 26.0 183 \n",
|
| 743 |
-
"2 > 2 Years Yes 38294.0 26.0 27 \n",
|
| 744 |
-
"3 < 1 Year No 28619.0 152.0 203 \n",
|
| 745 |
-
"4 < 1 Year No 27496.0 152.0 39 \n",
|
| 746 |
-
"\n",
|
| 747 |
-
" Response \n",
|
| 748 |
-
"0 1 \n",
|
| 749 |
-
"1 0 \n",
|
| 750 |
-
"2 1 \n",
|
| 751 |
-
"3 0 \n",
|
| 752 |
-
"4 0 "
|
| 753 |
-
]
|
| 754 |
-
},
|
| 755 |
-
"execution_count": 3,
|
| 756 |
-
"metadata": {},
|
| 757 |
-
"output_type": "execute_result"
|
| 758 |
-
}
|
| 759 |
-
],
|
| 760 |
"source": [
|
| 761 |
"# Different id nos from the other notebook\n",
|
| 762 |
"test.head() "
|
|
@@ -764,7 +621,7 @@
|
|
| 764 |
},
|
| 765 |
{
|
| 766 |
"cell_type": "code",
|
| 767 |
-
"execution_count":
|
| 768 |
"metadata": {
|
| 769 |
"execution": {
|
| 770 |
"iopub.execute_input": "2023-11-16T05:39:42.640987Z",
|
|
@@ -774,157 +631,14 @@
|
|
| 774 |
"shell.execute_reply.started": "2023-11-16T05:39:42.640955Z"
|
| 775 |
}
|
| 776 |
},
|
| 777 |
-
"outputs": [
|
| 778 |
-
{
|
| 779 |
-
"data": {
|
| 780 |
-
"text/html": [
|
| 781 |
-
"<div>\n",
|
| 782 |
-
"<style scoped>\n",
|
| 783 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 784 |
-
" vertical-align: middle;\n",
|
| 785 |
-
" }\n",
|
| 786 |
-
"\n",
|
| 787 |
-
" .dataframe tbody tr th {\n",
|
| 788 |
-
" vertical-align: top;\n",
|
| 789 |
-
" }\n",
|
| 790 |
-
"\n",
|
| 791 |
-
" .dataframe thead th {\n",
|
| 792 |
-
" text-align: right;\n",
|
| 793 |
-
" }\n",
|
| 794 |
-
"</style>\n",
|
| 795 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 796 |
-
" <thead>\n",
|
| 797 |
-
" <tr style=\"text-align: right;\">\n",
|
| 798 |
-
" <th></th>\n",
|
| 799 |
-
" <th>id</th>\n",
|
| 800 |
-
" <th>Gender</th>\n",
|
| 801 |
-
" <th>Age</th>\n",
|
| 802 |
-
" <th>Driving_License</th>\n",
|
| 803 |
-
" <th>Region_Code</th>\n",
|
| 804 |
-
" <th>Previously_Insured</th>\n",
|
| 805 |
-
" <th>Vehicle_Age</th>\n",
|
| 806 |
-
" <th>Vehicle_Damage</th>\n",
|
| 807 |
-
" <th>Annual_Premium</th>\n",
|
| 808 |
-
" <th>Policy_Sales_Channel</th>\n",
|
| 809 |
-
" <th>Vintage</th>\n",
|
| 810 |
-
" <th>Response</th>\n",
|
| 811 |
-
" </tr>\n",
|
| 812 |
-
" </thead>\n",
|
| 813 |
-
" <tbody>\n",
|
| 814 |
-
" <tr>\n",
|
| 815 |
-
" <th>0</th>\n",
|
| 816 |
-
" <td>1</td>\n",
|
| 817 |
-
" <td>Male</td>\n",
|
| 818 |
-
" <td>44</td>\n",
|
| 819 |
-
" <td>1</td>\n",
|
| 820 |
-
" <td>28.0</td>\n",
|
| 821 |
-
" <td>0</td>\n",
|
| 822 |
-
" <td>> 2 Years</td>\n",
|
| 823 |
-
" <td>Yes</td>\n",
|
| 824 |
-
" <td>40454.0</td>\n",
|
| 825 |
-
" <td>26.0</td>\n",
|
| 826 |
-
" <td>217</td>\n",
|
| 827 |
-
" <td>1</td>\n",
|
| 828 |
-
" </tr>\n",
|
| 829 |
-
" <tr>\n",
|
| 830 |
-
" <th>1</th>\n",
|
| 831 |
-
" <td>2</td>\n",
|
| 832 |
-
" <td>Male</td>\n",
|
| 833 |
-
" <td>76</td>\n",
|
| 834 |
-
" <td>1</td>\n",
|
| 835 |
-
" <td>3.0</td>\n",
|
| 836 |
-
" <td>0</td>\n",
|
| 837 |
-
" <td>1-2 Year</td>\n",
|
| 838 |
-
" <td>No</td>\n",
|
| 839 |
-
" <td>33536.0</td>\n",
|
| 840 |
-
" <td>26.0</td>\n",
|
| 841 |
-
" <td>183</td>\n",
|
| 842 |
-
" <td>0</td>\n",
|
| 843 |
-
" </tr>\n",
|
| 844 |
-
" <tr>\n",
|
| 845 |
-
" <th>2</th>\n",
|
| 846 |
-
" <td>3</td>\n",
|
| 847 |
-
" <td>Male</td>\n",
|
| 848 |
-
" <td>47</td>\n",
|
| 849 |
-
" <td>1</td>\n",
|
| 850 |
-
" <td>28.0</td>\n",
|
| 851 |
-
" <td>0</td>\n",
|
| 852 |
-
" <td>> 2 Years</td>\n",
|
| 853 |
-
" <td>Yes</td>\n",
|
| 854 |
-
" <td>38294.0</td>\n",
|
| 855 |
-
" <td>26.0</td>\n",
|
| 856 |
-
" <td>27</td>\n",
|
| 857 |
-
" <td>1</td>\n",
|
| 858 |
-
" </tr>\n",
|
| 859 |
-
" <tr>\n",
|
| 860 |
-
" <th>3</th>\n",
|
| 861 |
-
" <td>4</td>\n",
|
| 862 |
-
" <td>Male</td>\n",
|
| 863 |
-
" <td>21</td>\n",
|
| 864 |
-
" <td>1</td>\n",
|
| 865 |
-
" <td>11.0</td>\n",
|
| 866 |
-
" <td>1</td>\n",
|
| 867 |
-
" <td>< 1 Year</td>\n",
|
| 868 |
-
" <td>No</td>\n",
|
| 869 |
-
" <td>28619.0</td>\n",
|
| 870 |
-
" <td>152.0</td>\n",
|
| 871 |
-
" <td>203</td>\n",
|
| 872 |
-
" <td>0</td>\n",
|
| 873 |
-
" </tr>\n",
|
| 874 |
-
" <tr>\n",
|
| 875 |
-
" <th>4</th>\n",
|
| 876 |
-
" <td>5</td>\n",
|
| 877 |
-
" <td>Female</td>\n",
|
| 878 |
-
" <td>29</td>\n",
|
| 879 |
-
" <td>1</td>\n",
|
| 880 |
-
" <td>41.0</td>\n",
|
| 881 |
-
" <td>1</td>\n",
|
| 882 |
-
" <td>< 1 Year</td>\n",
|
| 883 |
-
" <td>No</td>\n",
|
| 884 |
-
" <td>27496.0</td>\n",
|
| 885 |
-
" <td>152.0</td>\n",
|
| 886 |
-
" <td>39</td>\n",
|
| 887 |
-
" <td>0</td>\n",
|
| 888 |
-
" </tr>\n",
|
| 889 |
-
" </tbody>\n",
|
| 890 |
-
"</table>\n",
|
| 891 |
-
"</div>"
|
| 892 |
-
],
|
| 893 |
-
"text/plain": [
|
| 894 |
-
" id Gender Age Driving_License Region_Code Previously_Insured \\\n",
|
| 895 |
-
"0 1 Male 44 1 28.0 0 \n",
|
| 896 |
-
"1 2 Male 76 1 3.0 0 \n",
|
| 897 |
-
"2 3 Male 47 1 28.0 0 \n",
|
| 898 |
-
"3 4 Male 21 1 11.0 1 \n",
|
| 899 |
-
"4 5 Female 29 1 41.0 1 \n",
|
| 900 |
-
"\n",
|
| 901 |
-
" Vehicle_Age Vehicle_Damage Annual_Premium Policy_Sales_Channel Vintage \\\n",
|
| 902 |
-
"0 > 2 Years Yes 40454.0 26.0 217 \n",
|
| 903 |
-
"1 1-2 Year No 33536.0 26.0 183 \n",
|
| 904 |
-
"2 > 2 Years Yes 38294.0 26.0 27 \n",
|
| 905 |
-
"3 < 1 Year No 28619.0 152.0 203 \n",
|
| 906 |
-
"4 < 1 Year No 27496.0 152.0 39 \n",
|
| 907 |
-
"\n",
|
| 908 |
-
" Response \n",
|
| 909 |
-
"0 1 \n",
|
| 910 |
-
"1 0 \n",
|
| 911 |
-
"2 1 \n",
|
| 912 |
-
"3 0 \n",
|
| 913 |
-
"4 0 "
|
| 914 |
-
]
|
| 915 |
-
},
|
| 916 |
-
"execution_count": 4,
|
| 917 |
-
"metadata": {},
|
| 918 |
-
"output_type": "execute_result"
|
| 919 |
-
}
|
| 920 |
-
],
|
| 921 |
"source": [
|
| 922 |
"train.head()"
|
| 923 |
]
|
| 924 |
},
|
| 925 |
{
|
| 926 |
"cell_type": "code",
|
| 927 |
-
"execution_count":
|
| 928 |
"metadata": {
|
| 929 |
"execution": {
|
| 930 |
"iopub.execute_input": "2023-11-16T05:40:31.853856Z",
|
|
@@ -934,18 +648,7 @@
|
|
| 934 |
"shell.execute_reply.started": "2023-11-16T05:40:31.853824Z"
|
| 935 |
}
|
| 936 |
},
|
| 937 |
-
"outputs": [
|
| 938 |
-
{
|
| 939 |
-
"data": {
|
| 940 |
-
"text/plain": [
|
| 941 |
-
"(381109, 12)"
|
| 942 |
-
]
|
| 943 |
-
},
|
| 944 |
-
"execution_count": 5,
|
| 945 |
-
"metadata": {},
|
| 946 |
-
"output_type": "execute_result"
|
| 947 |
-
}
|
| 948 |
-
],
|
| 949 |
"source": [
|
| 950 |
"\n",
|
| 951 |
"train.shape"
|
|
@@ -953,7 +656,7 @@
|
|
| 953 |
},
|
| 954 |
{
|
| 955 |
"cell_type": "code",
|
| 956 |
-
"execution_count":
|
| 957 |
"metadata": {
|
| 958 |
"execution": {
|
| 959 |
"iopub.execute_input": "2023-11-16T05:40:39.805712Z",
|
|
@@ -963,37 +666,14 @@
|
|
| 963 |
"shell.execute_reply.started": "2023-11-16T05:40:39.805681Z"
|
| 964 |
}
|
| 965 |
},
|
| 966 |
-
"outputs": [
|
| 967 |
-
{
|
| 968 |
-
"data": {
|
| 969 |
-
"text/plain": [
|
| 970 |
-
"id 0\n",
|
| 971 |
-
"Gender 0\n",
|
| 972 |
-
"Age 0\n",
|
| 973 |
-
"Driving_License 0\n",
|
| 974 |
-
"Region_Code 0\n",
|
| 975 |
-
"Previously_Insured 0\n",
|
| 976 |
-
"Vehicle_Age 0\n",
|
| 977 |
-
"Vehicle_Damage 0\n",
|
| 978 |
-
"Annual_Premium 0\n",
|
| 979 |
-
"Policy_Sales_Channel 0\n",
|
| 980 |
-
"Vintage 0\n",
|
| 981 |
-
"Response 0\n",
|
| 982 |
-
"dtype: int64"
|
| 983 |
-
]
|
| 984 |
-
},
|
| 985 |
-
"execution_count": 6,
|
| 986 |
-
"metadata": {},
|
| 987 |
-
"output_type": "execute_result"
|
| 988 |
-
}
|
| 989 |
-
],
|
| 990 |
"source": [
|
| 991 |
"train.isnull().sum()"
|
| 992 |
]
|
| 993 |
},
|
| 994 |
{
|
| 995 |
"cell_type": "code",
|
| 996 |
-
"execution_count":
|
| 997 |
"metadata": {
|
| 998 |
"execution": {
|
| 999 |
"iopub.execute_input": "2023-11-16T05:40:48.806458Z",
|
|
@@ -1011,7 +691,7 @@
|
|
| 1011 |
},
|
| 1012 |
{
|
| 1013 |
"cell_type": "code",
|
| 1014 |
-
"execution_count":
|
| 1015 |
"metadata": {
|
| 1016 |
"execution": {
|
| 1017 |
"iopub.execute_input": "2023-11-16T05:40:54.938097Z",
|
|
@@ -1021,112 +701,7 @@
|
|
| 1021 |
"shell.execute_reply.started": "2023-11-16T05:40:54.938068Z"
|
| 1022 |
}
|
| 1023 |
},
|
| 1024 |
-
"outputs": [
|
| 1025 |
-
{
|
| 1026 |
-
"data": {
|
| 1027 |
-
"text/html": [
|
| 1028 |
-
"<div>\n",
|
| 1029 |
-
"<style scoped>\n",
|
| 1030 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 1031 |
-
" vertical-align: middle;\n",
|
| 1032 |
-
" }\n",
|
| 1033 |
-
"\n",
|
| 1034 |
-
" .dataframe tbody tr th {\n",
|
| 1035 |
-
" vertical-align: top;\n",
|
| 1036 |
-
" }\n",
|
| 1037 |
-
"\n",
|
| 1038 |
-
" .dataframe thead th {\n",
|
| 1039 |
-
" text-align: right;\n",
|
| 1040 |
-
" }\n",
|
| 1041 |
-
"</style>\n",
|
| 1042 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 1043 |
-
" <thead>\n",
|
| 1044 |
-
" <tr style=\"text-align: right;\">\n",
|
| 1045 |
-
" <th></th>\n",
|
| 1046 |
-
" <th>Age</th>\n",
|
| 1047 |
-
" <th>Region_Code</th>\n",
|
| 1048 |
-
" <th>Annual_Premium</th>\n",
|
| 1049 |
-
" <th>Vintage</th>\n",
|
| 1050 |
-
" </tr>\n",
|
| 1051 |
-
" </thead>\n",
|
| 1052 |
-
" <tbody>\n",
|
| 1053 |
-
" <tr>\n",
|
| 1054 |
-
" <th>count</th>\n",
|
| 1055 |
-
" <td>381109.000000</td>\n",
|
| 1056 |
-
" <td>381109.000000</td>\n",
|
| 1057 |
-
" <td>381109.000000</td>\n",
|
| 1058 |
-
" <td>381109.000000</td>\n",
|
| 1059 |
-
" </tr>\n",
|
| 1060 |
-
" <tr>\n",
|
| 1061 |
-
" <th>mean</th>\n",
|
| 1062 |
-
" <td>38.822584</td>\n",
|
| 1063 |
-
" <td>26.388807</td>\n",
|
| 1064 |
-
" <td>30564.389581</td>\n",
|
| 1065 |
-
" <td>154.347397</td>\n",
|
| 1066 |
-
" </tr>\n",
|
| 1067 |
-
" <tr>\n",
|
| 1068 |
-
" <th>std</th>\n",
|
| 1069 |
-
" <td>15.511611</td>\n",
|
| 1070 |
-
" <td>13.229888</td>\n",
|
| 1071 |
-
" <td>17213.155057</td>\n",
|
| 1072 |
-
" <td>83.671304</td>\n",
|
| 1073 |
-
" </tr>\n",
|
| 1074 |
-
" <tr>\n",
|
| 1075 |
-
" <th>min</th>\n",
|
| 1076 |
-
" <td>20.000000</td>\n",
|
| 1077 |
-
" <td>0.000000</td>\n",
|
| 1078 |
-
" <td>2630.000000</td>\n",
|
| 1079 |
-
" <td>10.000000</td>\n",
|
| 1080 |
-
" </tr>\n",
|
| 1081 |
-
" <tr>\n",
|
| 1082 |
-
" <th>25%</th>\n",
|
| 1083 |
-
" <td>25.000000</td>\n",
|
| 1084 |
-
" <td>15.000000</td>\n",
|
| 1085 |
-
" <td>24405.000000</td>\n",
|
| 1086 |
-
" <td>82.000000</td>\n",
|
| 1087 |
-
" </tr>\n",
|
| 1088 |
-
" <tr>\n",
|
| 1089 |
-
" <th>50%</th>\n",
|
| 1090 |
-
" <td>36.000000</td>\n",
|
| 1091 |
-
" <td>28.000000</td>\n",
|
| 1092 |
-
" <td>31669.000000</td>\n",
|
| 1093 |
-
" <td>154.000000</td>\n",
|
| 1094 |
-
" </tr>\n",
|
| 1095 |
-
" <tr>\n",
|
| 1096 |
-
" <th>75%</th>\n",
|
| 1097 |
-
" <td>49.000000</td>\n",
|
| 1098 |
-
" <td>35.000000</td>\n",
|
| 1099 |
-
" <td>39400.000000</td>\n",
|
| 1100 |
-
" <td>227.000000</td>\n",
|
| 1101 |
-
" </tr>\n",
|
| 1102 |
-
" <tr>\n",
|
| 1103 |
-
" <th>max</th>\n",
|
| 1104 |
-
" <td>85.000000</td>\n",
|
| 1105 |
-
" <td>52.000000</td>\n",
|
| 1106 |
-
" <td>540165.000000</td>\n",
|
| 1107 |
-
" <td>299.000000</td>\n",
|
| 1108 |
-
" </tr>\n",
|
| 1109 |
-
" </tbody>\n",
|
| 1110 |
-
"</table>\n",
|
| 1111 |
-
"</div>"
|
| 1112 |
-
],
|
| 1113 |
-
"text/plain": [
|
| 1114 |
-
" Age Region_Code Annual_Premium Vintage\n",
|
| 1115 |
-
"count 381109.000000 381109.000000 381109.000000 381109.000000\n",
|
| 1116 |
-
"mean 38.822584 26.388807 30564.389581 154.347397\n",
|
| 1117 |
-
"std 15.511611 13.229888 17213.155057 83.671304\n",
|
| 1118 |
-
"min 20.000000 0.000000 2630.000000 10.000000\n",
|
| 1119 |
-
"25% 25.000000 15.000000 24405.000000 82.000000\n",
|
| 1120 |
-
"50% 36.000000 28.000000 31669.000000 154.000000\n",
|
| 1121 |
-
"75% 49.000000 35.000000 39400.000000 227.000000\n",
|
| 1122 |
-
"max 85.000000 52.000000 540165.000000 299.000000"
|
| 1123 |
-
]
|
| 1124 |
-
},
|
| 1125 |
-
"execution_count": 8,
|
| 1126 |
-
"metadata": {},
|
| 1127 |
-
"output_type": "execute_result"
|
| 1128 |
-
}
|
| 1129 |
-
],
|
| 1130 |
"source": [
|
| 1131 |
"train[numerical_columns].describe()"
|
| 1132 |
]
|
|
@@ -1519,7 +1094,7 @@
|
|
| 1519 |
},
|
| 1520 |
{
|
| 1521 |
"cell_type": "code",
|
| 1522 |
-
"execution_count":
|
| 1523 |
"metadata": {
|
| 1524 |
"execution": {
|
| 1525 |
"iopub.execute_input": "2023-11-16T05:46:58.312193Z",
|
|
@@ -1537,7 +1112,7 @@
|
|
| 1537 |
},
|
| 1538 |
{
|
| 1539 |
"cell_type": "code",
|
| 1540 |
-
"execution_count":
|
| 1541 |
"metadata": {
|
| 1542 |
"execution": {
|
| 1543 |
"iopub.execute_input": "2023-11-16T05:47:08.177008Z",
|
|
@@ -1554,7 +1129,7 @@
|
|
| 1554 |
},
|
| 1555 |
{
|
| 1556 |
"cell_type": "code",
|
| 1557 |
-
"execution_count":
|
| 1558 |
"metadata": {
|
| 1559 |
"execution": {
|
| 1560 |
"iopub.execute_input": "2023-11-16T05:47:14.997163Z",
|
|
@@ -1571,7 +1146,7 @@
|
|
| 1571 |
},
|
| 1572 |
{
|
| 1573 |
"cell_type": "code",
|
| 1574 |
-
"execution_count":
|
| 1575 |
"metadata": {
|
| 1576 |
"execution": {
|
| 1577 |
"iopub.execute_input": "2023-11-16T05:47:22.318839Z",
|
|
@@ -1591,7 +1166,7 @@
|
|
| 1591 |
},
|
| 1592 |
{
|
| 1593 |
"cell_type": "code",
|
| 1594 |
-
"execution_count":
|
| 1595 |
"metadata": {
|
| 1596 |
"execution": {
|
| 1597 |
"iopub.execute_input": "2023-11-16T05:47:29.960566Z",
|
|
@@ -1614,7 +1189,7 @@
|
|
| 1614 |
},
|
| 1615 |
{
|
| 1616 |
"cell_type": "code",
|
| 1617 |
-
"execution_count":
|
| 1618 |
"metadata": {
|
| 1619 |
"execution": {
|
| 1620 |
"iopub.execute_input": "2023-11-16T05:47:35.704010Z",
|
|
@@ -1631,7 +1206,7 @@
|
|
| 1631 |
},
|
| 1632 |
{
|
| 1633 |
"cell_type": "code",
|
| 1634 |
-
"execution_count":
|
| 1635 |
"metadata": {
|
| 1636 |
"execution": {
|
| 1637 |
"iopub.execute_input": "2023-11-16T05:47:42.692055Z",
|
|
@@ -1649,7 +1224,7 @@
|
|
| 1649 |
},
|
| 1650 |
{
|
| 1651 |
"cell_type": "code",
|
| 1652 |
-
"execution_count":
|
| 1653 |
"metadata": {
|
| 1654 |
"execution": {
|
| 1655 |
"iopub.execute_input": "2023-11-16T05:47:52.984270Z",
|
|
@@ -1659,268 +1234,14 @@
|
|
| 1659 |
"shell.execute_reply.started": "2023-11-16T05:47:52.984232Z"
|
| 1660 |
}
|
| 1661 |
},
|
| 1662 |
-
"outputs": [
|
| 1663 |
-
{
|
| 1664 |
-
"data": {
|
| 1665 |
-
"text/html": [
|
| 1666 |
-
"<div>\n",
|
| 1667 |
-
"<style scoped>\n",
|
| 1668 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 1669 |
-
" vertical-align: middle;\n",
|
| 1670 |
-
" }\n",
|
| 1671 |
-
"\n",
|
| 1672 |
-
" .dataframe tbody tr th {\n",
|
| 1673 |
-
" vertical-align: top;\n",
|
| 1674 |
-
" }\n",
|
| 1675 |
-
"\n",
|
| 1676 |
-
" .dataframe thead th {\n",
|
| 1677 |
-
" text-align: right;\n",
|
| 1678 |
-
" }\n",
|
| 1679 |
-
"</style>\n",
|
| 1680 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 1681 |
-
" <thead>\n",
|
| 1682 |
-
" <tr style=\"text-align: right;\">\n",
|
| 1683 |
-
" <th></th>\n",
|
| 1684 |
-
" <th>Gender</th>\n",
|
| 1685 |
-
" <th>Age</th>\n",
|
| 1686 |
-
" <th>Driving_License</th>\n",
|
| 1687 |
-
" <th>Region_Code</th>\n",
|
| 1688 |
-
" <th>Previously_Insured</th>\n",
|
| 1689 |
-
" <th>Annual_Premium</th>\n",
|
| 1690 |
-
" <th>Policy_Sales_Channel</th>\n",
|
| 1691 |
-
" <th>Vintage</th>\n",
|
| 1692 |
-
" <th>Response</th>\n",
|
| 1693 |
-
" <th>Vehicle_Age_lt_1_Year</th>\n",
|
| 1694 |
-
" <th>Vehicle_Age_gt_2_Years</th>\n",
|
| 1695 |
-
" <th>Vehicle_Damage_Yes</th>\n",
|
| 1696 |
-
" </tr>\n",
|
| 1697 |
-
" </thead>\n",
|
| 1698 |
-
" <tbody>\n",
|
| 1699 |
-
" <tr>\n",
|
| 1700 |
-
" <th>0</th>\n",
|
| 1701 |
-
" <td>1</td>\n",
|
| 1702 |
-
" <td>0.333777</td>\n",
|
| 1703 |
-
" <td>1</td>\n",
|
| 1704 |
-
" <td>28.0</td>\n",
|
| 1705 |
-
" <td>0</td>\n",
|
| 1706 |
-
" <td>0.070366</td>\n",
|
| 1707 |
-
" <td>26.0</td>\n",
|
| 1708 |
-
" <td>0.748795</td>\n",
|
| 1709 |
-
" <td>1</td>\n",
|
| 1710 |
-
" <td>0</td>\n",
|
| 1711 |
-
" <td>1</td>\n",
|
| 1712 |
-
" <td>1</td>\n",
|
| 1713 |
-
" </tr>\n",
|
| 1714 |
-
" <tr>\n",
|
| 1715 |
-
" <th>1</th>\n",
|
| 1716 |
-
" <td>1</td>\n",
|
| 1717 |
-
" <td>2.396751</td>\n",
|
| 1718 |
-
" <td>1</td>\n",
|
| 1719 |
-
" <td>3.0</td>\n",
|
| 1720 |
-
" <td>0</td>\n",
|
| 1721 |
-
" <td>0.057496</td>\n",
|
| 1722 |
-
" <td>26.0</td>\n",
|
| 1723 |
-
" <td>0.342443</td>\n",
|
| 1724 |
-
" <td>0</td>\n",
|
| 1725 |
-
" <td>0</td>\n",
|
| 1726 |
-
" <td>0</td>\n",
|
| 1727 |
-
" <td>0</td>\n",
|
| 1728 |
-
" </tr>\n",
|
| 1729 |
-
" <tr>\n",
|
| 1730 |
-
" <th>2</th>\n",
|
| 1731 |
-
" <td>1</td>\n",
|
| 1732 |
-
" <td>0.527181</td>\n",
|
| 1733 |
-
" <td>1</td>\n",
|
| 1734 |
-
" <td>28.0</td>\n",
|
| 1735 |
-
" <td>0</td>\n",
|
| 1736 |
-
" <td>0.066347</td>\n",
|
| 1737 |
-
" <td>26.0</td>\n",
|
| 1738 |
-
" <td>-1.521998</td>\n",
|
| 1739 |
-
" <td>1</td>\n",
|
| 1740 |
-
" <td>0</td>\n",
|
| 1741 |
-
" <td>1</td>\n",
|
| 1742 |
-
" <td>1</td>\n",
|
| 1743 |
-
" </tr>\n",
|
| 1744 |
-
" <tr>\n",
|
| 1745 |
-
" <th>3</th>\n",
|
| 1746 |
-
" <td>1</td>\n",
|
| 1747 |
-
" <td>-1.148985</td>\n",
|
| 1748 |
-
" <td>1</td>\n",
|
| 1749 |
-
" <td>11.0</td>\n",
|
| 1750 |
-
" <td>1</td>\n",
|
| 1751 |
-
" <td>0.048348</td>\n",
|
| 1752 |
-
" <td>152.0</td>\n",
|
| 1753 |
-
" <td>0.581474</td>\n",
|
| 1754 |
-
" <td>0</td>\n",
|
| 1755 |
-
" <td>1</td>\n",
|
| 1756 |
-
" <td>0</td>\n",
|
| 1757 |
-
" <td>0</td>\n",
|
| 1758 |
-
" </tr>\n",
|
| 1759 |
-
" <tr>\n",
|
| 1760 |
-
" <th>4</th>\n",
|
| 1761 |
-
" <td>0</td>\n",
|
| 1762 |
-
" <td>-0.633242</td>\n",
|
| 1763 |
-
" <td>1</td>\n",
|
| 1764 |
-
" <td>41.0</td>\n",
|
| 1765 |
-
" <td>1</td>\n",
|
| 1766 |
-
" <td>0.046259</td>\n",
|
| 1767 |
-
" <td>152.0</td>\n",
|
| 1768 |
-
" <td>-1.378580</td>\n",
|
| 1769 |
-
" <td>0</td>\n",
|
| 1770 |
-
" <td>1</td>\n",
|
| 1771 |
-
" <td>0</td>\n",
|
| 1772 |
-
" <td>0</td>\n",
|
| 1773 |
-
" </tr>\n",
|
| 1774 |
-
" <tr>\n",
|
| 1775 |
-
" <th>...</th>\n",
|
| 1776 |
-
" <td>...</td>\n",
|
| 1777 |
-
" <td>...</td>\n",
|
| 1778 |
-
" <td>...</td>\n",
|
| 1779 |
-
" <td>...</td>\n",
|
| 1780 |
-
" <td>...</td>\n",
|
| 1781 |
-
" <td>...</td>\n",
|
| 1782 |
-
" <td>...</td>\n",
|
| 1783 |
-
" <td>...</td>\n",
|
| 1784 |
-
" <td>...</td>\n",
|
| 1785 |
-
" <td>...</td>\n",
|
| 1786 |
-
" <td>...</td>\n",
|
| 1787 |
-
" <td>...</td>\n",
|
| 1788 |
-
" </tr>\n",
|
| 1789 |
-
" <tr>\n",
|
| 1790 |
-
" <th>381104</th>\n",
|
| 1791 |
-
" <td>1</td>\n",
|
| 1792 |
-
" <td>2.267815</td>\n",
|
| 1793 |
-
" <td>1</td>\n",
|
| 1794 |
-
" <td>26.0</td>\n",
|
| 1795 |
-
" <td>1</td>\n",
|
| 1796 |
-
" <td>0.051234</td>\n",
|
| 1797 |
-
" <td>26.0</td>\n",
|
| 1798 |
-
" <td>-0.792954</td>\n",
|
| 1799 |
-
" <td>0</td>\n",
|
| 1800 |
-
" <td>0</td>\n",
|
| 1801 |
-
" <td>0</td>\n",
|
| 1802 |
-
" <td>0</td>\n",
|
| 1803 |
-
" </tr>\n",
|
| 1804 |
-
" <tr>\n",
|
| 1805 |
-
" <th>381105</th>\n",
|
| 1806 |
-
" <td>1</td>\n",
|
| 1807 |
-
" <td>-0.568774</td>\n",
|
| 1808 |
-
" <td>1</td>\n",
|
| 1809 |
-
" <td>37.0</td>\n",
|
| 1810 |
-
" <td>1</td>\n",
|
| 1811 |
-
" <td>0.069551</td>\n",
|
| 1812 |
-
" <td>152.0</td>\n",
|
| 1813 |
-
" <td>-0.279037</td>\n",
|
| 1814 |
-
" <td>0</td>\n",
|
| 1815 |
-
" <td>1</td>\n",
|
| 1816 |
-
" <td>0</td>\n",
|
| 1817 |
-
" <td>0</td>\n",
|
| 1818 |
-
" </tr>\n",
|
| 1819 |
-
" <tr>\n",
|
| 1820 |
-
" <th>381106</th>\n",
|
| 1821 |
-
" <td>1</td>\n",
|
| 1822 |
-
" <td>-1.148985</td>\n",
|
| 1823 |
-
" <td>1</td>\n",
|
| 1824 |
-
" <td>30.0</td>\n",
|
| 1825 |
-
" <td>1</td>\n",
|
| 1826 |
-
" <td>0.060439</td>\n",
|
| 1827 |
-
" <td>160.0</td>\n",
|
| 1828 |
-
" <td>0.079509</td>\n",
|
| 1829 |
-
" <td>0</td>\n",
|
| 1830 |
-
" <td>1</td>\n",
|
| 1831 |
-
" <td>0</td>\n",
|
| 1832 |
-
" <td>0</td>\n",
|
| 1833 |
-
" </tr>\n",
|
| 1834 |
-
" <tr>\n",
|
| 1835 |
-
" <th>381107</th>\n",
|
| 1836 |
-
" <td>0</td>\n",
|
| 1837 |
-
" <td>1.881007</td>\n",
|
| 1838 |
-
" <td>1</td>\n",
|
| 1839 |
-
" <td>14.0</td>\n",
|
| 1840 |
-
" <td>0</td>\n",
|
| 1841 |
-
" <td>0.078110</td>\n",
|
| 1842 |
-
" <td>124.0</td>\n",
|
| 1843 |
-
" <td>-0.960275</td>\n",
|
| 1844 |
-
" <td>0</td>\n",
|
| 1845 |
-
" <td>0</td>\n",
|
| 1846 |
-
" <td>1</td>\n",
|
| 1847 |
-
" <td>1</td>\n",
|
| 1848 |
-
" </tr>\n",
|
| 1849 |
-
" <tr>\n",
|
| 1850 |
-
" <th>381108</th>\n",
|
| 1851 |
-
" <td>1</td>\n",
|
| 1852 |
-
" <td>0.462713</td>\n",
|
| 1853 |
-
" <td>1</td>\n",
|
| 1854 |
-
" <td>29.0</td>\n",
|
| 1855 |
-
" <td>0</td>\n",
|
| 1856 |
-
" <td>0.072827</td>\n",
|
| 1857 |
-
" <td>26.0</td>\n",
|
| 1858 |
-
" <td>0.987826</td>\n",
|
| 1859 |
-
" <td>0</td>\n",
|
| 1860 |
-
" <td>0</td>\n",
|
| 1861 |
-
" <td>0</td>\n",
|
| 1862 |
-
" <td>0</td>\n",
|
| 1863 |
-
" </tr>\n",
|
| 1864 |
-
" </tbody>\n",
|
| 1865 |
-
"</table>\n",
|
| 1866 |
-
"<p>381109 rows × 12 columns</p>\n",
|
| 1867 |
-
"</div>"
|
| 1868 |
-
],
|
| 1869 |
-
"text/plain": [
|
| 1870 |
-
" Gender Age Driving_License Region_Code Previously_Insured \\\n",
|
| 1871 |
-
"0 1 0.333777 1 28.0 0 \n",
|
| 1872 |
-
"1 1 2.396751 1 3.0 0 \n",
|
| 1873 |
-
"2 1 0.527181 1 28.0 0 \n",
|
| 1874 |
-
"3 1 -1.148985 1 11.0 1 \n",
|
| 1875 |
-
"4 0 -0.633242 1 41.0 1 \n",
|
| 1876 |
-
"... ... ... ... ... ... \n",
|
| 1877 |
-
"381104 1 2.267815 1 26.0 1 \n",
|
| 1878 |
-
"381105 1 -0.568774 1 37.0 1 \n",
|
| 1879 |
-
"381106 1 -1.148985 1 30.0 1 \n",
|
| 1880 |
-
"381107 0 1.881007 1 14.0 0 \n",
|
| 1881 |
-
"381108 1 0.462713 1 29.0 0 \n",
|
| 1882 |
-
"\n",
|
| 1883 |
-
" Annual_Premium Policy_Sales_Channel Vintage Response \\\n",
|
| 1884 |
-
"0 0.070366 26.0 0.748795 1 \n",
|
| 1885 |
-
"1 0.057496 26.0 0.342443 0 \n",
|
| 1886 |
-
"2 0.066347 26.0 -1.521998 1 \n",
|
| 1887 |
-
"3 0.048348 152.0 0.581474 0 \n",
|
| 1888 |
-
"4 0.046259 152.0 -1.378580 0 \n",
|
| 1889 |
-
"... ... ... ... ... \n",
|
| 1890 |
-
"381104 0.051234 26.0 -0.792954 0 \n",
|
| 1891 |
-
"381105 0.069551 152.0 -0.279037 0 \n",
|
| 1892 |
-
"381106 0.060439 160.0 0.079509 0 \n",
|
| 1893 |
-
"381107 0.078110 124.0 -0.960275 0 \n",
|
| 1894 |
-
"381108 0.072827 26.0 0.987826 0 \n",
|
| 1895 |
-
"\n",
|
| 1896 |
-
" Vehicle_Age_lt_1_Year Vehicle_Age_gt_2_Years Vehicle_Damage_Yes \n",
|
| 1897 |
-
"0 0 1 1 \n",
|
| 1898 |
-
"1 0 0 0 \n",
|
| 1899 |
-
"2 0 1 1 \n",
|
| 1900 |
-
"3 1 0 0 \n",
|
| 1901 |
-
"4 1 0 0 \n",
|
| 1902 |
-
"... ... ... ... \n",
|
| 1903 |
-
"381104 0 0 0 \n",
|
| 1904 |
-
"381105 1 0 0 \n",
|
| 1905 |
-
"381106 1 0 0 \n",
|
| 1906 |
-
"381107 0 1 1 \n",
|
| 1907 |
-
"381108 0 0 0 \n",
|
| 1908 |
-
"\n",
|
| 1909 |
-
"[381109 rows x 12 columns]"
|
| 1910 |
-
]
|
| 1911 |
-
},
|
| 1912 |
-
"execution_count": 16,
|
| 1913 |
-
"metadata": {},
|
| 1914 |
-
"output_type": "execute_result"
|
| 1915 |
-
}
|
| 1916 |
-
],
|
| 1917 |
"source": [
|
| 1918 |
"train"
|
| 1919 |
]
|
| 1920 |
},
|
| 1921 |
{
|
| 1922 |
"cell_type": "code",
|
| 1923 |
-
"execution_count":
|
| 1924 |
"metadata": {
|
| 1925 |
"execution": {
|
| 1926 |
"iopub.execute_input": "2023-11-16T05:48:05.334543Z",
|
|
@@ -1942,7 +1263,7 @@
|
|
| 1942 |
},
|
| 1943 |
{
|
| 1944 |
"cell_type": "code",
|
| 1945 |
-
"execution_count":
|
| 1946 |
"metadata": {
|
| 1947 |
"execution": {
|
| 1948 |
"iopub.execute_input": "2023-11-16T05:48:12.294471Z",
|
|
@@ -1965,7 +1286,7 @@
|
|
| 1965 |
},
|
| 1966 |
{
|
| 1967 |
"cell_type": "code",
|
| 1968 |
-
"execution_count":
|
| 1969 |
"metadata": {
|
| 1970 |
"execution": {
|
| 1971 |
"iopub.execute_input": "2023-11-16T05:48:18.989930Z",
|
|
@@ -1983,7 +1304,7 @@
|
|
| 1983 |
},
|
| 1984 |
{
|
| 1985 |
"cell_type": "code",
|
| 1986 |
-
"execution_count":
|
| 1987 |
"metadata": {
|
| 1988 |
"execution": {
|
| 1989 |
"iopub.execute_input": "2023-11-16T05:48:25.677104Z",
|
|
@@ -2004,7 +1325,7 @@
|
|
| 2004 |
},
|
| 2005 |
{
|
| 2006 |
"cell_type": "code",
|
| 2007 |
-
"execution_count":
|
| 2008 |
"metadata": {
|
| 2009 |
"execution": {
|
| 2010 |
"iopub.execute_input": "2023-11-16T05:48:32.755356Z",
|
|
@@ -2021,7 +1342,7 @@
|
|
| 2021 |
},
|
| 2022 |
{
|
| 2023 |
"cell_type": "code",
|
| 2024 |
-
"execution_count":
|
| 2025 |
"metadata": {
|
| 2026 |
"execution": {
|
| 2027 |
"iopub.execute_input": "2023-11-16T05:48:39.182421Z",
|
|
@@ -2038,7 +1359,7 @@
|
|
| 2038 |
},
|
| 2039 |
{
|
| 2040 |
"cell_type": "code",
|
| 2041 |
-
"execution_count":
|
| 2042 |
"metadata": {
|
| 2043 |
"execution": {
|
| 2044 |
"iopub.execute_input": "2023-11-16T05:48:46.496489Z",
|
|
@@ -2048,22 +1369,7 @@
|
|
| 2048 |
"shell.execute_reply.started": "2023-11-16T05:48:46.496460Z"
|
| 2049 |
}
|
| 2050 |
},
|
| 2051 |
-
"outputs": [
|
| 2052 |
-
{
|
| 2053 |
-
"data": {
|
| 2054 |
-
"text/plain": [
|
| 2055 |
-
"Index(['Gender', 'Age', 'Driving_License', 'Region_Code', 'Previously_Insured',\n",
|
| 2056 |
-
" 'Annual_Premium', 'Policy_Sales_Channel', 'Vintage',\n",
|
| 2057 |
-
" 'Vehicle_Age_lt_1_Year', 'Vehicle_Age_gt_2_Years',\n",
|
| 2058 |
-
" 'Vehicle_Damage_Yes'],\n",
|
| 2059 |
-
" dtype='object')"
|
| 2060 |
-
]
|
| 2061 |
-
},
|
| 2062 |
-
"execution_count": 23,
|
| 2063 |
-
"metadata": {},
|
| 2064 |
-
"output_type": "execute_result"
|
| 2065 |
-
}
|
| 2066 |
-
],
|
| 2067 |
"source": [
|
| 2068 |
"x_train.columns"
|
| 2069 |
]
|
|
@@ -2289,7 +1595,7 @@
|
|
| 2289 |
},
|
| 2290 |
{
|
| 2291 |
"cell_type": "code",
|
| 2292 |
-
"execution_count":
|
| 2293 |
"metadata": {
|
| 2294 |
"execution": {
|
| 2295 |
"iopub.execute_input": "2023-11-16T06:08:40.887491Z",
|
|
@@ -2307,7 +1613,7 @@
|
|
| 2307 |
"traceback": [
|
| 2308 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 2309 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 2310 |
-
"\u001b[0;32m<ipython-input-
|
| 2311 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 6532\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6533\u001b[0m \u001b[0;31m# else, only a single dtype is given\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 6534\u001b[0;31m \u001b[0mnew_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6535\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_constructor_from_mgr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6536\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 2312 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 412\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 414\u001b[0;31m return self.apply(\n\u001b[0m\u001b[1;32m 415\u001b[0m \u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 2313 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, f, align_keys, **kwargs)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 354\u001b[0;31m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 355\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mextend_blocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_blocks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
|
|
| 603 |
},
|
| 604 |
{
|
| 605 |
"cell_type": "code",
|
| 606 |
+
"execution_count": null,
|
| 607 |
"metadata": {
|
| 608 |
"execution": {
|
| 609 |
"iopub.execute_input": "2023-11-16T05:40:08.587382Z",
|
|
|
|
| 613 |
"shell.execute_reply.started": "2023-11-16T05:40:08.587345Z"
|
| 614 |
}
|
| 615 |
},
|
| 616 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 617 |
"source": [
|
| 618 |
"# Different id nos from the other notebook\n",
|
| 619 |
"test.head() "
|
|
|
|
| 621 |
},
|
| 622 |
{
|
| 623 |
"cell_type": "code",
|
| 624 |
+
"execution_count": null,
|
| 625 |
"metadata": {
|
| 626 |
"execution": {
|
| 627 |
"iopub.execute_input": "2023-11-16T05:39:42.640987Z",
|
|
|
|
| 631 |
"shell.execute_reply.started": "2023-11-16T05:39:42.640955Z"
|
| 632 |
}
|
| 633 |
},
|
| 634 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 635 |
"source": [
|
| 636 |
"train.head()"
|
| 637 |
]
|
| 638 |
},
|
| 639 |
{
|
| 640 |
"cell_type": "code",
|
| 641 |
+
"execution_count": null,
|
| 642 |
"metadata": {
|
| 643 |
"execution": {
|
| 644 |
"iopub.execute_input": "2023-11-16T05:40:31.853856Z",
|
|
|
|
| 648 |
"shell.execute_reply.started": "2023-11-16T05:40:31.853824Z"
|
| 649 |
}
|
| 650 |
},
|
| 651 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 652 |
"source": [
|
| 653 |
"\n",
|
| 654 |
"train.shape"
|
|
|
|
| 656 |
},
|
| 657 |
{
|
| 658 |
"cell_type": "code",
|
| 659 |
+
"execution_count": null,
|
| 660 |
"metadata": {
|
| 661 |
"execution": {
|
| 662 |
"iopub.execute_input": "2023-11-16T05:40:39.805712Z",
|
|
|
|
| 666 |
"shell.execute_reply.started": "2023-11-16T05:40:39.805681Z"
|
| 667 |
}
|
| 668 |
},
|
| 669 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 670 |
"source": [
|
| 671 |
"train.isnull().sum()"
|
| 672 |
]
|
| 673 |
},
|
| 674 |
{
|
| 675 |
"cell_type": "code",
|
| 676 |
+
"execution_count": null,
|
| 677 |
"metadata": {
|
| 678 |
"execution": {
|
| 679 |
"iopub.execute_input": "2023-11-16T05:40:48.806458Z",
|
|
|
|
| 691 |
},
|
| 692 |
{
|
| 693 |
"cell_type": "code",
|
| 694 |
+
"execution_count": null,
|
| 695 |
"metadata": {
|
| 696 |
"execution": {
|
| 697 |
"iopub.execute_input": "2023-11-16T05:40:54.938097Z",
|
|
|
|
| 701 |
"shell.execute_reply.started": "2023-11-16T05:40:54.938068Z"
|
| 702 |
}
|
| 703 |
},
|
| 704 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 705 |
"source": [
|
| 706 |
"train[numerical_columns].describe()"
|
| 707 |
]
|
|
|
|
| 1094 |
},
|
| 1095 |
{
|
| 1096 |
"cell_type": "code",
|
| 1097 |
+
"execution_count": 3,
|
| 1098 |
"metadata": {
|
| 1099 |
"execution": {
|
| 1100 |
"iopub.execute_input": "2023-11-16T05:46:58.312193Z",
|
|
|
|
| 1112 |
},
|
| 1113 |
{
|
| 1114 |
"cell_type": "code",
|
| 1115 |
+
"execution_count": 4,
|
| 1116 |
"metadata": {
|
| 1117 |
"execution": {
|
| 1118 |
"iopub.execute_input": "2023-11-16T05:47:08.177008Z",
|
|
|
|
| 1129 |
},
|
| 1130 |
{
|
| 1131 |
"cell_type": "code",
|
| 1132 |
+
"execution_count": 5,
|
| 1133 |
"metadata": {
|
| 1134 |
"execution": {
|
| 1135 |
"iopub.execute_input": "2023-11-16T05:47:14.997163Z",
|
|
|
|
| 1146 |
},
|
| 1147 |
{
|
| 1148 |
"cell_type": "code",
|
| 1149 |
+
"execution_count": 6,
|
| 1150 |
"metadata": {
|
| 1151 |
"execution": {
|
| 1152 |
"iopub.execute_input": "2023-11-16T05:47:22.318839Z",
|
|
|
|
| 1166 |
},
|
| 1167 |
{
|
| 1168 |
"cell_type": "code",
|
| 1169 |
+
"execution_count": 7,
|
| 1170 |
"metadata": {
|
| 1171 |
"execution": {
|
| 1172 |
"iopub.execute_input": "2023-11-16T05:47:29.960566Z",
|
|
|
|
| 1189 |
},
|
| 1190 |
{
|
| 1191 |
"cell_type": "code",
|
| 1192 |
+
"execution_count": 8,
|
| 1193 |
"metadata": {
|
| 1194 |
"execution": {
|
| 1195 |
"iopub.execute_input": "2023-11-16T05:47:35.704010Z",
|
|
|
|
| 1206 |
},
|
| 1207 |
{
|
| 1208 |
"cell_type": "code",
|
| 1209 |
+
"execution_count": 9,
|
| 1210 |
"metadata": {
|
| 1211 |
"execution": {
|
| 1212 |
"iopub.execute_input": "2023-11-16T05:47:42.692055Z",
|
|
|
|
| 1224 |
},
|
| 1225 |
{
|
| 1226 |
"cell_type": "code",
|
| 1227 |
+
"execution_count": null,
|
| 1228 |
"metadata": {
|
| 1229 |
"execution": {
|
| 1230 |
"iopub.execute_input": "2023-11-16T05:47:52.984270Z",
|
|
|
|
| 1234 |
"shell.execute_reply.started": "2023-11-16T05:47:52.984232Z"
|
| 1235 |
}
|
| 1236 |
},
|
| 1237 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
| 1263 |
},
|
| 1264 |
{
|
| 1265 |
"cell_type": "code",
|
| 1266 |
+
"execution_count": 11,
|
| 1267 |
"metadata": {
|
| 1268 |
"execution": {
|
| 1269 |
"iopub.execute_input": "2023-11-16T05:48:12.294471Z",
|
|
|
|
| 1286 |
},
|
| 1287 |
{
|
| 1288 |
"cell_type": "code",
|
| 1289 |
+
"execution_count": 12,
|
| 1290 |
"metadata": {
|
| 1291 |
"execution": {
|
| 1292 |
"iopub.execute_input": "2023-11-16T05:48:18.989930Z",
|
|
|
|
| 1304 |
},
|
| 1305 |
{
|
| 1306 |
"cell_type": "code",
|
| 1307 |
+
"execution_count": 13,
|
| 1308 |
"metadata": {
|
| 1309 |
"execution": {
|
| 1310 |
"iopub.execute_input": "2023-11-16T05:48:25.677104Z",
|
|
|
|
| 1325 |
},
|
| 1326 |
{
|
| 1327 |
"cell_type": "code",
|
| 1328 |
+
"execution_count": null,
|
| 1329 |
"metadata": {
|
| 1330 |
"execution": {
|
| 1331 |
"iopub.execute_input": "2023-11-16T05:48:32.755356Z",
|
|
|
|
| 1342 |
},
|
| 1343 |
{
|
| 1344 |
"cell_type": "code",
|
| 1345 |
+
"execution_count": 15,
|
| 1346 |
"metadata": {
|
| 1347 |
"execution": {
|
| 1348 |
"iopub.execute_input": "2023-11-16T05:48:39.182421Z",
|
|
|
|
| 1359 |
},
|
| 1360 |
{
|
| 1361 |
"cell_type": "code",
|
| 1362 |
+
"execution_count": null,
|
| 1363 |
"metadata": {
|
| 1364 |
"execution": {
|
| 1365 |
"iopub.execute_input": "2023-11-16T05:48:46.496489Z",
|
|
|
|
| 1369 |
"shell.execute_reply.started": "2023-11-16T05:48:46.496460Z"
|
| 1370 |
}
|
| 1371 |
},
|
| 1372 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1373 |
"source": [
|
| 1374 |
"x_train.columns"
|
| 1375 |
]
|
|
|
|
| 1595 |
},
|
| 1596 |
{
|
| 1597 |
"cell_type": "code",
|
| 1598 |
+
"execution_count": 16,
|
| 1599 |
"metadata": {
|
| 1600 |
"execution": {
|
| 1601 |
"iopub.execute_input": "2023-11-16T06:08:40.887491Z",
|
|
|
|
| 1613 |
"traceback": [
|
| 1614 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 1615 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 1616 |
+
"\u001b[0;32m<ipython-input-16-81969cd12a4b>\u001b[0m in \u001b[0;36m<cell line: 3>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mcolumn\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mcat_feat\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mx_train\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcolumn\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx_train\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcolumn\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'int'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0mx_test\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcolumn\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx_test\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcolumn\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'int'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1617 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 6532\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6533\u001b[0m \u001b[0;31m# else, only a single dtype is given\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 6534\u001b[0;31m \u001b[0mnew_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6535\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_constructor_from_mgr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6536\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1618 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 412\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 414\u001b[0;31m return self.apply(\n\u001b[0m\u001b[1;32m 415\u001b[0m \u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 1619 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, f, align_keys, **kwargs)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 354\u001b[0;31m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 355\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mextend_blocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_blocks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
benchmark/pandas_6/pandas_6_fixed.ipynb
CHANGED
|
@@ -156,7 +156,7 @@
|
|
| 156 |
},
|
| 157 |
{
|
| 158 |
"cell_type": "code",
|
| 159 |
-
"execution_count":
|
| 160 |
"metadata": {
|
| 161 |
"execution": {
|
| 162 |
"iopub.execute_input": "2023-05-18T11:38:26.877375Z",
|
|
@@ -166,34 +166,14 @@
|
|
| 166 |
"shell.execute_reply.started": "2023-05-18T11:38:26.877341Z"
|
| 167 |
}
|
| 168 |
},
|
| 169 |
-
"outputs": [
|
| 170 |
-
{
|
| 171 |
-
"name": "stdout",
|
| 172 |
-
"output_type": "stream",
|
| 173 |
-
"text": [
|
| 174 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 175 |
-
"RangeIndex: 186850 entries, 0 to 186849\n",
|
| 176 |
-
"Data columns (total 6 columns):\n",
|
| 177 |
-
" # Column Non-Null Count Dtype \n",
|
| 178 |
-
"--- ------ -------------- ----- \n",
|
| 179 |
-
" 0 Order ID 186305 non-null object\n",
|
| 180 |
-
" 1 Product 186305 non-null object\n",
|
| 181 |
-
" 2 Quantity Ordered 186305 non-null object\n",
|
| 182 |
-
" 3 Price Each 186305 non-null object\n",
|
| 183 |
-
" 4 Order Date 186305 non-null object\n",
|
| 184 |
-
" 5 Purchase Address 186305 non-null object\n",
|
| 185 |
-
"dtypes: object(6)\n",
|
| 186 |
-
"memory usage: 8.6+ MB\n"
|
| 187 |
-
]
|
| 188 |
-
}
|
| 189 |
-
],
|
| 190 |
"source": [
|
| 191 |
"df.info()"
|
| 192 |
]
|
| 193 |
},
|
| 194 |
{
|
| 195 |
"cell_type": "code",
|
| 196 |
-
"execution_count":
|
| 197 |
"metadata": {
|
| 198 |
"execution": {
|
| 199 |
"iopub.execute_input": "2023-05-18T11:38:27.249459Z",
|
|
@@ -203,24 +183,7 @@
|
|
| 203 |
"shell.execute_reply.started": "2023-05-18T11:38:27.249429Z"
|
| 204 |
}
|
| 205 |
},
|
| 206 |
-
"outputs": [
|
| 207 |
-
{
|
| 208 |
-
"data": {
|
| 209 |
-
"text/plain": [
|
| 210 |
-
"Order ID 545\n",
|
| 211 |
-
"Product 545\n",
|
| 212 |
-
"Quantity Ordered 545\n",
|
| 213 |
-
"Price Each 545\n",
|
| 214 |
-
"Order Date 545\n",
|
| 215 |
-
"Purchase Address 545\n",
|
| 216 |
-
"dtype: int64"
|
| 217 |
-
]
|
| 218 |
-
},
|
| 219 |
-
"execution_count": 4,
|
| 220 |
-
"metadata": {},
|
| 221 |
-
"output_type": "execute_result"
|
| 222 |
-
}
|
| 223 |
-
],
|
| 224 |
"source": [
|
| 225 |
"df.isnull().sum()"
|
| 226 |
]
|
|
@@ -234,7 +197,7 @@
|
|
| 234 |
},
|
| 235 |
{
|
| 236 |
"cell_type": "code",
|
| 237 |
-
"execution_count":
|
| 238 |
"metadata": {
|
| 239 |
"execution": {
|
| 240 |
"iopub.execute_input": "2023-05-18T11:38:27.629044Z",
|
|
@@ -409,7 +372,7 @@
|
|
| 409 |
"[186305 rows x 6 columns]"
|
| 410 |
]
|
| 411 |
},
|
| 412 |
-
"execution_count":
|
| 413 |
"metadata": {},
|
| 414 |
"output_type": "execute_result"
|
| 415 |
}
|
|
@@ -421,7 +384,7 @@
|
|
| 421 |
},
|
| 422 |
{
|
| 423 |
"cell_type": "code",
|
| 424 |
-
"execution_count":
|
| 425 |
"metadata": {
|
| 426 |
"execution": {
|
| 427 |
"iopub.execute_input": "2023-05-18T11:38:28.039601Z",
|
|
@@ -431,24 +394,7 @@
|
|
| 431 |
"shell.execute_reply.started": "2023-05-18T11:38:28.039569Z"
|
| 432 |
}
|
| 433 |
},
|
| 434 |
-
"outputs": [
|
| 435 |
-
{
|
| 436 |
-
"data": {
|
| 437 |
-
"text/plain": [
|
| 438 |
-
"Order ID 0\n",
|
| 439 |
-
"Product 0\n",
|
| 440 |
-
"Quantity Ordered 0\n",
|
| 441 |
-
"Price Each 0\n",
|
| 442 |
-
"Order Date 0\n",
|
| 443 |
-
"Purchase Address 0\n",
|
| 444 |
-
"dtype: int64"
|
| 445 |
-
]
|
| 446 |
-
},
|
| 447 |
-
"execution_count": 6,
|
| 448 |
-
"metadata": {},
|
| 449 |
-
"output_type": "execute_result"
|
| 450 |
-
}
|
| 451 |
-
],
|
| 452 |
"source": [
|
| 453 |
"df.isnull().sum()"
|
| 454 |
]
|
|
@@ -462,7 +408,7 @@
|
|
| 462 |
},
|
| 463 |
{
|
| 464 |
"cell_type": "code",
|
| 465 |
-
"execution_count":
|
| 466 |
"metadata": {
|
| 467 |
"execution": {
|
| 468 |
"iopub.execute_input": "2023-05-18T11:39:04.344286Z",
|
|
@@ -474,7 +420,11 @@
|
|
| 474 |
},
|
| 475 |
"outputs": [],
|
| 476 |
"source": [
|
| 477 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 478 |
"#This Error is occuring due to some string values in Order ID Column"
|
| 479 |
]
|
| 480 |
},
|
|
@@ -487,7 +437,7 @@
|
|
| 487 |
},
|
| 488 |
{
|
| 489 |
"cell_type": "code",
|
| 490 |
-
"execution_count":
|
| 491 |
"metadata": {
|
| 492 |
"execution": {
|
| 493 |
"iopub.execute_input": "2023-05-18T11:39:16.699709Z",
|
|
@@ -497,176 +447,7 @@
|
|
| 497 |
"shell.execute_reply.started": "2023-05-18T11:39:16.699678Z"
|
| 498 |
}
|
| 499 |
},
|
| 500 |
-
"outputs": [
|
| 501 |
-
{
|
| 502 |
-
"data": {
|
| 503 |
-
"text/html": [
|
| 504 |
-
"<div>\n",
|
| 505 |
-
"<style scoped>\n",
|
| 506 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 507 |
-
" vertical-align: middle;\n",
|
| 508 |
-
" }\n",
|
| 509 |
-
"\n",
|
| 510 |
-
" .dataframe tbody tr th {\n",
|
| 511 |
-
" vertical-align: top;\n",
|
| 512 |
-
" }\n",
|
| 513 |
-
"\n",
|
| 514 |
-
" .dataframe thead th {\n",
|
| 515 |
-
" text-align: right;\n",
|
| 516 |
-
" }\n",
|
| 517 |
-
"</style>\n",
|
| 518 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 519 |
-
" <thead>\n",
|
| 520 |
-
" <tr style=\"text-align: right;\">\n",
|
| 521 |
-
" <th></th>\n",
|
| 522 |
-
" <th>Order ID</th>\n",
|
| 523 |
-
" <th>Product</th>\n",
|
| 524 |
-
" <th>Quantity Ordered</th>\n",
|
| 525 |
-
" <th>Price Each</th>\n",
|
| 526 |
-
" <th>Order Date</th>\n",
|
| 527 |
-
" <th>Purchase Address</th>\n",
|
| 528 |
-
" </tr>\n",
|
| 529 |
-
" </thead>\n",
|
| 530 |
-
" <tbody>\n",
|
| 531 |
-
" <tr>\n",
|
| 532 |
-
" <th>0</th>\n",
|
| 533 |
-
" <td>176558</td>\n",
|
| 534 |
-
" <td>USB-C Charging Cable</td>\n",
|
| 535 |
-
" <td>2</td>\n",
|
| 536 |
-
" <td>11.95</td>\n",
|
| 537 |
-
" <td>04/19/19 08:46</td>\n",
|
| 538 |
-
" <td>917 1st St, Dallas, TX 75001</td>\n",
|
| 539 |
-
" </tr>\n",
|
| 540 |
-
" <tr>\n",
|
| 541 |
-
" <th>2</th>\n",
|
| 542 |
-
" <td>176559</td>\n",
|
| 543 |
-
" <td>Bose SoundSport Headphones</td>\n",
|
| 544 |
-
" <td>1</td>\n",
|
| 545 |
-
" <td>99.99</td>\n",
|
| 546 |
-
" <td>04/07/19 22:30</td>\n",
|
| 547 |
-
" <td>682 Chestnut St, Boston, MA 02215</td>\n",
|
| 548 |
-
" </tr>\n",
|
| 549 |
-
" <tr>\n",
|
| 550 |
-
" <th>3</th>\n",
|
| 551 |
-
" <td>176560</td>\n",
|
| 552 |
-
" <td>Google Phone</td>\n",
|
| 553 |
-
" <td>1</td>\n",
|
| 554 |
-
" <td>600</td>\n",
|
| 555 |
-
" <td>04/12/19 14:38</td>\n",
|
| 556 |
-
" <td>669 Spruce St, Los Angeles, CA 90001</td>\n",
|
| 557 |
-
" </tr>\n",
|
| 558 |
-
" <tr>\n",
|
| 559 |
-
" <th>4</th>\n",
|
| 560 |
-
" <td>176560</td>\n",
|
| 561 |
-
" <td>Wired Headphones</td>\n",
|
| 562 |
-
" <td>1</td>\n",
|
| 563 |
-
" <td>11.99</td>\n",
|
| 564 |
-
" <td>04/12/19 14:38</td>\n",
|
| 565 |
-
" <td>669 Spruce St, Los Angeles, CA 90001</td>\n",
|
| 566 |
-
" </tr>\n",
|
| 567 |
-
" <tr>\n",
|
| 568 |
-
" <th>5</th>\n",
|
| 569 |
-
" <td>176561</td>\n",
|
| 570 |
-
" <td>Wired Headphones</td>\n",
|
| 571 |
-
" <td>1</td>\n",
|
| 572 |
-
" <td>11.99</td>\n",
|
| 573 |
-
" <td>04/30/19 09:27</td>\n",
|
| 574 |
-
" <td>333 8th St, Los Angeles, CA 90001</td>\n",
|
| 575 |
-
" </tr>\n",
|
| 576 |
-
" <tr>\n",
|
| 577 |
-
" <th>...</th>\n",
|
| 578 |
-
" <td>...</td>\n",
|
| 579 |
-
" <td>...</td>\n",
|
| 580 |
-
" <td>...</td>\n",
|
| 581 |
-
" <td>...</td>\n",
|
| 582 |
-
" <td>...</td>\n",
|
| 583 |
-
" <td>...</td>\n",
|
| 584 |
-
" </tr>\n",
|
| 585 |
-
" <tr>\n",
|
| 586 |
-
" <th>186845</th>\n",
|
| 587 |
-
" <td>259353</td>\n",
|
| 588 |
-
" <td>AAA Batteries (4-pack)</td>\n",
|
| 589 |
-
" <td>3</td>\n",
|
| 590 |
-
" <td>2.99</td>\n",
|
| 591 |
-
" <td>09/17/19 20:56</td>\n",
|
| 592 |
-
" <td>840 Highland St, Los Angeles, CA 90001</td>\n",
|
| 593 |
-
" </tr>\n",
|
| 594 |
-
" <tr>\n",
|
| 595 |
-
" <th>186846</th>\n",
|
| 596 |
-
" <td>259354</td>\n",
|
| 597 |
-
" <td>iPhone</td>\n",
|
| 598 |
-
" <td>1</td>\n",
|
| 599 |
-
" <td>700</td>\n",
|
| 600 |
-
" <td>09/01/19 16:00</td>\n",
|
| 601 |
-
" <td>216 Dogwood St, San Francisco, CA 94016</td>\n",
|
| 602 |
-
" </tr>\n",
|
| 603 |
-
" <tr>\n",
|
| 604 |
-
" <th>186847</th>\n",
|
| 605 |
-
" <td>259355</td>\n",
|
| 606 |
-
" <td>iPhone</td>\n",
|
| 607 |
-
" <td>1</td>\n",
|
| 608 |
-
" <td>700</td>\n",
|
| 609 |
-
" <td>09/23/19 07:39</td>\n",
|
| 610 |
-
" <td>220 12th St, San Francisco, CA 94016</td>\n",
|
| 611 |
-
" </tr>\n",
|
| 612 |
-
" <tr>\n",
|
| 613 |
-
" <th>186848</th>\n",
|
| 614 |
-
" <td>259356</td>\n",
|
| 615 |
-
" <td>34in Ultrawide Monitor</td>\n",
|
| 616 |
-
" <td>1</td>\n",
|
| 617 |
-
" <td>379.99</td>\n",
|
| 618 |
-
" <td>09/19/19 17:30</td>\n",
|
| 619 |
-
" <td>511 Forest St, San Francisco, CA 94016</td>\n",
|
| 620 |
-
" </tr>\n",
|
| 621 |
-
" <tr>\n",
|
| 622 |
-
" <th>186849</th>\n",
|
| 623 |
-
" <td>259357</td>\n",
|
| 624 |
-
" <td>USB-C Charging Cable</td>\n",
|
| 625 |
-
" <td>1</td>\n",
|
| 626 |
-
" <td>11.95</td>\n",
|
| 627 |
-
" <td>09/30/19 00:18</td>\n",
|
| 628 |
-
" <td>250 Meadow St, San Francisco, CA 94016</td>\n",
|
| 629 |
-
" </tr>\n",
|
| 630 |
-
" </tbody>\n",
|
| 631 |
-
"</table>\n",
|
| 632 |
-
"<p>185950 rows × 6 columns</p>\n",
|
| 633 |
-
"</div>"
|
| 634 |
-
],
|
| 635 |
-
"text/plain": [
|
| 636 |
-
" Order ID Product Quantity Ordered Price Each \\\n",
|
| 637 |
-
"0 176558 USB-C Charging Cable 2 11.95 \n",
|
| 638 |
-
"2 176559 Bose SoundSport Headphones 1 99.99 \n",
|
| 639 |
-
"3 176560 Google Phone 1 600 \n",
|
| 640 |
-
"4 176560 Wired Headphones 1 11.99 \n",
|
| 641 |
-
"5 176561 Wired Headphones 1 11.99 \n",
|
| 642 |
-
"... ... ... ... ... \n",
|
| 643 |
-
"186845 259353 AAA Batteries (4-pack) 3 2.99 \n",
|
| 644 |
-
"186846 259354 iPhone 1 700 \n",
|
| 645 |
-
"186847 259355 iPhone 1 700 \n",
|
| 646 |
-
"186848 259356 34in Ultrawide Monitor 1 379.99 \n",
|
| 647 |
-
"186849 259357 USB-C Charging Cable 1 11.95 \n",
|
| 648 |
-
"\n",
|
| 649 |
-
" Order Date Purchase Address \n",
|
| 650 |
-
"0 04/19/19 08:46 917 1st St, Dallas, TX 75001 \n",
|
| 651 |
-
"2 04/07/19 22:30 682 Chestnut St, Boston, MA 02215 \n",
|
| 652 |
-
"3 04/12/19 14:38 669 Spruce St, Los Angeles, CA 90001 \n",
|
| 653 |
-
"4 04/12/19 14:38 669 Spruce St, Los Angeles, CA 90001 \n",
|
| 654 |
-
"5 04/30/19 09:27 333 8th St, Los Angeles, CA 90001 \n",
|
| 655 |
-
"... ... ... \n",
|
| 656 |
-
"186845 09/17/19 20:56 840 Highland St, Los Angeles, CA 90001 \n",
|
| 657 |
-
"186846 09/01/19 16:00 216 Dogwood St, San Francisco, CA 94016 \n",
|
| 658 |
-
"186847 09/23/19 07:39 220 12th St, San Francisco, CA 94016 \n",
|
| 659 |
-
"186848 09/19/19 17:30 511 Forest St, San Francisco, CA 94016 \n",
|
| 660 |
-
"186849 09/30/19 00:18 250 Meadow St, San Francisco, CA 94016 \n",
|
| 661 |
-
"\n",
|
| 662 |
-
"[185950 rows x 6 columns]"
|
| 663 |
-
]
|
| 664 |
-
},
|
| 665 |
-
"execution_count": 8,
|
| 666 |
-
"metadata": {},
|
| 667 |
-
"output_type": "execute_result"
|
| 668 |
-
}
|
| 669 |
-
],
|
| 670 |
"source": [
|
| 671 |
"df=df.loc[df['Order ID']!='Order ID']\n",
|
| 672 |
"df"
|
|
@@ -674,7 +455,7 @@
|
|
| 674 |
},
|
| 675 |
{
|
| 676 |
"cell_type": "code",
|
| 677 |
-
"execution_count":
|
| 678 |
"metadata": {
|
| 679 |
"execution": {
|
| 680 |
"iopub.execute_input": "2023-05-18T11:39:47.133972Z",
|
|
@@ -693,7 +474,7 @@
|
|
| 693 |
},
|
| 694 |
{
|
| 695 |
"cell_type": "code",
|
| 696 |
-
"execution_count":
|
| 697 |
"metadata": {
|
| 698 |
"execution": {
|
| 699 |
"iopub.execute_input": "2023-05-18T11:39:42.972483Z",
|
|
@@ -703,27 +484,7 @@
|
|
| 703 |
"shell.execute_reply.started": "2023-05-18T11:39:42.972453Z"
|
| 704 |
}
|
| 705 |
},
|
| 706 |
-
"outputs": [
|
| 707 |
-
{
|
| 708 |
-
"name": "stdout",
|
| 709 |
-
"output_type": "stream",
|
| 710 |
-
"text": [
|
| 711 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 712 |
-
"Index: 185950 entries, 0 to 186849\n",
|
| 713 |
-
"Data columns (total 6 columns):\n",
|
| 714 |
-
" # Column Non-Null Count Dtype \n",
|
| 715 |
-
"--- ------ -------------- ----- \n",
|
| 716 |
-
" 0 Order ID 185950 non-null int64 \n",
|
| 717 |
-
" 1 Product 185950 non-null object \n",
|
| 718 |
-
" 2 Quantity Ordered 185950 non-null int64 \n",
|
| 719 |
-
" 3 Price Each 185950 non-null float64 \n",
|
| 720 |
-
" 4 Order Date 185950 non-null datetime64[ns]\n",
|
| 721 |
-
" 5 Purchase Address 185950 non-null object \n",
|
| 722 |
-
"dtypes: datetime64[ns](1), float64(1), int64(2), object(2)\n",
|
| 723 |
-
"memory usage: 9.9+ MB\n"
|
| 724 |
-
]
|
| 725 |
-
}
|
| 726 |
-
],
|
| 727 |
"source": [
|
| 728 |
"df.info()"
|
| 729 |
]
|
|
|
|
| 156 |
},
|
| 157 |
{
|
| 158 |
"cell_type": "code",
|
| 159 |
+
"execution_count": null,
|
| 160 |
"metadata": {
|
| 161 |
"execution": {
|
| 162 |
"iopub.execute_input": "2023-05-18T11:38:26.877375Z",
|
|
|
|
| 166 |
"shell.execute_reply.started": "2023-05-18T11:38:26.877341Z"
|
| 167 |
}
|
| 168 |
},
|
| 169 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
"source": [
|
| 171 |
"df.info()"
|
| 172 |
]
|
| 173 |
},
|
| 174 |
{
|
| 175 |
"cell_type": "code",
|
| 176 |
+
"execution_count": null,
|
| 177 |
"metadata": {
|
| 178 |
"execution": {
|
| 179 |
"iopub.execute_input": "2023-05-18T11:38:27.249459Z",
|
|
|
|
| 183 |
"shell.execute_reply.started": "2023-05-18T11:38:27.249429Z"
|
| 184 |
}
|
| 185 |
},
|
| 186 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
"source": [
|
| 188 |
"df.isnull().sum()"
|
| 189 |
]
|
|
|
|
| 197 |
},
|
| 198 |
{
|
| 199 |
"cell_type": "code",
|
| 200 |
+
"execution_count": 3,
|
| 201 |
"metadata": {
|
| 202 |
"execution": {
|
| 203 |
"iopub.execute_input": "2023-05-18T11:38:27.629044Z",
|
|
|
|
| 372 |
"[186305 rows x 6 columns]"
|
| 373 |
]
|
| 374 |
},
|
| 375 |
+
"execution_count": 3,
|
| 376 |
"metadata": {},
|
| 377 |
"output_type": "execute_result"
|
| 378 |
}
|
|
|
|
| 384 |
},
|
| 385 |
{
|
| 386 |
"cell_type": "code",
|
| 387 |
+
"execution_count": null,
|
| 388 |
"metadata": {
|
| 389 |
"execution": {
|
| 390 |
"iopub.execute_input": "2023-05-18T11:38:28.039601Z",
|
|
|
|
| 394 |
"shell.execute_reply.started": "2023-05-18T11:38:28.039569Z"
|
| 395 |
}
|
| 396 |
},
|
| 397 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 398 |
"source": [
|
| 399 |
"df.isnull().sum()"
|
| 400 |
]
|
|
|
|
| 408 |
},
|
| 409 |
{
|
| 410 |
"cell_type": "code",
|
| 411 |
+
"execution_count": 4,
|
| 412 |
"metadata": {
|
| 413 |
"execution": {
|
| 414 |
"iopub.execute_input": "2023-05-18T11:39:04.344286Z",
|
|
|
|
| 420 |
},
|
| 421 |
"outputs": [],
|
| 422 |
"source": [
|
| 423 |
+
" # fix ----- Convert to numeric, forcing errors to NaN, then drop NaNs\n",
|
| 424 |
+
"# df=df['Order ID'].astype('int')\n",
|
| 425 |
+
"df[\"Order ID\"] = pd.to_numeric(df[\"Order ID\"], errors=\"coerce\")\n",
|
| 426 |
+
"df = df.dropna(subset=[\"Order ID\"])\n",
|
| 427 |
+
"\n",
|
| 428 |
"#This Error is occuring due to some string values in Order ID Column"
|
| 429 |
]
|
| 430 |
},
|
|
|
|
| 437 |
},
|
| 438 |
{
|
| 439 |
"cell_type": "code",
|
| 440 |
+
"execution_count": null,
|
| 441 |
"metadata": {
|
| 442 |
"execution": {
|
| 443 |
"iopub.execute_input": "2023-05-18T11:39:16.699709Z",
|
|
|
|
| 447 |
"shell.execute_reply.started": "2023-05-18T11:39:16.699678Z"
|
| 448 |
}
|
| 449 |
},
|
| 450 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 451 |
"source": [
|
| 452 |
"df=df.loc[df['Order ID']!='Order ID']\n",
|
| 453 |
"df"
|
|
|
|
| 455 |
},
|
| 456 |
{
|
| 457 |
"cell_type": "code",
|
| 458 |
+
"execution_count": null,
|
| 459 |
"metadata": {
|
| 460 |
"execution": {
|
| 461 |
"iopub.execute_input": "2023-05-18T11:39:47.133972Z",
|
|
|
|
| 474 |
},
|
| 475 |
{
|
| 476 |
"cell_type": "code",
|
| 477 |
+
"execution_count": null,
|
| 478 |
"metadata": {
|
| 479 |
"execution": {
|
| 480 |
"iopub.execute_input": "2023-05-18T11:39:42.972483Z",
|
|
|
|
| 484 |
"shell.execute_reply.started": "2023-05-18T11:39:42.972453Z"
|
| 485 |
}
|
| 486 |
},
|
| 487 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 488 |
"source": [
|
| 489 |
"df.info()"
|
| 490 |
]
|
benchmark/pandas_6/pandas_6_reproduced.ipynb
CHANGED
|
@@ -156,7 +156,7 @@
|
|
| 156 |
},
|
| 157 |
{
|
| 158 |
"cell_type": "code",
|
| 159 |
-
"execution_count":
|
| 160 |
"metadata": {
|
| 161 |
"execution": {
|
| 162 |
"iopub.execute_input": "2023-05-18T11:38:26.877375Z",
|
|
@@ -166,34 +166,14 @@
|
|
| 166 |
"shell.execute_reply.started": "2023-05-18T11:38:26.877341Z"
|
| 167 |
}
|
| 168 |
},
|
| 169 |
-
"outputs": [
|
| 170 |
-
{
|
| 171 |
-
"name": "stdout",
|
| 172 |
-
"output_type": "stream",
|
| 173 |
-
"text": [
|
| 174 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 175 |
-
"RangeIndex: 186850 entries, 0 to 186849\n",
|
| 176 |
-
"Data columns (total 6 columns):\n",
|
| 177 |
-
" # Column Non-Null Count Dtype \n",
|
| 178 |
-
"--- ------ -------------- ----- \n",
|
| 179 |
-
" 0 Order ID 186305 non-null object\n",
|
| 180 |
-
" 1 Product 186305 non-null object\n",
|
| 181 |
-
" 2 Quantity Ordered 186305 non-null object\n",
|
| 182 |
-
" 3 Price Each 186305 non-null object\n",
|
| 183 |
-
" 4 Order Date 186305 non-null object\n",
|
| 184 |
-
" 5 Purchase Address 186305 non-null object\n",
|
| 185 |
-
"dtypes: object(6)\n",
|
| 186 |
-
"memory usage: 8.6+ MB\n"
|
| 187 |
-
]
|
| 188 |
-
}
|
| 189 |
-
],
|
| 190 |
"source": [
|
| 191 |
"df.info()"
|
| 192 |
]
|
| 193 |
},
|
| 194 |
{
|
| 195 |
"cell_type": "code",
|
| 196 |
-
"execution_count":
|
| 197 |
"metadata": {
|
| 198 |
"execution": {
|
| 199 |
"iopub.execute_input": "2023-05-18T11:38:27.249459Z",
|
|
@@ -203,24 +183,7 @@
|
|
| 203 |
"shell.execute_reply.started": "2023-05-18T11:38:27.249429Z"
|
| 204 |
}
|
| 205 |
},
|
| 206 |
-
"outputs": [
|
| 207 |
-
{
|
| 208 |
-
"data": {
|
| 209 |
-
"text/plain": [
|
| 210 |
-
"Order ID 545\n",
|
| 211 |
-
"Product 545\n",
|
| 212 |
-
"Quantity Ordered 545\n",
|
| 213 |
-
"Price Each 545\n",
|
| 214 |
-
"Order Date 545\n",
|
| 215 |
-
"Purchase Address 545\n",
|
| 216 |
-
"dtype: int64"
|
| 217 |
-
]
|
| 218 |
-
},
|
| 219 |
-
"execution_count": 4,
|
| 220 |
-
"metadata": {},
|
| 221 |
-
"output_type": "execute_result"
|
| 222 |
-
}
|
| 223 |
-
],
|
| 224 |
"source": [
|
| 225 |
"df.isnull().sum()"
|
| 226 |
]
|
|
@@ -234,7 +197,7 @@
|
|
| 234 |
},
|
| 235 |
{
|
| 236 |
"cell_type": "code",
|
| 237 |
-
"execution_count":
|
| 238 |
"metadata": {
|
| 239 |
"execution": {
|
| 240 |
"iopub.execute_input": "2023-05-18T11:38:27.629044Z",
|
|
@@ -409,7 +372,7 @@
|
|
| 409 |
"[186305 rows x 6 columns]"
|
| 410 |
]
|
| 411 |
},
|
| 412 |
-
"execution_count":
|
| 413 |
"metadata": {},
|
| 414 |
"output_type": "execute_result"
|
| 415 |
}
|
|
@@ -421,7 +384,7 @@
|
|
| 421 |
},
|
| 422 |
{
|
| 423 |
"cell_type": "code",
|
| 424 |
-
"execution_count":
|
| 425 |
"metadata": {
|
| 426 |
"execution": {
|
| 427 |
"iopub.execute_input": "2023-05-18T11:38:28.039601Z",
|
|
@@ -431,24 +394,7 @@
|
|
| 431 |
"shell.execute_reply.started": "2023-05-18T11:38:28.039569Z"
|
| 432 |
}
|
| 433 |
},
|
| 434 |
-
"outputs": [
|
| 435 |
-
{
|
| 436 |
-
"data": {
|
| 437 |
-
"text/plain": [
|
| 438 |
-
"Order ID 0\n",
|
| 439 |
-
"Product 0\n",
|
| 440 |
-
"Quantity Ordered 0\n",
|
| 441 |
-
"Price Each 0\n",
|
| 442 |
-
"Order Date 0\n",
|
| 443 |
-
"Purchase Address 0\n",
|
| 444 |
-
"dtype: int64"
|
| 445 |
-
]
|
| 446 |
-
},
|
| 447 |
-
"execution_count": 6,
|
| 448 |
-
"metadata": {},
|
| 449 |
-
"output_type": "execute_result"
|
| 450 |
-
}
|
| 451 |
-
],
|
| 452 |
"source": [
|
| 453 |
"df.isnull().sum()"
|
| 454 |
]
|
|
@@ -462,7 +408,7 @@
|
|
| 462 |
},
|
| 463 |
{
|
| 464 |
"cell_type": "code",
|
| 465 |
-
"execution_count":
|
| 466 |
"metadata": {
|
| 467 |
"execution": {
|
| 468 |
"iopub.execute_input": "2023-05-18T11:39:04.344286Z",
|
|
@@ -480,7 +426,7 @@
|
|
| 480 |
"traceback": [
|
| 481 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 482 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 483 |
-
"\u001b[0;32m<ipython-input-
|
| 484 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 6532\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6533\u001b[0m \u001b[0;31m# else, only a single dtype is given\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 6534\u001b[0;31m \u001b[0mnew_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6535\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_constructor_from_mgr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6536\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 485 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 412\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 414\u001b[0;31m return self.apply(\n\u001b[0m\u001b[1;32m 415\u001b[0m \u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 486 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, f, align_keys, **kwargs)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 354\u001b[0;31m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 355\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mextend_blocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_blocks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
|
|
| 156 |
},
|
| 157 |
{
|
| 158 |
"cell_type": "code",
|
| 159 |
+
"execution_count": null,
|
| 160 |
"metadata": {
|
| 161 |
"execution": {
|
| 162 |
"iopub.execute_input": "2023-05-18T11:38:26.877375Z",
|
|
|
|
| 166 |
"shell.execute_reply.started": "2023-05-18T11:38:26.877341Z"
|
| 167 |
}
|
| 168 |
},
|
| 169 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
"source": [
|
| 171 |
"df.info()"
|
| 172 |
]
|
| 173 |
},
|
| 174 |
{
|
| 175 |
"cell_type": "code",
|
| 176 |
+
"execution_count": null,
|
| 177 |
"metadata": {
|
| 178 |
"execution": {
|
| 179 |
"iopub.execute_input": "2023-05-18T11:38:27.249459Z",
|
|
|
|
| 183 |
"shell.execute_reply.started": "2023-05-18T11:38:27.249429Z"
|
| 184 |
}
|
| 185 |
},
|
| 186 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
"source": [
|
| 188 |
"df.isnull().sum()"
|
| 189 |
]
|
|
|
|
| 197 |
},
|
| 198 |
{
|
| 199 |
"cell_type": "code",
|
| 200 |
+
"execution_count": 3,
|
| 201 |
"metadata": {
|
| 202 |
"execution": {
|
| 203 |
"iopub.execute_input": "2023-05-18T11:38:27.629044Z",
|
|
|
|
| 372 |
"[186305 rows x 6 columns]"
|
| 373 |
]
|
| 374 |
},
|
| 375 |
+
"execution_count": 3,
|
| 376 |
"metadata": {},
|
| 377 |
"output_type": "execute_result"
|
| 378 |
}
|
|
|
|
| 384 |
},
|
| 385 |
{
|
| 386 |
"cell_type": "code",
|
| 387 |
+
"execution_count": null,
|
| 388 |
"metadata": {
|
| 389 |
"execution": {
|
| 390 |
"iopub.execute_input": "2023-05-18T11:38:28.039601Z",
|
|
|
|
| 394 |
"shell.execute_reply.started": "2023-05-18T11:38:28.039569Z"
|
| 395 |
}
|
| 396 |
},
|
| 397 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 398 |
"source": [
|
| 399 |
"df.isnull().sum()"
|
| 400 |
]
|
|
|
|
| 408 |
},
|
| 409 |
{
|
| 410 |
"cell_type": "code",
|
| 411 |
+
"execution_count": 4,
|
| 412 |
"metadata": {
|
| 413 |
"execution": {
|
| 414 |
"iopub.execute_input": "2023-05-18T11:39:04.344286Z",
|
|
|
|
| 426 |
"traceback": [
|
| 427 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 428 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 429 |
+
"\u001b[0;32m<ipython-input-4-63a46ab18be1>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdf\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Order ID'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'int'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;31m#This Error is occuring due to some string values in Order ID Column\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 430 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 6532\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6533\u001b[0m \u001b[0;31m# else, only a single dtype is given\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 6534\u001b[0;31m \u001b[0mnew_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6535\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_constructor_from_mgr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6536\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 431 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 412\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 414\u001b[0;31m return self.apply(\n\u001b[0m\u001b[1;32m 415\u001b[0m \u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 432 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, f, align_keys, **kwargs)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 354\u001b[0;31m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 355\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mextend_blocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_blocks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
benchmark/pandas_7/pandas_7_fixed.ipynb
CHANGED
|
@@ -317,7 +317,7 @@
|
|
| 317 |
},
|
| 318 |
{
|
| 319 |
"cell_type": "code",
|
| 320 |
-
"execution_count":
|
| 321 |
"metadata": {
|
| 322 |
"execution": {
|
| 323 |
"iopub.execute_input": "2023-06-03T13:42:42.716831Z",
|
|
@@ -327,76 +327,7 @@
|
|
| 327 |
"shell.execute_reply.started": "2023-06-03T13:42:42.716765Z"
|
| 328 |
}
|
| 329 |
},
|
| 330 |
-
"outputs": [
|
| 331 |
-
{
|
| 332 |
-
"data": {
|
| 333 |
-
"text/html": [
|
| 334 |
-
"<div>\n",
|
| 335 |
-
"<style scoped>\n",
|
| 336 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 337 |
-
" vertical-align: middle;\n",
|
| 338 |
-
" }\n",
|
| 339 |
-
"\n",
|
| 340 |
-
" .dataframe tbody tr th {\n",
|
| 341 |
-
" vertical-align: top;\n",
|
| 342 |
-
" }\n",
|
| 343 |
-
"\n",
|
| 344 |
-
" .dataframe thead th {\n",
|
| 345 |
-
" text-align: right;\n",
|
| 346 |
-
" }\n",
|
| 347 |
-
"</style>\n",
|
| 348 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 349 |
-
" <thead>\n",
|
| 350 |
-
" <tr style=\"text-align: right;\">\n",
|
| 351 |
-
" <th></th>\n",
|
| 352 |
-
" <th>column_name</th>\n",
|
| 353 |
-
" <th>percent_missing</th>\n",
|
| 354 |
-
" </tr>\n",
|
| 355 |
-
" </thead>\n",
|
| 356 |
-
" <tbody>\n",
|
| 357 |
-
" <tr>\n",
|
| 358 |
-
" <th>metacritic</th>\n",
|
| 359 |
-
" <td>metacritic</td>\n",
|
| 360 |
-
" <td>99.002354</td>\n",
|
| 361 |
-
" </tr>\n",
|
| 362 |
-
" <tr>\n",
|
| 363 |
-
" <th>esrb_rating</th>\n",
|
| 364 |
-
" <td>esrb_rating</td>\n",
|
| 365 |
-
" <td>88.224705</td>\n",
|
| 366 |
-
" </tr>\n",
|
| 367 |
-
" <tr>\n",
|
| 368 |
-
" <th>website</th>\n",
|
| 369 |
-
" <td>website</td>\n",
|
| 370 |
-
" <td>86.290331</td>\n",
|
| 371 |
-
" </tr>\n",
|
| 372 |
-
" <tr>\n",
|
| 373 |
-
" <th>publishers</th>\n",
|
| 374 |
-
" <td>publishers</td>\n",
|
| 375 |
-
" <td>70.275939</td>\n",
|
| 376 |
-
" </tr>\n",
|
| 377 |
-
" <tr>\n",
|
| 378 |
-
" <th>genres</th>\n",
|
| 379 |
-
" <td>genres</td>\n",
|
| 380 |
-
" <td>21.749853</td>\n",
|
| 381 |
-
" </tr>\n",
|
| 382 |
-
" </tbody>\n",
|
| 383 |
-
"</table>\n",
|
| 384 |
-
"</div>"
|
| 385 |
-
],
|
| 386 |
-
"text/plain": [
|
| 387 |
-
" column_name percent_missing\n",
|
| 388 |
-
"metacritic metacritic 99.002354\n",
|
| 389 |
-
"esrb_rating esrb_rating 88.224705\n",
|
| 390 |
-
"website website 86.290331\n",
|
| 391 |
-
"publishers publishers 70.275939\n",
|
| 392 |
-
"genres genres 21.749853"
|
| 393 |
-
]
|
| 394 |
-
},
|
| 395 |
-
"execution_count": 3,
|
| 396 |
-
"metadata": {},
|
| 397 |
-
"output_type": "execute_result"
|
| 398 |
-
}
|
| 399 |
-
],
|
| 400 |
"source": [
|
| 401 |
"percent_missing = game_df.isnull().sum() * 100 / len(game_df)\n",
|
| 402 |
"missing_value_df = pd.DataFrame({'column_name': game_df.columns,\n",
|
|
@@ -420,7 +351,7 @@
|
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"cell_type": "code",
|
| 423 |
-
"execution_count":
|
| 424 |
"metadata": {
|
| 425 |
"execution": {
|
| 426 |
"iopub.execute_input": "2023-06-03T13:53:31.662229Z",
|
|
@@ -437,7 +368,7 @@
|
|
| 437 |
"0"
|
| 438 |
]
|
| 439 |
},
|
| 440 |
-
"execution_count":
|
| 441 |
"metadata": {},
|
| 442 |
"output_type": "execute_result"
|
| 443 |
}
|
|
@@ -454,7 +385,7 @@
|
|
| 454 |
},
|
| 455 |
{
|
| 456 |
"cell_type": "code",
|
| 457 |
-
"execution_count":
|
| 458 |
"metadata": {
|
| 459 |
"execution": {
|
| 460 |
"iopub.execute_input": "2023-06-03T13:43:14.289756Z",
|
|
@@ -681,7 +612,7 @@
|
|
| 681 |
"[5 rows x 21 columns]"
|
| 682 |
]
|
| 683 |
},
|
| 684 |
-
"execution_count":
|
| 685 |
"metadata": {},
|
| 686 |
"output_type": "execute_result"
|
| 687 |
}
|
|
@@ -745,7 +676,7 @@
|
|
| 745 |
},
|
| 746 |
{
|
| 747 |
"cell_type": "code",
|
| 748 |
-
"execution_count":
|
| 749 |
"metadata": {
|
| 750 |
"execution": {
|
| 751 |
"iopub.execute_input": "2023-06-03T13:43:24.922281Z",
|
|
@@ -758,6 +689,7 @@
|
|
| 758 |
"outputs": [],
|
| 759 |
"source": [
|
| 760 |
"# fix ----- nan values cannot be converted to int, one can first convert to float then convert to int64\n",
|
|
|
|
| 761 |
"game_df['released'] = game_df['released'].apply(lambda x: str(x).split('-')[0]).astype('float').astype('Int64')"
|
| 762 |
]
|
| 763 |
},
|
|
|
|
| 317 |
},
|
| 318 |
{
|
| 319 |
"cell_type": "code",
|
| 320 |
+
"execution_count": null,
|
| 321 |
"metadata": {
|
| 322 |
"execution": {
|
| 323 |
"iopub.execute_input": "2023-06-03T13:42:42.716831Z",
|
|
|
|
| 327 |
"shell.execute_reply.started": "2023-06-03T13:42:42.716765Z"
|
| 328 |
}
|
| 329 |
},
|
| 330 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
"source": [
|
| 332 |
"percent_missing = game_df.isnull().sum() * 100 / len(game_df)\n",
|
| 333 |
"missing_value_df = pd.DataFrame({'column_name': game_df.columns,\n",
|
|
|
|
| 351 |
},
|
| 352 |
{
|
| 353 |
"cell_type": "code",
|
| 354 |
+
"execution_count": 3,
|
| 355 |
"metadata": {
|
| 356 |
"execution": {
|
| 357 |
"iopub.execute_input": "2023-06-03T13:53:31.662229Z",
|
|
|
|
| 368 |
"0"
|
| 369 |
]
|
| 370 |
},
|
| 371 |
+
"execution_count": 3,
|
| 372 |
"metadata": {},
|
| 373 |
"output_type": "execute_result"
|
| 374 |
}
|
|
|
|
| 385 |
},
|
| 386 |
{
|
| 387 |
"cell_type": "code",
|
| 388 |
+
"execution_count": 4,
|
| 389 |
"metadata": {
|
| 390 |
"execution": {
|
| 391 |
"iopub.execute_input": "2023-06-03T13:43:14.289756Z",
|
|
|
|
| 612 |
"[5 rows x 21 columns]"
|
| 613 |
]
|
| 614 |
},
|
| 615 |
+
"execution_count": 4,
|
| 616 |
"metadata": {},
|
| 617 |
"output_type": "execute_result"
|
| 618 |
}
|
|
|
|
| 676 |
},
|
| 677 |
{
|
| 678 |
"cell_type": "code",
|
| 679 |
+
"execution_count": 5,
|
| 680 |
"metadata": {
|
| 681 |
"execution": {
|
| 682 |
"iopub.execute_input": "2023-06-03T13:43:24.922281Z",
|
|
|
|
| 689 |
"outputs": [],
|
| 690 |
"source": [
|
| 691 |
"# fix ----- nan values cannot be converted to int, one can first convert to float then convert to int64\n",
|
| 692 |
+
"# game_df['released'] = game_df['released'].apply(lambda x: str(x).split('-')[0]).astype('int')\n",
|
| 693 |
"game_df['released'] = game_df['released'].apply(lambda x: str(x).split('-')[0]).astype('float').astype('Int64')"
|
| 694 |
]
|
| 695 |
},
|
benchmark/pandas_7/pandas_7_reproduced.ipynb
CHANGED
|
@@ -317,7 +317,7 @@
|
|
| 317 |
},
|
| 318 |
{
|
| 319 |
"cell_type": "code",
|
| 320 |
-
"execution_count":
|
| 321 |
"metadata": {
|
| 322 |
"execution": {
|
| 323 |
"iopub.execute_input": "2023-06-03T13:42:42.716831Z",
|
|
@@ -327,76 +327,7 @@
|
|
| 327 |
"shell.execute_reply.started": "2023-06-03T13:42:42.716765Z"
|
| 328 |
}
|
| 329 |
},
|
| 330 |
-
"outputs": [
|
| 331 |
-
{
|
| 332 |
-
"data": {
|
| 333 |
-
"text/html": [
|
| 334 |
-
"<div>\n",
|
| 335 |
-
"<style scoped>\n",
|
| 336 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 337 |
-
" vertical-align: middle;\n",
|
| 338 |
-
" }\n",
|
| 339 |
-
"\n",
|
| 340 |
-
" .dataframe tbody tr th {\n",
|
| 341 |
-
" vertical-align: top;\n",
|
| 342 |
-
" }\n",
|
| 343 |
-
"\n",
|
| 344 |
-
" .dataframe thead th {\n",
|
| 345 |
-
" text-align: right;\n",
|
| 346 |
-
" }\n",
|
| 347 |
-
"</style>\n",
|
| 348 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 349 |
-
" <thead>\n",
|
| 350 |
-
" <tr style=\"text-align: right;\">\n",
|
| 351 |
-
" <th></th>\n",
|
| 352 |
-
" <th>column_name</th>\n",
|
| 353 |
-
" <th>percent_missing</th>\n",
|
| 354 |
-
" </tr>\n",
|
| 355 |
-
" </thead>\n",
|
| 356 |
-
" <tbody>\n",
|
| 357 |
-
" <tr>\n",
|
| 358 |
-
" <th>metacritic</th>\n",
|
| 359 |
-
" <td>metacritic</td>\n",
|
| 360 |
-
" <td>99.002354</td>\n",
|
| 361 |
-
" </tr>\n",
|
| 362 |
-
" <tr>\n",
|
| 363 |
-
" <th>esrb_rating</th>\n",
|
| 364 |
-
" <td>esrb_rating</td>\n",
|
| 365 |
-
" <td>88.224705</td>\n",
|
| 366 |
-
" </tr>\n",
|
| 367 |
-
" <tr>\n",
|
| 368 |
-
" <th>website</th>\n",
|
| 369 |
-
" <td>website</td>\n",
|
| 370 |
-
" <td>86.290331</td>\n",
|
| 371 |
-
" </tr>\n",
|
| 372 |
-
" <tr>\n",
|
| 373 |
-
" <th>publishers</th>\n",
|
| 374 |
-
" <td>publishers</td>\n",
|
| 375 |
-
" <td>70.275939</td>\n",
|
| 376 |
-
" </tr>\n",
|
| 377 |
-
" <tr>\n",
|
| 378 |
-
" <th>genres</th>\n",
|
| 379 |
-
" <td>genres</td>\n",
|
| 380 |
-
" <td>21.749853</td>\n",
|
| 381 |
-
" </tr>\n",
|
| 382 |
-
" </tbody>\n",
|
| 383 |
-
"</table>\n",
|
| 384 |
-
"</div>"
|
| 385 |
-
],
|
| 386 |
-
"text/plain": [
|
| 387 |
-
" column_name percent_missing\n",
|
| 388 |
-
"metacritic metacritic 99.002354\n",
|
| 389 |
-
"esrb_rating esrb_rating 88.224705\n",
|
| 390 |
-
"website website 86.290331\n",
|
| 391 |
-
"publishers publishers 70.275939\n",
|
| 392 |
-
"genres genres 21.749853"
|
| 393 |
-
]
|
| 394 |
-
},
|
| 395 |
-
"execution_count": 3,
|
| 396 |
-
"metadata": {},
|
| 397 |
-
"output_type": "execute_result"
|
| 398 |
-
}
|
| 399 |
-
],
|
| 400 |
"source": [
|
| 401 |
"percent_missing = game_df.isnull().sum() * 100 / len(game_df)\n",
|
| 402 |
"missing_value_df = pd.DataFrame({'column_name': game_df.columns,\n",
|
|
@@ -420,7 +351,7 @@
|
|
| 420 |
},
|
| 421 |
{
|
| 422 |
"cell_type": "code",
|
| 423 |
-
"execution_count":
|
| 424 |
"metadata": {
|
| 425 |
"execution": {
|
| 426 |
"iopub.execute_input": "2023-06-03T13:53:31.662229Z",
|
|
@@ -437,7 +368,7 @@
|
|
| 437 |
"0"
|
| 438 |
]
|
| 439 |
},
|
| 440 |
-
"execution_count":
|
| 441 |
"metadata": {},
|
| 442 |
"output_type": "execute_result"
|
| 443 |
}
|
|
@@ -454,7 +385,7 @@
|
|
| 454 |
},
|
| 455 |
{
|
| 456 |
"cell_type": "code",
|
| 457 |
-
"execution_count":
|
| 458 |
"metadata": {
|
| 459 |
"execution": {
|
| 460 |
"iopub.execute_input": "2023-06-03T13:43:14.289756Z",
|
|
@@ -681,7 +612,7 @@
|
|
| 681 |
"[5 rows x 21 columns]"
|
| 682 |
]
|
| 683 |
},
|
| 684 |
-
"execution_count":
|
| 685 |
"metadata": {},
|
| 686 |
"output_type": "execute_result"
|
| 687 |
}
|
|
@@ -745,7 +676,7 @@
|
|
| 745 |
},
|
| 746 |
{
|
| 747 |
"cell_type": "code",
|
| 748 |
-
"execution_count":
|
| 749 |
"metadata": {
|
| 750 |
"execution": {
|
| 751 |
"iopub.execute_input": "2023-06-03T13:43:24.922281Z",
|
|
@@ -763,7 +694,7 @@
|
|
| 763 |
"traceback": [
|
| 764 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 765 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 766 |
-
"\u001b[0;32m<ipython-input-
|
| 767 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 6532\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6533\u001b[0m \u001b[0;31m# else, only a single dtype is given\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 6534\u001b[0;31m \u001b[0mnew_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6535\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_constructor_from_mgr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6536\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 768 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 412\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 414\u001b[0;31m return self.apply(\n\u001b[0m\u001b[1;32m 415\u001b[0m \u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 769 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, f, align_keys, **kwargs)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 354\u001b[0;31m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 355\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mextend_blocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_blocks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
|
|
| 317 |
},
|
| 318 |
{
|
| 319 |
"cell_type": "code",
|
| 320 |
+
"execution_count": null,
|
| 321 |
"metadata": {
|
| 322 |
"execution": {
|
| 323 |
"iopub.execute_input": "2023-06-03T13:42:42.716831Z",
|
|
|
|
| 327 |
"shell.execute_reply.started": "2023-06-03T13:42:42.716765Z"
|
| 328 |
}
|
| 329 |
},
|
| 330 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
"source": [
|
| 332 |
"percent_missing = game_df.isnull().sum() * 100 / len(game_df)\n",
|
| 333 |
"missing_value_df = pd.DataFrame({'column_name': game_df.columns,\n",
|
|
|
|
| 351 |
},
|
| 352 |
{
|
| 353 |
"cell_type": "code",
|
| 354 |
+
"execution_count": 3,
|
| 355 |
"metadata": {
|
| 356 |
"execution": {
|
| 357 |
"iopub.execute_input": "2023-06-03T13:53:31.662229Z",
|
|
|
|
| 368 |
"0"
|
| 369 |
]
|
| 370 |
},
|
| 371 |
+
"execution_count": 3,
|
| 372 |
"metadata": {},
|
| 373 |
"output_type": "execute_result"
|
| 374 |
}
|
|
|
|
| 385 |
},
|
| 386 |
{
|
| 387 |
"cell_type": "code",
|
| 388 |
+
"execution_count": 4,
|
| 389 |
"metadata": {
|
| 390 |
"execution": {
|
| 391 |
"iopub.execute_input": "2023-06-03T13:43:14.289756Z",
|
|
|
|
| 612 |
"[5 rows x 21 columns]"
|
| 613 |
]
|
| 614 |
},
|
| 615 |
+
"execution_count": 4,
|
| 616 |
"metadata": {},
|
| 617 |
"output_type": "execute_result"
|
| 618 |
}
|
|
|
|
| 676 |
},
|
| 677 |
{
|
| 678 |
"cell_type": "code",
|
| 679 |
+
"execution_count": 5,
|
| 680 |
"metadata": {
|
| 681 |
"execution": {
|
| 682 |
"iopub.execute_input": "2023-06-03T13:43:24.922281Z",
|
|
|
|
| 694 |
"traceback": [
|
| 695 |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 696 |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
| 697 |
+
"\u001b[0;32m<ipython-input-5-4958b6271f98>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mgame_df\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'released'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgame_df\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'released'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mlambda\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msplit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'-'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'int'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
| 698 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 6532\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6533\u001b[0m \u001b[0;31m# else, only a single dtype is given\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 6534\u001b[0;31m \u001b[0mnew_data\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcopy\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merrors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0merrors\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6535\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_constructor_from_mgr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxes\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnew_data\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6536\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__finalize__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 699 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype, copy, errors)\u001b[0m\n\u001b[1;32m 412\u001b[0m \u001b[0mcopy\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 414\u001b[0;31m return self.apply(\n\u001b[0m\u001b[1;32m 415\u001b[0m \u001b[0;34m\"astype\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 416\u001b[0m \u001b[0mdtype\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 700 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/internals/managers.py\u001b[0m in \u001b[0;36mapply\u001b[0;34m(self, f, align_keys, **kwargs)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 353\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 354\u001b[0;31m \u001b[0mapplied\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 355\u001b[0m \u001b[0mresult_blocks\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mextend_blocks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mapplied\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_blocks\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
benchmark/pandas_8/pandas_8_fixed.ipynb
CHANGED
|
@@ -39,7 +39,7 @@
|
|
| 39 |
},
|
| 40 |
{
|
| 41 |
"cell_type": "code",
|
| 42 |
-
"execution_count":
|
| 43 |
"metadata": {
|
| 44 |
"execution": {
|
| 45 |
"iopub.execute_input": "2023-03-09T09:44:46.807959Z",
|
|
@@ -49,175 +49,14 @@
|
|
| 49 |
"shell.execute_reply.started": "2023-03-09T09:44:46.807913Z"
|
| 50 |
}
|
| 51 |
},
|
| 52 |
-
"outputs": [
|
| 53 |
-
{
|
| 54 |
-
"data": {
|
| 55 |
-
"text/html": [
|
| 56 |
-
"<div>\n",
|
| 57 |
-
"<style scoped>\n",
|
| 58 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 59 |
-
" vertical-align: middle;\n",
|
| 60 |
-
" }\n",
|
| 61 |
-
"\n",
|
| 62 |
-
" .dataframe tbody tr th {\n",
|
| 63 |
-
" vertical-align: top;\n",
|
| 64 |
-
" }\n",
|
| 65 |
-
"\n",
|
| 66 |
-
" .dataframe thead th {\n",
|
| 67 |
-
" text-align: right;\n",
|
| 68 |
-
" }\n",
|
| 69 |
-
"</style>\n",
|
| 70 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 71 |
-
" <thead>\n",
|
| 72 |
-
" <tr style=\"text-align: right;\">\n",
|
| 73 |
-
" <th></th>\n",
|
| 74 |
-
" <th>Make</th>\n",
|
| 75 |
-
" <th>Model</th>\n",
|
| 76 |
-
" <th>Type</th>\n",
|
| 77 |
-
" <th>Origin</th>\n",
|
| 78 |
-
" <th>DriveTrain</th>\n",
|
| 79 |
-
" <th>MSRP</th>\n",
|
| 80 |
-
" <th>Invoice</th>\n",
|
| 81 |
-
" <th>EngineSize</th>\n",
|
| 82 |
-
" <th>Cylinders</th>\n",
|
| 83 |
-
" <th>Horsepower</th>\n",
|
| 84 |
-
" <th>MPG_City</th>\n",
|
| 85 |
-
" <th>MPG_Highway</th>\n",
|
| 86 |
-
" <th>Weight</th>\n",
|
| 87 |
-
" <th>Wheelbase</th>\n",
|
| 88 |
-
" <th>Length</th>\n",
|
| 89 |
-
" </tr>\n",
|
| 90 |
-
" </thead>\n",
|
| 91 |
-
" <tbody>\n",
|
| 92 |
-
" <tr>\n",
|
| 93 |
-
" <th>0</th>\n",
|
| 94 |
-
" <td>Acura</td>\n",
|
| 95 |
-
" <td>MDX</td>\n",
|
| 96 |
-
" <td>SUV</td>\n",
|
| 97 |
-
" <td>Asia</td>\n",
|
| 98 |
-
" <td>All</td>\n",
|
| 99 |
-
" <td>$36,945</td>\n",
|
| 100 |
-
" <td>$33,337</td>\n",
|
| 101 |
-
" <td>3.5</td>\n",
|
| 102 |
-
" <td>6.0</td>\n",
|
| 103 |
-
" <td>265.0</td>\n",
|
| 104 |
-
" <td>17.0</td>\n",
|
| 105 |
-
" <td>23.0</td>\n",
|
| 106 |
-
" <td>4451.0</td>\n",
|
| 107 |
-
" <td>106.0</td>\n",
|
| 108 |
-
" <td>189.0</td>\n",
|
| 109 |
-
" </tr>\n",
|
| 110 |
-
" <tr>\n",
|
| 111 |
-
" <th>1</th>\n",
|
| 112 |
-
" <td>Acura</td>\n",
|
| 113 |
-
" <td>RSX Type S 2dr</td>\n",
|
| 114 |
-
" <td>Sedan</td>\n",
|
| 115 |
-
" <td>Asia</td>\n",
|
| 116 |
-
" <td>Front</td>\n",
|
| 117 |
-
" <td>$23,820</td>\n",
|
| 118 |
-
" <td>$21,761</td>\n",
|
| 119 |
-
" <td>2.0</td>\n",
|
| 120 |
-
" <td>4.0</td>\n",
|
| 121 |
-
" <td>200.0</td>\n",
|
| 122 |
-
" <td>24.0</td>\n",
|
| 123 |
-
" <td>31.0</td>\n",
|
| 124 |
-
" <td>2778.0</td>\n",
|
| 125 |
-
" <td>101.0</td>\n",
|
| 126 |
-
" <td>172.0</td>\n",
|
| 127 |
-
" </tr>\n",
|
| 128 |
-
" <tr>\n",
|
| 129 |
-
" <th>2</th>\n",
|
| 130 |
-
" <td>Acura</td>\n",
|
| 131 |
-
" <td>TSX 4dr</td>\n",
|
| 132 |
-
" <td>Sedan</td>\n",
|
| 133 |
-
" <td>Asia</td>\n",
|
| 134 |
-
" <td>Front</td>\n",
|
| 135 |
-
" <td>$26,990</td>\n",
|
| 136 |
-
" <td>$24,647</td>\n",
|
| 137 |
-
" <td>2.4</td>\n",
|
| 138 |
-
" <td>4.0</td>\n",
|
| 139 |
-
" <td>200.0</td>\n",
|
| 140 |
-
" <td>22.0</td>\n",
|
| 141 |
-
" <td>29.0</td>\n",
|
| 142 |
-
" <td>3230.0</td>\n",
|
| 143 |
-
" <td>105.0</td>\n",
|
| 144 |
-
" <td>183.0</td>\n",
|
| 145 |
-
" </tr>\n",
|
| 146 |
-
" <tr>\n",
|
| 147 |
-
" <th>3</th>\n",
|
| 148 |
-
" <td>Acura</td>\n",
|
| 149 |
-
" <td>TL 4dr</td>\n",
|
| 150 |
-
" <td>Sedan</td>\n",
|
| 151 |
-
" <td>Asia</td>\n",
|
| 152 |
-
" <td>Front</td>\n",
|
| 153 |
-
" <td>$33,195</td>\n",
|
| 154 |
-
" <td>$30,299</td>\n",
|
| 155 |
-
" <td>3.2</td>\n",
|
| 156 |
-
" <td>6.0</td>\n",
|
| 157 |
-
" <td>270.0</td>\n",
|
| 158 |
-
" <td>20.0</td>\n",
|
| 159 |
-
" <td>28.0</td>\n",
|
| 160 |
-
" <td>3575.0</td>\n",
|
| 161 |
-
" <td>108.0</td>\n",
|
| 162 |
-
" <td>186.0</td>\n",
|
| 163 |
-
" </tr>\n",
|
| 164 |
-
" <tr>\n",
|
| 165 |
-
" <th>4</th>\n",
|
| 166 |
-
" <td>Acura</td>\n",
|
| 167 |
-
" <td>3.5 RL 4dr</td>\n",
|
| 168 |
-
" <td>Sedan</td>\n",
|
| 169 |
-
" <td>Asia</td>\n",
|
| 170 |
-
" <td>Front</td>\n",
|
| 171 |
-
" <td>$43,755</td>\n",
|
| 172 |
-
" <td>$39,014</td>\n",
|
| 173 |
-
" <td>3.5</td>\n",
|
| 174 |
-
" <td>6.0</td>\n",
|
| 175 |
-
" <td>225.0</td>\n",
|
| 176 |
-
" <td>18.0</td>\n",
|
| 177 |
-
" <td>24.0</td>\n",
|
| 178 |
-
" <td>3880.0</td>\n",
|
| 179 |
-
" <td>115.0</td>\n",
|
| 180 |
-
" <td>197.0</td>\n",
|
| 181 |
-
" </tr>\n",
|
| 182 |
-
" </tbody>\n",
|
| 183 |
-
"</table>\n",
|
| 184 |
-
"</div>"
|
| 185 |
-
],
|
| 186 |
-
"text/plain": [
|
| 187 |
-
" Make Model Type Origin DriveTrain MSRP Invoice \\\n",
|
| 188 |
-
"0 Acura MDX SUV Asia All $36,945 $33,337 \n",
|
| 189 |
-
"1 Acura RSX Type S 2dr Sedan Asia Front $23,820 $21,761 \n",
|
| 190 |
-
"2 Acura TSX 4dr Sedan Asia Front $26,990 $24,647 \n",
|
| 191 |
-
"3 Acura TL 4dr Sedan Asia Front $33,195 $30,299 \n",
|
| 192 |
-
"4 Acura 3.5 RL 4dr Sedan Asia Front $43,755 $39,014 \n",
|
| 193 |
-
"\n",
|
| 194 |
-
" EngineSize Cylinders Horsepower MPG_City MPG_Highway Weight \\\n",
|
| 195 |
-
"0 3.5 6.0 265.0 17.0 23.0 4451.0 \n",
|
| 196 |
-
"1 2.0 4.0 200.0 24.0 31.0 2778.0 \n",
|
| 197 |
-
"2 2.4 4.0 200.0 22.0 29.0 3230.0 \n",
|
| 198 |
-
"3 3.2 6.0 270.0 20.0 28.0 3575.0 \n",
|
| 199 |
-
"4 3.5 6.0 225.0 18.0 24.0 3880.0 \n",
|
| 200 |
-
"\n",
|
| 201 |
-
" Wheelbase Length \n",
|
| 202 |
-
"0 106.0 189.0 \n",
|
| 203 |
-
"1 101.0 172.0 \n",
|
| 204 |
-
"2 105.0 183.0 \n",
|
| 205 |
-
"3 108.0 186.0 \n",
|
| 206 |
-
"4 115.0 197.0 "
|
| 207 |
-
]
|
| 208 |
-
},
|
| 209 |
-
"execution_count": 3,
|
| 210 |
-
"metadata": {},
|
| 211 |
-
"output_type": "execute_result"
|
| 212 |
-
}
|
| 213 |
-
],
|
| 214 |
"source": [
|
| 215 |
"df.head()"
|
| 216 |
]
|
| 217 |
},
|
| 218 |
{
|
| 219 |
"cell_type": "code",
|
| 220 |
-
"execution_count":
|
| 221 |
"metadata": {
|
| 222 |
"execution": {
|
| 223 |
"iopub.execute_input": "2023-03-09T09:44:46.836990Z",
|
|
@@ -227,21 +66,7 @@
|
|
| 227 |
"shell.execute_reply.started": "2023-03-09T09:44:46.836928Z"
|
| 228 |
}
|
| 229 |
},
|
| 230 |
-
"outputs": [
|
| 231 |
-
{
|
| 232 |
-
"data": {
|
| 233 |
-
"text/plain": [
|
| 234 |
-
"Index(['Make', 'Model', 'Type', 'Origin', 'DriveTrain', 'MSRP', 'Invoice',\n",
|
| 235 |
-
" 'EngineSize', 'Cylinders', 'Horsepower', 'MPG_City', 'MPG_Highway',\n",
|
| 236 |
-
" 'Weight', 'Wheelbase', 'Length'],\n",
|
| 237 |
-
" dtype='object')"
|
| 238 |
-
]
|
| 239 |
-
},
|
| 240 |
-
"execution_count": 4,
|
| 241 |
-
"metadata": {},
|
| 242 |
-
"output_type": "execute_result"
|
| 243 |
-
}
|
| 244 |
-
],
|
| 245 |
"source": [
|
| 246 |
"df.columns"
|
| 247 |
]
|
|
@@ -257,7 +82,7 @@
|
|
| 257 |
},
|
| 258 |
{
|
| 259 |
"cell_type": "code",
|
| 260 |
-
"execution_count":
|
| 261 |
"metadata": {
|
| 262 |
"execution": {
|
| 263 |
"iopub.execute_input": "2023-03-09T09:44:46.852024Z",
|
|
@@ -267,36 +92,7 @@
|
|
| 267 |
"shell.execute_reply.started": "2023-03-09T09:44:46.851967Z"
|
| 268 |
}
|
| 269 |
},
|
| 270 |
-
"outputs": [
|
| 271 |
-
{
|
| 272 |
-
"name": "stdout",
|
| 273 |
-
"output_type": "stream",
|
| 274 |
-
"text": [
|
| 275 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 276 |
-
"RangeIndex: 432 entries, 0 to 431\n",
|
| 277 |
-
"Data columns (total 15 columns):\n",
|
| 278 |
-
" # Column Non-Null Count Dtype \n",
|
| 279 |
-
"--- ------ -------------- ----- \n",
|
| 280 |
-
" 0 Make 428 non-null object \n",
|
| 281 |
-
" 1 Model 428 non-null object \n",
|
| 282 |
-
" 2 Type 428 non-null object \n",
|
| 283 |
-
" 3 Origin 428 non-null object \n",
|
| 284 |
-
" 4 DriveTrain 428 non-null object \n",
|
| 285 |
-
" 5 MSRP 428 non-null object \n",
|
| 286 |
-
" 6 Invoice 428 non-null object \n",
|
| 287 |
-
" 7 EngineSize 428 non-null float64\n",
|
| 288 |
-
" 8 Cylinders 426 non-null float64\n",
|
| 289 |
-
" 9 Horsepower 428 non-null float64\n",
|
| 290 |
-
" 10 MPG_City 428 non-null float64\n",
|
| 291 |
-
" 11 MPG_Highway 428 non-null float64\n",
|
| 292 |
-
" 12 Weight 428 non-null float64\n",
|
| 293 |
-
" 13 Wheelbase 428 non-null float64\n",
|
| 294 |
-
" 14 Length 428 non-null float64\n",
|
| 295 |
-
"dtypes: float64(8), object(7)\n",
|
| 296 |
-
"memory usage: 50.8+ KB\n"
|
| 297 |
-
]
|
| 298 |
-
}
|
| 299 |
-
],
|
| 300 |
"source": [
|
| 301 |
"df.info() #memory usage: 50.8+ KB before converting datatypes"
|
| 302 |
]
|
|
@@ -310,7 +106,7 @@
|
|
| 310 |
},
|
| 311 |
{
|
| 312 |
"cell_type": "code",
|
| 313 |
-
"execution_count":
|
| 314 |
"metadata": {
|
| 315 |
"execution": {
|
| 316 |
"iopub.execute_input": "2023-03-09T09:44:46.878059Z",
|
|
@@ -320,25 +116,14 @@
|
|
| 320 |
"shell.execute_reply.started": "2023-03-09T09:44:46.878007Z"
|
| 321 |
}
|
| 322 |
},
|
| 323 |
-
"outputs": [
|
| 324 |
-
{
|
| 325 |
-
"data": {
|
| 326 |
-
"text/plain": [
|
| 327 |
-
"array(['All', 'Front', 'Rear', nan], dtype=object)"
|
| 328 |
-
]
|
| 329 |
-
},
|
| 330 |
-
"execution_count": 6,
|
| 331 |
-
"metadata": {},
|
| 332 |
-
"output_type": "execute_result"
|
| 333 |
-
}
|
| 334 |
-
],
|
| 335 |
"source": [
|
| 336 |
"df[\"DriveTrain\"].unique()"
|
| 337 |
]
|
| 338 |
},
|
| 339 |
{
|
| 340 |
"cell_type": "code",
|
| 341 |
-
"execution_count":
|
| 342 |
"metadata": {
|
| 343 |
"execution": {
|
| 344 |
"iopub.execute_input": "2023-03-09T09:44:46.892292Z",
|
|
@@ -355,7 +140,7 @@
|
|
| 355 |
},
|
| 356 |
{
|
| 357 |
"cell_type": "code",
|
| 358 |
-
"execution_count":
|
| 359 |
"metadata": {
|
| 360 |
"execution": {
|
| 361 |
"iopub.execute_input": "2023-03-09T09:44:46.908213Z",
|
|
@@ -365,43 +150,14 @@
|
|
| 365 |
"shell.execute_reply.started": "2023-03-09T09:44:46.908179Z"
|
| 366 |
}
|
| 367 |
},
|
| 368 |
-
"outputs": [
|
| 369 |
-
{
|
| 370 |
-
"name": "stdout",
|
| 371 |
-
"output_type": "stream",
|
| 372 |
-
"text": [
|
| 373 |
-
"<class 'pandas.core.frame.DataFrame'>\n",
|
| 374 |
-
"RangeIndex: 432 entries, 0 to 431\n",
|
| 375 |
-
"Data columns (total 15 columns):\n",
|
| 376 |
-
" # Column Non-Null Count Dtype \n",
|
| 377 |
-
"--- ------ -------------- ----- \n",
|
| 378 |
-
" 0 Make 428 non-null object \n",
|
| 379 |
-
" 1 Model 428 non-null object \n",
|
| 380 |
-
" 2 Type 428 non-null object \n",
|
| 381 |
-
" 3 Origin 428 non-null object \n",
|
| 382 |
-
" 4 DriveTrain 428 non-null category\n",
|
| 383 |
-
" 5 MSRP 428 non-null object \n",
|
| 384 |
-
" 6 Invoice 428 non-null object \n",
|
| 385 |
-
" 7 EngineSize 428 non-null float64 \n",
|
| 386 |
-
" 8 Cylinders 426 non-null float64 \n",
|
| 387 |
-
" 9 Horsepower 428 non-null float64 \n",
|
| 388 |
-
" 10 MPG_City 428 non-null float64 \n",
|
| 389 |
-
" 11 MPG_Highway 428 non-null float64 \n",
|
| 390 |
-
" 12 Weight 428 non-null float64 \n",
|
| 391 |
-
" 13 Wheelbase 428 non-null float64 \n",
|
| 392 |
-
" 14 Length 428 non-null float64 \n",
|
| 393 |
-
"dtypes: category(1), float64(8), object(6)\n",
|
| 394 |
-
"memory usage: 47.9+ KB\n"
|
| 395 |
-
]
|
| 396 |
-
}
|
| 397 |
-
],
|
| 398 |
"source": [
|
| 399 |
"df.info()"
|
| 400 |
]
|
| 401 |
},
|
| 402 |
{
|
| 403 |
"cell_type": "code",
|
| 404 |
-
"execution_count":
|
| 405 |
"metadata": {
|
| 406 |
"execution": {
|
| 407 |
"iopub.execute_input": "2023-03-09T09:44:46.943561Z",
|
|
@@ -568,15 +324,14 @@
|
|
| 568 |
"4 115.0 197.0 "
|
| 569 |
]
|
| 570 |
},
|
| 571 |
-
"execution_count":
|
| 572 |
"metadata": {},
|
| 573 |
"output_type": "execute_result"
|
| 574 |
}
|
| 575 |
],
|
| 576 |
"source": [
|
| 577 |
-
"# df[\"MSRP\"]=pd.to_numeric(df[\"MSRP\"]) \n",
|
| 578 |
-
"\n",
|
| 579 |
"# fix --- preprocess needed: \"$36,945 \"=>36945\n",
|
|
|
|
| 580 |
"df[\"MSRP\"] = df[\"MSRP\"].str.replace(r\"[\\$,]\", \"\", regex=True).astype(float).astype(\"Int64\")\n",
|
| 581 |
"df.head()"
|
| 582 |
]
|
|
|
|
| 39 |
},
|
| 40 |
{
|
| 41 |
"cell_type": "code",
|
| 42 |
+
"execution_count": null,
|
| 43 |
"metadata": {
|
| 44 |
"execution": {
|
| 45 |
"iopub.execute_input": "2023-03-09T09:44:46.807959Z",
|
|
|
|
| 49 |
"shell.execute_reply.started": "2023-03-09T09:44:46.807913Z"
|
| 50 |
}
|
| 51 |
},
|
| 52 |
+
"outputs": [],
|
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| 58 |
"cell_type": "code",
|
| 59 |
+
"execution_count": null,
|
| 60 |
"metadata": {
|
| 61 |
"execution": {
|
| 62 |
"iopub.execute_input": "2023-03-09T09:44:46.836990Z",
|
|
|
|
| 66 |
"shell.execute_reply.started": "2023-03-09T09:44:46.836928Z"
|
| 67 |
}
|
| 68 |
},
|
| 69 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
"source": [
|
| 71 |
"df.columns"
|
| 72 |
]
|
|
|
|
| 82 |
},
|
| 83 |
{
|
| 84 |
"cell_type": "code",
|
| 85 |
+
"execution_count": null,
|
| 86 |
"metadata": {
|
| 87 |
"execution": {
|
| 88 |
"iopub.execute_input": "2023-03-09T09:44:46.852024Z",
|
|
|
|
| 92 |
"shell.execute_reply.started": "2023-03-09T09:44:46.851967Z"
|
| 93 |
}
|
| 94 |
},
|
| 95 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
"source": [
|
| 97 |
"df.info() #memory usage: 50.8+ KB before converting datatypes"
|
| 98 |
]
|
|
|
|
| 106 |
},
|
| 107 |
{
|
| 108 |
"cell_type": "code",
|
| 109 |
+
"execution_count": null,
|
| 110 |
"metadata": {
|
| 111 |
"execution": {
|
| 112 |
"iopub.execute_input": "2023-03-09T09:44:46.878059Z",
|
|
|
|
| 116 |
"shell.execute_reply.started": "2023-03-09T09:44:46.878007Z"
|
| 117 |
}
|
| 118 |
},
|
| 119 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
"source": [
|
| 121 |
"df[\"DriveTrain\"].unique()"
|
| 122 |
]
|
| 123 |
},
|
| 124 |
{
|
| 125 |
"cell_type": "code",
|
| 126 |
+
"execution_count": 3,
|
| 127 |
"metadata": {
|
| 128 |
"execution": {
|
| 129 |
"iopub.execute_input": "2023-03-09T09:44:46.892292Z",
|
|
|
|
| 140 |
},
|
| 141 |
{
|
| 142 |
"cell_type": "code",
|
| 143 |
+
"execution_count": null,
|
| 144 |
"metadata": {
|
| 145 |
"execution": {
|
| 146 |
"iopub.execute_input": "2023-03-09T09:44:46.908213Z",
|
|
|
|
| 150 |
"shell.execute_reply.started": "2023-03-09T09:44:46.908179Z"
|
| 151 |
}
|
| 152 |
},
|
| 153 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
"source": [
|
| 155 |
"df.info()"
|
| 156 |
]
|
| 157 |
},
|
| 158 |
{
|
| 159 |
"cell_type": "code",
|
| 160 |
+
"execution_count": 4,
|
| 161 |
"metadata": {
|
| 162 |
"execution": {
|
| 163 |
"iopub.execute_input": "2023-03-09T09:44:46.943561Z",
|
|
|
|
| 324 |
"4 115.0 197.0 "
|
| 325 |
]
|
| 326 |
},
|
| 327 |
+
"execution_count": 4,
|
| 328 |
"metadata": {},
|
| 329 |
"output_type": "execute_result"
|
| 330 |
}
|
| 331 |
],
|
| 332 |
"source": [
|
|
|
|
|
|
|
| 333 |
"# fix --- preprocess needed: \"$36,945 \"=>36945\n",
|
| 334 |
+
"# df[\"MSRP\"]=pd.to_numeric(df[\"MSRP\"]) \n",
|
| 335 |
"df[\"MSRP\"] = df[\"MSRP\"].str.replace(r\"[\\$,]\", \"\", regex=True).astype(float).astype(\"Int64\")\n",
|
| 336 |
"df.head()"
|
| 337 |
]
|
benchmark/pandas_8/pandas_8_reproduced.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
benchmark/pandas_9/pandas_9_fixed.ipynb
CHANGED
|
@@ -62,7 +62,7 @@
|
|
| 62 |
},
|
| 63 |
{
|
| 64 |
"cell_type": "code",
|
| 65 |
-
"execution_count":
|
| 66 |
"metadata": {
|
| 67 |
"execution": {
|
| 68 |
"iopub.execute_input": "2023-12-03T16:02:04.302761Z",
|
|
@@ -72,25 +72,14 @@
|
|
| 72 |
"shell.execute_reply.started": "2023-12-03T16:02:04.302721Z"
|
| 73 |
}
|
| 74 |
},
|
| 75 |
-
"outputs": [
|
| 76 |
-
{
|
| 77 |
-
"data": {
|
| 78 |
-
"text/plain": [
|
| 79 |
-
"(5562, 10)"
|
| 80 |
-
]
|
| 81 |
-
},
|
| 82 |
-
"execution_count": 3,
|
| 83 |
-
"metadata": {},
|
| 84 |
-
"output_type": "execute_result"
|
| 85 |
-
}
|
| 86 |
-
],
|
| 87 |
"source": [
|
| 88 |
"df.shape"
|
| 89 |
]
|
| 90 |
},
|
| 91 |
{
|
| 92 |
"cell_type": "code",
|
| 93 |
-
"execution_count":
|
| 94 |
"metadata": {
|
| 95 |
"execution": {
|
| 96 |
"iopub.execute_input": "2023-12-03T16:02:04.321548Z",
|
|
@@ -100,257 +89,14 @@
|
|
| 100 |
"shell.execute_reply.started": "2023-12-03T16:02:04.321518Z"
|
| 101 |
}
|
| 102 |
},
|
| 103 |
-
"outputs": [
|
| 104 |
-
{
|
| 105 |
-
"data": {
|
| 106 |
-
"text/html": [
|
| 107 |
-
"<div>\n",
|
| 108 |
-
"<style scoped>\n",
|
| 109 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 110 |
-
" vertical-align: middle;\n",
|
| 111 |
-
" }\n",
|
| 112 |
-
"\n",
|
| 113 |
-
" .dataframe tbody tr th {\n",
|
| 114 |
-
" vertical-align: top;\n",
|
| 115 |
-
" }\n",
|
| 116 |
-
"\n",
|
| 117 |
-
" .dataframe thead th {\n",
|
| 118 |
-
" text-align: right;\n",
|
| 119 |
-
" }\n",
|
| 120 |
-
"</style>\n",
|
| 121 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 122 |
-
" <thead>\n",
|
| 123 |
-
" <tr style=\"text-align: right;\">\n",
|
| 124 |
-
" <th></th>\n",
|
| 125 |
-
" <th>Movie_Title</th>\n",
|
| 126 |
-
" <th>Year</th>\n",
|
| 127 |
-
" <th>Director</th>\n",
|
| 128 |
-
" <th>Actors</th>\n",
|
| 129 |
-
" <th>Rating</th>\n",
|
| 130 |
-
" <th>Runtime(Mins)</th>\n",
|
| 131 |
-
" <th>Censor</th>\n",
|
| 132 |
-
" <th>Total_Gross</th>\n",
|
| 133 |
-
" <th>main_genre</th>\n",
|
| 134 |
-
" <th>side_genre</th>\n",
|
| 135 |
-
" </tr>\n",
|
| 136 |
-
" </thead>\n",
|
| 137 |
-
" <tbody>\n",
|
| 138 |
-
" <tr>\n",
|
| 139 |
-
" <th>0</th>\n",
|
| 140 |
-
" <td>Kantara</td>\n",
|
| 141 |
-
" <td>2022</td>\n",
|
| 142 |
-
" <td>Rishab Shetty</td>\n",
|
| 143 |
-
" <td>Rishab Shetty, Sapthami Gowda, Kishore Kumar G...</td>\n",
|
| 144 |
-
" <td>9.3</td>\n",
|
| 145 |
-
" <td>148</td>\n",
|
| 146 |
-
" <td>UA</td>\n",
|
| 147 |
-
" <td>Gross Unkown</td>\n",
|
| 148 |
-
" <td>Action</td>\n",
|
| 149 |
-
" <td>Adventure, Drama</td>\n",
|
| 150 |
-
" </tr>\n",
|
| 151 |
-
" <tr>\n",
|
| 152 |
-
" <th>1</th>\n",
|
| 153 |
-
" <td>The Dark Knight</td>\n",
|
| 154 |
-
" <td>2008</td>\n",
|
| 155 |
-
" <td>Christopher Nolan</td>\n",
|
| 156 |
-
" <td>Christian Bale, Heath Ledger, Aaron Eckhart, M...</td>\n",
|
| 157 |
-
" <td>9.0</td>\n",
|
| 158 |
-
" <td>152</td>\n",
|
| 159 |
-
" <td>UA</td>\n",
|
| 160 |
-
" <td>$534.86M</td>\n",
|
| 161 |
-
" <td>Action</td>\n",
|
| 162 |
-
" <td>Crime, Drama</td>\n",
|
| 163 |
-
" </tr>\n",
|
| 164 |
-
" <tr>\n",
|
| 165 |
-
" <th>2</th>\n",
|
| 166 |
-
" <td>The Lord of the Rings: The Return of the King</td>\n",
|
| 167 |
-
" <td>2003</td>\n",
|
| 168 |
-
" <td>Peter Jackson</td>\n",
|
| 169 |
-
" <td>Elijah Wood, Viggo Mortensen, Ian McKellen, Or...</td>\n",
|
| 170 |
-
" <td>9.0</td>\n",
|
| 171 |
-
" <td>201</td>\n",
|
| 172 |
-
" <td>U</td>\n",
|
| 173 |
-
" <td>$377.85M</td>\n",
|
| 174 |
-
" <td>Action</td>\n",
|
| 175 |
-
" <td>Adventure, Drama</td>\n",
|
| 176 |
-
" </tr>\n",
|
| 177 |
-
" <tr>\n",
|
| 178 |
-
" <th>3</th>\n",
|
| 179 |
-
" <td>Inception</td>\n",
|
| 180 |
-
" <td>2010</td>\n",
|
| 181 |
-
" <td>Christopher Nolan</td>\n",
|
| 182 |
-
" <td>Leonardo DiCaprio, Joseph Gordon-Levitt, Ellio...</td>\n",
|
| 183 |
-
" <td>8.8</td>\n",
|
| 184 |
-
" <td>148</td>\n",
|
| 185 |
-
" <td>UA</td>\n",
|
| 186 |
-
" <td>$292.58M</td>\n",
|
| 187 |
-
" <td>Action</td>\n",
|
| 188 |
-
" <td>Adventure, Sci-Fi</td>\n",
|
| 189 |
-
" </tr>\n",
|
| 190 |
-
" <tr>\n",
|
| 191 |
-
" <th>4</th>\n",
|
| 192 |
-
" <td>The Lord of the Rings: The Two Towers</td>\n",
|
| 193 |
-
" <td>2002</td>\n",
|
| 194 |
-
" <td>Peter Jackson</td>\n",
|
| 195 |
-
" <td>Elijah Wood, Ian McKellen, Viggo Mortensen, Or...</td>\n",
|
| 196 |
-
" <td>8.8</td>\n",
|
| 197 |
-
" <td>179</td>\n",
|
| 198 |
-
" <td>UA</td>\n",
|
| 199 |
-
" <td>$342.55M</td>\n",
|
| 200 |
-
" <td>Action</td>\n",
|
| 201 |
-
" <td>Adventure, Drama</td>\n",
|
| 202 |
-
" </tr>\n",
|
| 203 |
-
" <tr>\n",
|
| 204 |
-
" <th>...</th>\n",
|
| 205 |
-
" <td>...</td>\n",
|
| 206 |
-
" <td>...</td>\n",
|
| 207 |
-
" <td>...</td>\n",
|
| 208 |
-
" <td>...</td>\n",
|
| 209 |
-
" <td>...</td>\n",
|
| 210 |
-
" <td>...</td>\n",
|
| 211 |
-
" <td>...</td>\n",
|
| 212 |
-
" <td>...</td>\n",
|
| 213 |
-
" <td>...</td>\n",
|
| 214 |
-
" <td>...</td>\n",
|
| 215 |
-
" </tr>\n",
|
| 216 |
-
" <tr>\n",
|
| 217 |
-
" <th>5557</th>\n",
|
| 218 |
-
" <td>Disaster Movie</td>\n",
|
| 219 |
-
" <td>2008</td>\n",
|
| 220 |
-
" <td>Directors:Jason Friedberg, Aaron Seltzer</td>\n",
|
| 221 |
-
" <td>Carmen Electra, Vanessa Lachey, Nicole Parker,...</td>\n",
|
| 222 |
-
" <td>1.9</td>\n",
|
| 223 |
-
" <td>87</td>\n",
|
| 224 |
-
" <td>PG-13</td>\n",
|
| 225 |
-
" <td>$14.19M</td>\n",
|
| 226 |
-
" <td>Comedy</td>\n",
|
| 227 |
-
" <td>Sci-Fi</td>\n",
|
| 228 |
-
" </tr>\n",
|
| 229 |
-
" <tr>\n",
|
| 230 |
-
" <th>5558</th>\n",
|
| 231 |
-
" <td>The Hottie & the Nottie</td>\n",
|
| 232 |
-
" <td>2008</td>\n",
|
| 233 |
-
" <td>Tom Putnam</td>\n",
|
| 234 |
-
" <td>Paris Hilton, Joel David Moore, Christine Laki...</td>\n",
|
| 235 |
-
" <td>1.9</td>\n",
|
| 236 |
-
" <td>91</td>\n",
|
| 237 |
-
" <td>PG-13</td>\n",
|
| 238 |
-
" <td>$0.03M</td>\n",
|
| 239 |
-
" <td>Comedy</td>\n",
|
| 240 |
-
" <td>Romance</td>\n",
|
| 241 |
-
" </tr>\n",
|
| 242 |
-
" <tr>\n",
|
| 243 |
-
" <th>5559</th>\n",
|
| 244 |
-
" <td>From Justin to Kelly</td>\n",
|
| 245 |
-
" <td>2003</td>\n",
|
| 246 |
-
" <td>Robert Iscove</td>\n",
|
| 247 |
-
" <td>Kelly Clarkson, Justin Guarini, Katherine Bail...</td>\n",
|
| 248 |
-
" <td>1.9</td>\n",
|
| 249 |
-
" <td>81</td>\n",
|
| 250 |
-
" <td>PG</td>\n",
|
| 251 |
-
" <td>$4.92M</td>\n",
|
| 252 |
-
" <td>Comedy</td>\n",
|
| 253 |
-
" <td>Musical, Romance</td>\n",
|
| 254 |
-
" </tr>\n",
|
| 255 |
-
" <tr>\n",
|
| 256 |
-
" <th>5560</th>\n",
|
| 257 |
-
" <td>Superbabies: Baby Geniuses 2</td>\n",
|
| 258 |
-
" <td>2004</td>\n",
|
| 259 |
-
" <td>Bob Clark</td>\n",
|
| 260 |
-
" <td>Jon Voight, Scott Baio, Vanessa Angel, Skyler ...</td>\n",
|
| 261 |
-
" <td>1.5</td>\n",
|
| 262 |
-
" <td>88</td>\n",
|
| 263 |
-
" <td>PG</td>\n",
|
| 264 |
-
" <td>$9.11M</td>\n",
|
| 265 |
-
" <td>Comedy</td>\n",
|
| 266 |
-
" <td>Family, Sci-Fi</td>\n",
|
| 267 |
-
" </tr>\n",
|
| 268 |
-
" <tr>\n",
|
| 269 |
-
" <th>5561</th>\n",
|
| 270 |
-
" <td>Cumali Ceber: Allah Seni Alsin</td>\n",
|
| 271 |
-
" <td>2017</td>\n",
|
| 272 |
-
" <td>Gökhan Gök</td>\n",
|
| 273 |
-
" <td>Halil Söyletmez, Doga Konakoglu, Emre Keskin, ...</td>\n",
|
| 274 |
-
" <td>1.0</td>\n",
|
| 275 |
-
" <td>100</td>\n",
|
| 276 |
-
" <td>Not Rated</td>\n",
|
| 277 |
-
" <td>Gross Unkown</td>\n",
|
| 278 |
-
" <td>Comedy</td>\n",
|
| 279 |
-
" <td>Comedy</td>\n",
|
| 280 |
-
" </tr>\n",
|
| 281 |
-
" </tbody>\n",
|
| 282 |
-
"</table>\n",
|
| 283 |
-
"<p>5562 rows × 10 columns</p>\n",
|
| 284 |
-
"</div>"
|
| 285 |
-
],
|
| 286 |
-
"text/plain": [
|
| 287 |
-
" Movie_Title Year \\\n",
|
| 288 |
-
"0 Kantara 2022 \n",
|
| 289 |
-
"1 The Dark Knight 2008 \n",
|
| 290 |
-
"2 The Lord of the Rings: The Return of the King 2003 \n",
|
| 291 |
-
"3 Inception 2010 \n",
|
| 292 |
-
"4 The Lord of the Rings: The Two Towers 2002 \n",
|
| 293 |
-
"... ... ... \n",
|
| 294 |
-
"5557 Disaster Movie 2008 \n",
|
| 295 |
-
"5558 The Hottie & the Nottie 2008 \n",
|
| 296 |
-
"5559 From Justin to Kelly 2003 \n",
|
| 297 |
-
"5560 Superbabies: Baby Geniuses 2 2004 \n",
|
| 298 |
-
"5561 Cumali Ceber: Allah Seni Alsin 2017 \n",
|
| 299 |
-
"\n",
|
| 300 |
-
" Director \\\n",
|
| 301 |
-
"0 Rishab Shetty \n",
|
| 302 |
-
"1 Christopher Nolan \n",
|
| 303 |
-
"2 Peter Jackson \n",
|
| 304 |
-
"3 Christopher Nolan \n",
|
| 305 |
-
"4 Peter Jackson \n",
|
| 306 |
-
"... ... \n",
|
| 307 |
-
"5557 Directors:Jason Friedberg, Aaron Seltzer \n",
|
| 308 |
-
"5558 Tom Putnam \n",
|
| 309 |
-
"5559 Robert Iscove \n",
|
| 310 |
-
"5560 Bob Clark \n",
|
| 311 |
-
"5561 Gökhan Gök \n",
|
| 312 |
-
"\n",
|
| 313 |
-
" Actors Rating \\\n",
|
| 314 |
-
"0 Rishab Shetty, Sapthami Gowda, Kishore Kumar G... 9.3 \n",
|
| 315 |
-
"1 Christian Bale, Heath Ledger, Aaron Eckhart, M... 9.0 \n",
|
| 316 |
-
"2 Elijah Wood, Viggo Mortensen, Ian McKellen, Or... 9.0 \n",
|
| 317 |
-
"3 Leonardo DiCaprio, Joseph Gordon-Levitt, Ellio... 8.8 \n",
|
| 318 |
-
"4 Elijah Wood, Ian McKellen, Viggo Mortensen, Or... 8.8 \n",
|
| 319 |
-
"... ... ... \n",
|
| 320 |
-
"5557 Carmen Electra, Vanessa Lachey, Nicole Parker,... 1.9 \n",
|
| 321 |
-
"5558 Paris Hilton, Joel David Moore, Christine Laki... 1.9 \n",
|
| 322 |
-
"5559 Kelly Clarkson, Justin Guarini, Katherine Bail... 1.9 \n",
|
| 323 |
-
"5560 Jon Voight, Scott Baio, Vanessa Angel, Skyler ... 1.5 \n",
|
| 324 |
-
"5561 Halil Söyletmez, Doga Konakoglu, Emre Keskin, ... 1.0 \n",
|
| 325 |
-
"\n",
|
| 326 |
-
" Runtime(Mins) Censor Total_Gross main_genre side_genre \n",
|
| 327 |
-
"0 148 UA Gross Unkown Action Adventure, Drama \n",
|
| 328 |
-
"1 152 UA $534.86M Action Crime, Drama \n",
|
| 329 |
-
"2 201 U $377.85M Action Adventure, Drama \n",
|
| 330 |
-
"3 148 UA $292.58M Action Adventure, Sci-Fi \n",
|
| 331 |
-
"4 179 UA $342.55M Action Adventure, Drama \n",
|
| 332 |
-
"... ... ... ... ... ... \n",
|
| 333 |
-
"5557 87 PG-13 $14.19M Comedy Sci-Fi \n",
|
| 334 |
-
"5558 91 PG-13 $0.03M Comedy Romance \n",
|
| 335 |
-
"5559 81 PG $4.92M Comedy Musical, Romance \n",
|
| 336 |
-
"5560 88 PG $9.11M Comedy Family, Sci-Fi \n",
|
| 337 |
-
"5561 100 Not Rated Gross Unkown Comedy Comedy \n",
|
| 338 |
-
"\n",
|
| 339 |
-
"[5562 rows x 10 columns]"
|
| 340 |
-
]
|
| 341 |
-
},
|
| 342 |
-
"execution_count": 4,
|
| 343 |
-
"metadata": {},
|
| 344 |
-
"output_type": "execute_result"
|
| 345 |
-
}
|
| 346 |
-
],
|
| 347 |
"source": [
|
| 348 |
"df"
|
| 349 |
]
|
| 350 |
},
|
| 351 |
{
|
| 352 |
"cell_type": "code",
|
| 353 |
-
"execution_count":
|
| 354 |
"metadata": {
|
| 355 |
"execution": {
|
| 356 |
"iopub.execute_input": "2023-12-03T16:21:48.290752Z",
|
|
@@ -370,7 +116,7 @@
|
|
| 370 |
},
|
| 371 |
{
|
| 372 |
"cell_type": "code",
|
| 373 |
-
"execution_count":
|
| 374 |
"metadata": {
|
| 375 |
"execution": {
|
| 376 |
"iopub.execute_input": "2023-12-03T16:02:04.378780Z",
|
|
@@ -380,250 +126,7 @@
|
|
| 380 |
"shell.execute_reply.started": "2023-12-03T16:02:04.378750Z"
|
| 381 |
}
|
| 382 |
},
|
| 383 |
-
"outputs": [
|
| 384 |
-
{
|
| 385 |
-
"data": {
|
| 386 |
-
"text/html": [
|
| 387 |
-
"<div>\n",
|
| 388 |
-
"<style scoped>\n",
|
| 389 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 390 |
-
" vertical-align: middle;\n",
|
| 391 |
-
" }\n",
|
| 392 |
-
"\n",
|
| 393 |
-
" .dataframe tbody tr th {\n",
|
| 394 |
-
" vertical-align: top;\n",
|
| 395 |
-
" }\n",
|
| 396 |
-
"\n",
|
| 397 |
-
" .dataframe thead th {\n",
|
| 398 |
-
" text-align: right;\n",
|
| 399 |
-
" }\n",
|
| 400 |
-
"</style>\n",
|
| 401 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 402 |
-
" <thead>\n",
|
| 403 |
-
" <tr style=\"text-align: right;\">\n",
|
| 404 |
-
" <th></th>\n",
|
| 405 |
-
" <th>Movie_Title</th>\n",
|
| 406 |
-
" <th>Year</th>\n",
|
| 407 |
-
" <th>Director</th>\n",
|
| 408 |
-
" <th>Actors</th>\n",
|
| 409 |
-
" <th>Rating</th>\n",
|
| 410 |
-
" <th>Runtime(Mins)</th>\n",
|
| 411 |
-
" <th>Censor</th>\n",
|
| 412 |
-
" <th>Total_Gross</th>\n",
|
| 413 |
-
" <th>main_genre</th>\n",
|
| 414 |
-
" <th>side_genre</th>\n",
|
| 415 |
-
" </tr>\n",
|
| 416 |
-
" </thead>\n",
|
| 417 |
-
" <tbody>\n",
|
| 418 |
-
" <tr>\n",
|
| 419 |
-
" <th>1</th>\n",
|
| 420 |
-
" <td>The Dark Knight</td>\n",
|
| 421 |
-
" <td>2008</td>\n",
|
| 422 |
-
" <td>Christopher Nolan</td>\n",
|
| 423 |
-
" <td>Christian Bale, Heath Ledger, Aaron Eckhart, M...</td>\n",
|
| 424 |
-
" <td>9.0</td>\n",
|
| 425 |
-
" <td>152</td>\n",
|
| 426 |
-
" <td>UA</td>\n",
|
| 427 |
-
" <td>$534.86M</td>\n",
|
| 428 |
-
" <td>Action</td>\n",
|
| 429 |
-
" <td>Crime, Drama</td>\n",
|
| 430 |
-
" </tr>\n",
|
| 431 |
-
" <tr>\n",
|
| 432 |
-
" <th>2</th>\n",
|
| 433 |
-
" <td>The Lord of the Rings: The Return of the King</td>\n",
|
| 434 |
-
" <td>2003</td>\n",
|
| 435 |
-
" <td>Peter Jackson</td>\n",
|
| 436 |
-
" <td>Elijah Wood, Viggo Mortensen, Ian McKellen, Or...</td>\n",
|
| 437 |
-
" <td>9.0</td>\n",
|
| 438 |
-
" <td>201</td>\n",
|
| 439 |
-
" <td>U</td>\n",
|
| 440 |
-
" <td>$377.85M</td>\n",
|
| 441 |
-
" <td>Action</td>\n",
|
| 442 |
-
" <td>Adventure, Drama</td>\n",
|
| 443 |
-
" </tr>\n",
|
| 444 |
-
" <tr>\n",
|
| 445 |
-
" <th>3</th>\n",
|
| 446 |
-
" <td>Inception</td>\n",
|
| 447 |
-
" <td>2010</td>\n",
|
| 448 |
-
" <td>Christopher Nolan</td>\n",
|
| 449 |
-
" <td>Leonardo DiCaprio, Joseph Gordon-Levitt, Ellio...</td>\n",
|
| 450 |
-
" <td>8.8</td>\n",
|
| 451 |
-
" <td>148</td>\n",
|
| 452 |
-
" <td>UA</td>\n",
|
| 453 |
-
" <td>$292.58M</td>\n",
|
| 454 |
-
" <td>Action</td>\n",
|
| 455 |
-
" <td>Adventure, Sci-Fi</td>\n",
|
| 456 |
-
" </tr>\n",
|
| 457 |
-
" <tr>\n",
|
| 458 |
-
" <th>4</th>\n",
|
| 459 |
-
" <td>The Lord of the Rings: The Two Towers</td>\n",
|
| 460 |
-
" <td>2002</td>\n",
|
| 461 |
-
" <td>Peter Jackson</td>\n",
|
| 462 |
-
" <td>Elijah Wood, Ian McKellen, Viggo Mortensen, Or...</td>\n",
|
| 463 |
-
" <td>8.8</td>\n",
|
| 464 |
-
" <td>179</td>\n",
|
| 465 |
-
" <td>UA</td>\n",
|
| 466 |
-
" <td>$342.55M</td>\n",
|
| 467 |
-
" <td>Action</td>\n",
|
| 468 |
-
" <td>Adventure, Drama</td>\n",
|
| 469 |
-
" </tr>\n",
|
| 470 |
-
" <tr>\n",
|
| 471 |
-
" <th>5</th>\n",
|
| 472 |
-
" <td>The Lord of the Rings: The Fellowship of the Ring</td>\n",
|
| 473 |
-
" <td>2001</td>\n",
|
| 474 |
-
" <td>Peter Jackson</td>\n",
|
| 475 |
-
" <td>Elijah Wood, Ian McKellen, Orlando Bloom, Sean...</td>\n",
|
| 476 |
-
" <td>8.8</td>\n",
|
| 477 |
-
" <td>178</td>\n",
|
| 478 |
-
" <td>U</td>\n",
|
| 479 |
-
" <td>$315.54M</td>\n",
|
| 480 |
-
" <td>Action</td>\n",
|
| 481 |
-
" <td>Adventure, Drama</td>\n",
|
| 482 |
-
" </tr>\n",
|
| 483 |
-
" <tr>\n",
|
| 484 |
-
" <th>...</th>\n",
|
| 485 |
-
" <td>...</td>\n",
|
| 486 |
-
" <td>...</td>\n",
|
| 487 |
-
" <td>...</td>\n",
|
| 488 |
-
" <td>...</td>\n",
|
| 489 |
-
" <td>...</td>\n",
|
| 490 |
-
" <td>...</td>\n",
|
| 491 |
-
" <td>...</td>\n",
|
| 492 |
-
" <td>...</td>\n",
|
| 493 |
-
" <td>...</td>\n",
|
| 494 |
-
" <td>...</td>\n",
|
| 495 |
-
" </tr>\n",
|
| 496 |
-
" <tr>\n",
|
| 497 |
-
" <th>5555</th>\n",
|
| 498 |
-
" <td>Son of the Mask</td>\n",
|
| 499 |
-
" <td>2005</td>\n",
|
| 500 |
-
" <td>Lawrence Guterman</td>\n",
|
| 501 |
-
" <td>Jamie Kennedy, Traylor Howard, Alan Cumming, L...</td>\n",
|
| 502 |
-
" <td>2.2</td>\n",
|
| 503 |
-
" <td>94</td>\n",
|
| 504 |
-
" <td>U</td>\n",
|
| 505 |
-
" <td>$17.02M</td>\n",
|
| 506 |
-
" <td>Comedy</td>\n",
|
| 507 |
-
" <td>Family, Fantasy</td>\n",
|
| 508 |
-
" </tr>\n",
|
| 509 |
-
" <tr>\n",
|
| 510 |
-
" <th>5557</th>\n",
|
| 511 |
-
" <td>Disaster Movie</td>\n",
|
| 512 |
-
" <td>2008</td>\n",
|
| 513 |
-
" <td>Directors:Jason Friedberg, Aaron Seltzer</td>\n",
|
| 514 |
-
" <td>Carmen Electra, Vanessa Lachey, Nicole Parker,...</td>\n",
|
| 515 |
-
" <td>1.9</td>\n",
|
| 516 |
-
" <td>87</td>\n",
|
| 517 |
-
" <td>PG-13</td>\n",
|
| 518 |
-
" <td>$14.19M</td>\n",
|
| 519 |
-
" <td>Comedy</td>\n",
|
| 520 |
-
" <td>Sci-Fi</td>\n",
|
| 521 |
-
" </tr>\n",
|
| 522 |
-
" <tr>\n",
|
| 523 |
-
" <th>5558</th>\n",
|
| 524 |
-
" <td>The Hottie & the Nottie</td>\n",
|
| 525 |
-
" <td>2008</td>\n",
|
| 526 |
-
" <td>Tom Putnam</td>\n",
|
| 527 |
-
" <td>Paris Hilton, Joel David Moore, Christine Laki...</td>\n",
|
| 528 |
-
" <td>1.9</td>\n",
|
| 529 |
-
" <td>91</td>\n",
|
| 530 |
-
" <td>PG-13</td>\n",
|
| 531 |
-
" <td>$0.03M</td>\n",
|
| 532 |
-
" <td>Comedy</td>\n",
|
| 533 |
-
" <td>Romance</td>\n",
|
| 534 |
-
" </tr>\n",
|
| 535 |
-
" <tr>\n",
|
| 536 |
-
" <th>5559</th>\n",
|
| 537 |
-
" <td>From Justin to Kelly</td>\n",
|
| 538 |
-
" <td>2003</td>\n",
|
| 539 |
-
" <td>Robert Iscove</td>\n",
|
| 540 |
-
" <td>Kelly Clarkson, Justin Guarini, Katherine Bail...</td>\n",
|
| 541 |
-
" <td>1.9</td>\n",
|
| 542 |
-
" <td>81</td>\n",
|
| 543 |
-
" <td>PG</td>\n",
|
| 544 |
-
" <td>$4.92M</td>\n",
|
| 545 |
-
" <td>Comedy</td>\n",
|
| 546 |
-
" <td>Musical, Romance</td>\n",
|
| 547 |
-
" </tr>\n",
|
| 548 |
-
" <tr>\n",
|
| 549 |
-
" <th>5560</th>\n",
|
| 550 |
-
" <td>Superbabies: Baby Geniuses 2</td>\n",
|
| 551 |
-
" <td>2004</td>\n",
|
| 552 |
-
" <td>Bob Clark</td>\n",
|
| 553 |
-
" <td>Jon Voight, Scott Baio, Vanessa Angel, Skyler ...</td>\n",
|
| 554 |
-
" <td>1.5</td>\n",
|
| 555 |
-
" <td>88</td>\n",
|
| 556 |
-
" <td>PG</td>\n",
|
| 557 |
-
" <td>$9.11M</td>\n",
|
| 558 |
-
" <td>Comedy</td>\n",
|
| 559 |
-
" <td>Family, Sci-Fi</td>\n",
|
| 560 |
-
" </tr>\n",
|
| 561 |
-
" </tbody>\n",
|
| 562 |
-
"</table>\n",
|
| 563 |
-
"<p>4680 rows × 10 columns</p>\n",
|
| 564 |
-
"</div>"
|
| 565 |
-
],
|
| 566 |
-
"text/plain": [
|
| 567 |
-
" Movie_Title Year \\\n",
|
| 568 |
-
"1 The Dark Knight 2008 \n",
|
| 569 |
-
"2 The Lord of the Rings: The Return of the King 2003 \n",
|
| 570 |
-
"3 Inception 2010 \n",
|
| 571 |
-
"4 The Lord of the Rings: The Two Towers 2002 \n",
|
| 572 |
-
"5 The Lord of the Rings: The Fellowship of the Ring 2001 \n",
|
| 573 |
-
"... ... ... \n",
|
| 574 |
-
"5555 Son of the Mask 2005 \n",
|
| 575 |
-
"5557 Disaster Movie 2008 \n",
|
| 576 |
-
"5558 The Hottie & the Nottie 2008 \n",
|
| 577 |
-
"5559 From Justin to Kelly 2003 \n",
|
| 578 |
-
"5560 Superbabies: Baby Geniuses 2 2004 \n",
|
| 579 |
-
"\n",
|
| 580 |
-
" Director \\\n",
|
| 581 |
-
"1 Christopher Nolan \n",
|
| 582 |
-
"2 Peter Jackson \n",
|
| 583 |
-
"3 Christopher Nolan \n",
|
| 584 |
-
"4 Peter Jackson \n",
|
| 585 |
-
"5 Peter Jackson \n",
|
| 586 |
-
"... ... \n",
|
| 587 |
-
"5555 Lawrence Guterman \n",
|
| 588 |
-
"5557 Directors:Jason Friedberg, Aaron Seltzer \n",
|
| 589 |
-
"5558 Tom Putnam \n",
|
| 590 |
-
"5559 Robert Iscove \n",
|
| 591 |
-
"5560 Bob Clark \n",
|
| 592 |
-
"\n",
|
| 593 |
-
" Actors Rating \\\n",
|
| 594 |
-
"1 Christian Bale, Heath Ledger, Aaron Eckhart, M... 9.0 \n",
|
| 595 |
-
"2 Elijah Wood, Viggo Mortensen, Ian McKellen, Or... 9.0 \n",
|
| 596 |
-
"3 Leonardo DiCaprio, Joseph Gordon-Levitt, Ellio... 8.8 \n",
|
| 597 |
-
"4 Elijah Wood, Ian McKellen, Viggo Mortensen, Or... 8.8 \n",
|
| 598 |
-
"5 Elijah Wood, Ian McKellen, Orlando Bloom, Sean... 8.8 \n",
|
| 599 |
-
"... ... ... \n",
|
| 600 |
-
"5555 Jamie Kennedy, Traylor Howard, Alan Cumming, L... 2.2 \n",
|
| 601 |
-
"5557 Carmen Electra, Vanessa Lachey, Nicole Parker,... 1.9 \n",
|
| 602 |
-
"5558 Paris Hilton, Joel David Moore, Christine Laki... 1.9 \n",
|
| 603 |
-
"5559 Kelly Clarkson, Justin Guarini, Katherine Bail... 1.9 \n",
|
| 604 |
-
"5560 Jon Voight, Scott Baio, Vanessa Angel, Skyler ... 1.5 \n",
|
| 605 |
-
"\n",
|
| 606 |
-
" Runtime(Mins) Censor Total_Gross main_genre side_genre \n",
|
| 607 |
-
"1 152 UA $534.86M Action Crime, Drama \n",
|
| 608 |
-
"2 201 U $377.85M Action Adventure, Drama \n",
|
| 609 |
-
"3 148 UA $292.58M Action Adventure, Sci-Fi \n",
|
| 610 |
-
"4 179 UA $342.55M Action Adventure, Drama \n",
|
| 611 |
-
"5 178 U $315.54M Action Adventure, Drama \n",
|
| 612 |
-
"... ... ... ... ... ... \n",
|
| 613 |
-
"5555 94 U $17.02M Comedy Family, Fantasy \n",
|
| 614 |
-
"5557 87 PG-13 $14.19M Comedy Sci-Fi \n",
|
| 615 |
-
"5558 91 PG-13 $0.03M Comedy Romance \n",
|
| 616 |
-
"5559 81 PG $4.92M Comedy Musical, Romance \n",
|
| 617 |
-
"5560 88 PG $9.11M Comedy Family, Sci-Fi \n",
|
| 618 |
-
"\n",
|
| 619 |
-
"[4680 rows x 10 columns]"
|
| 620 |
-
]
|
| 621 |
-
},
|
| 622 |
-
"execution_count": 6,
|
| 623 |
-
"metadata": {},
|
| 624 |
-
"output_type": "execute_result"
|
| 625 |
-
}
|
| 626 |
-
],
|
| 627 |
"source": [
|
| 628 |
"clean_df"
|
| 629 |
]
|
|
|
|
| 62 |
},
|
| 63 |
{
|
| 64 |
"cell_type": "code",
|
| 65 |
+
"execution_count": null,
|
| 66 |
"metadata": {
|
| 67 |
"execution": {
|
| 68 |
"iopub.execute_input": "2023-12-03T16:02:04.302761Z",
|
|
|
|
| 72 |
"shell.execute_reply.started": "2023-12-03T16:02:04.302721Z"
|
| 73 |
}
|
| 74 |
},
|
| 75 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
"source": [
|
| 77 |
"df.shape"
|
| 78 |
]
|
| 79 |
},
|
| 80 |
{
|
| 81 |
"cell_type": "code",
|
| 82 |
+
"execution_count": null,
|
| 83 |
"metadata": {
|
| 84 |
"execution": {
|
| 85 |
"iopub.execute_input": "2023-12-03T16:02:04.321548Z",
|
|
|
|
| 89 |
"shell.execute_reply.started": "2023-12-03T16:02:04.321518Z"
|
| 90 |
}
|
| 91 |
},
|
| 92 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
"source": [
|
| 94 |
"df"
|
| 95 |
]
|
| 96 |
},
|
| 97 |
{
|
| 98 |
"cell_type": "code",
|
| 99 |
+
"execution_count": 3,
|
| 100 |
"metadata": {
|
| 101 |
"execution": {
|
| 102 |
"iopub.execute_input": "2023-12-03T16:21:48.290752Z",
|
|
|
|
| 116 |
},
|
| 117 |
{
|
| 118 |
"cell_type": "code",
|
| 119 |
+
"execution_count": null,
|
| 120 |
"metadata": {
|
| 121 |
"execution": {
|
| 122 |
"iopub.execute_input": "2023-12-03T16:02:04.378780Z",
|
|
|
|
| 126 |
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
"source": [
|
| 131 |
"clean_df"
|
| 132 |
]
|
benchmark/pandas_9/pandas_9_reproduced.ipynb
CHANGED
|
@@ -62,7 +62,7 @@
|
|
| 62 |
},
|
| 63 |
{
|
| 64 |
"cell_type": "code",
|
| 65 |
-
"execution_count":
|
| 66 |
"metadata": {
|
| 67 |
"execution": {
|
| 68 |
"iopub.execute_input": "2023-12-03T16:02:04.302761Z",
|
|
@@ -72,25 +72,14 @@
|
|
| 72 |
"shell.execute_reply.started": "2023-12-03T16:02:04.302721Z"
|
| 73 |
}
|
| 74 |
},
|
| 75 |
-
"outputs": [
|
| 76 |
-
{
|
| 77 |
-
"data": {
|
| 78 |
-
"text/plain": [
|
| 79 |
-
"(5562, 10)"
|
| 80 |
-
]
|
| 81 |
-
},
|
| 82 |
-
"execution_count": 3,
|
| 83 |
-
"metadata": {},
|
| 84 |
-
"output_type": "execute_result"
|
| 85 |
-
}
|
| 86 |
-
],
|
| 87 |
"source": [
|
| 88 |
"df.shape"
|
| 89 |
]
|
| 90 |
},
|
| 91 |
{
|
| 92 |
"cell_type": "code",
|
| 93 |
-
"execution_count":
|
| 94 |
"metadata": {
|
| 95 |
"execution": {
|
| 96 |
"iopub.execute_input": "2023-12-03T16:02:04.321548Z",
|
|
@@ -100,257 +89,14 @@
|
|
| 100 |
"shell.execute_reply.started": "2023-12-03T16:02:04.321518Z"
|
| 101 |
}
|
| 102 |
},
|
| 103 |
-
"outputs": [
|
| 104 |
-
{
|
| 105 |
-
"data": {
|
| 106 |
-
"text/html": [
|
| 107 |
-
"<div>\n",
|
| 108 |
-
"<style scoped>\n",
|
| 109 |
-
" .dataframe tbody tr th:only-of-type {\n",
|
| 110 |
-
" vertical-align: middle;\n",
|
| 111 |
-
" }\n",
|
| 112 |
-
"\n",
|
| 113 |
-
" .dataframe tbody tr th {\n",
|
| 114 |
-
" vertical-align: top;\n",
|
| 115 |
-
" }\n",
|
| 116 |
-
"\n",
|
| 117 |
-
" .dataframe thead th {\n",
|
| 118 |
-
" text-align: right;\n",
|
| 119 |
-
" }\n",
|
| 120 |
-
"</style>\n",
|
| 121 |
-
"<table border=\"1\" class=\"dataframe\">\n",
|
| 122 |
-
" <thead>\n",
|
| 123 |
-
" <tr style=\"text-align: right;\">\n",
|
| 124 |
-
" <th></th>\n",
|
| 125 |
-
" <th>Movie_Title</th>\n",
|
| 126 |
-
" <th>Year</th>\n",
|
| 127 |
-
" <th>Director</th>\n",
|
| 128 |
-
" <th>Actors</th>\n",
|
| 129 |
-
" <th>Rating</th>\n",
|
| 130 |
-
" <th>Runtime(Mins)</th>\n",
|
| 131 |
-
" <th>Censor</th>\n",
|
| 132 |
-
" <th>Total_Gross</th>\n",
|
| 133 |
-
" <th>main_genre</th>\n",
|
| 134 |
-
" <th>side_genre</th>\n",
|
| 135 |
-
" </tr>\n",
|
| 136 |
-
" </thead>\n",
|
| 137 |
-
" <tbody>\n",
|
| 138 |
-
" <tr>\n",
|
| 139 |
-
" <th>0</th>\n",
|
| 140 |
-
" <td>Kantara</td>\n",
|
| 141 |
-
" <td>2022</td>\n",
|
| 142 |
-
" <td>Rishab Shetty</td>\n",
|
| 143 |
-
" <td>Rishab Shetty, Sapthami Gowda, Kishore Kumar G...</td>\n",
|
| 144 |
-
" <td>9.3</td>\n",
|
| 145 |
-
" <td>148</td>\n",
|
| 146 |
-
" <td>UA</td>\n",
|
| 147 |
-
" <td>Gross Unkown</td>\n",
|
| 148 |
-
" <td>Action</td>\n",
|
| 149 |
-
" <td>Adventure, Drama</td>\n",
|
| 150 |
-
" </tr>\n",
|
| 151 |
-
" <tr>\n",
|
| 152 |
-
" <th>1</th>\n",
|
| 153 |
-
" <td>The Dark Knight</td>\n",
|
| 154 |
-
" <td>2008</td>\n",
|
| 155 |
-
" <td>Christopher Nolan</td>\n",
|
| 156 |
-
" <td>Christian Bale, Heath Ledger, Aaron Eckhart, M...</td>\n",
|
| 157 |
-
" <td>9.0</td>\n",
|
| 158 |
-
" <td>152</td>\n",
|
| 159 |
-
" <td>UA</td>\n",
|
| 160 |
-
" <td>$534.86M</td>\n",
|
| 161 |
-
" <td>Action</td>\n",
|
| 162 |
-
" <td>Crime, Drama</td>\n",
|
| 163 |
-
" </tr>\n",
|
| 164 |
-
" <tr>\n",
|
| 165 |
-
" <th>2</th>\n",
|
| 166 |
-
" <td>The Lord of the Rings: The Return of the King</td>\n",
|
| 167 |
-
" <td>2003</td>\n",
|
| 168 |
-
" <td>Peter Jackson</td>\n",
|
| 169 |
-
" <td>Elijah Wood, Viggo Mortensen, Ian McKellen, Or...</td>\n",
|
| 170 |
-
" <td>9.0</td>\n",
|
| 171 |
-
" <td>201</td>\n",
|
| 172 |
-
" <td>U</td>\n",
|
| 173 |
-
" <td>$377.85M</td>\n",
|
| 174 |
-
" <td>Action</td>\n",
|
| 175 |
-
" <td>Adventure, Drama</td>\n",
|
| 176 |
-
" </tr>\n",
|
| 177 |
-
" <tr>\n",
|
| 178 |
-
" <th>3</th>\n",
|
| 179 |
-
" <td>Inception</td>\n",
|
| 180 |
-
" <td>2010</td>\n",
|
| 181 |
-
" <td>Christopher Nolan</td>\n",
|
| 182 |
-
" <td>Leonardo DiCaprio, Joseph Gordon-Levitt, Ellio...</td>\n",
|
| 183 |
-
" <td>8.8</td>\n",
|
| 184 |
-
" <td>148</td>\n",
|
| 185 |
-
" <td>UA</td>\n",
|
| 186 |
-
" <td>$292.58M</td>\n",
|
| 187 |
-
" <td>Action</td>\n",
|
| 188 |
-
" <td>Adventure, Sci-Fi</td>\n",
|
| 189 |
-
" </tr>\n",
|
| 190 |
-
" <tr>\n",
|
| 191 |
-
" <th>4</th>\n",
|
| 192 |
-
" <td>The Lord of the Rings: The Two Towers</td>\n",
|
| 193 |
-
" <td>2002</td>\n",
|
| 194 |
-
" <td>Peter Jackson</td>\n",
|
| 195 |
-
" <td>Elijah Wood, Ian McKellen, Viggo Mortensen, Or...</td>\n",
|
| 196 |
-
" <td>8.8</td>\n",
|
| 197 |
-
" <td>179</td>\n",
|
| 198 |
-
" <td>UA</td>\n",
|
| 199 |
-
" <td>$342.55M</td>\n",
|
| 200 |
-
" <td>Action</td>\n",
|
| 201 |
-
" <td>Adventure, Drama</td>\n",
|
| 202 |
-
" </tr>\n",
|
| 203 |
-
" <tr>\n",
|
| 204 |
-
" <th>...</th>\n",
|
| 205 |
-
" <td>...</td>\n",
|
| 206 |
-
" <td>...</td>\n",
|
| 207 |
-
" <td>...</td>\n",
|
| 208 |
-
" <td>...</td>\n",
|
| 209 |
-
" <td>...</td>\n",
|
| 210 |
-
" <td>...</td>\n",
|
| 211 |
-
" <td>...</td>\n",
|
| 212 |
-
" <td>...</td>\n",
|
| 213 |
-
" <td>...</td>\n",
|
| 214 |
-
" <td>...</td>\n",
|
| 215 |
-
" </tr>\n",
|
| 216 |
-
" <tr>\n",
|
| 217 |
-
" <th>5557</th>\n",
|
| 218 |
-
" <td>Disaster Movie</td>\n",
|
| 219 |
-
" <td>2008</td>\n",
|
| 220 |
-
" <td>Directors:Jason Friedberg, Aaron Seltzer</td>\n",
|
| 221 |
-
" <td>Carmen Electra, Vanessa Lachey, Nicole Parker,...</td>\n",
|
| 222 |
-
" <td>1.9</td>\n",
|
| 223 |
-
" <td>87</td>\n",
|
| 224 |
-
" <td>PG-13</td>\n",
|
| 225 |
-
" <td>$14.19M</td>\n",
|
| 226 |
-
" <td>Comedy</td>\n",
|
| 227 |
-
" <td>Sci-Fi</td>\n",
|
| 228 |
-
" </tr>\n",
|
| 229 |
-
" <tr>\n",
|
| 230 |
-
" <th>5558</th>\n",
|
| 231 |
-
" <td>The Hottie & the Nottie</td>\n",
|
| 232 |
-
" <td>2008</td>\n",
|
| 233 |
-
" <td>Tom Putnam</td>\n",
|
| 234 |
-
" <td>Paris Hilton, Joel David Moore, Christine Laki...</td>\n",
|
| 235 |
-
" <td>1.9</td>\n",
|
| 236 |
-
" <td>91</td>\n",
|
| 237 |
-
" <td>PG-13</td>\n",
|
| 238 |
-
" <td>$0.03M</td>\n",
|
| 239 |
-
" <td>Comedy</td>\n",
|
| 240 |
-
" <td>Romance</td>\n",
|
| 241 |
-
" </tr>\n",
|
| 242 |
-
" <tr>\n",
|
| 243 |
-
" <th>5559</th>\n",
|
| 244 |
-
" <td>From Justin to Kelly</td>\n",
|
| 245 |
-
" <td>2003</td>\n",
|
| 246 |
-
" <td>Robert Iscove</td>\n",
|
| 247 |
-
" <td>Kelly Clarkson, Justin Guarini, Katherine Bail...</td>\n",
|
| 248 |
-
" <td>1.9</td>\n",
|
| 249 |
-
" <td>81</td>\n",
|
| 250 |
-
" <td>PG</td>\n",
|
| 251 |
-
" <td>$4.92M</td>\n",
|
| 252 |
-
" <td>Comedy</td>\n",
|
| 253 |
-
" <td>Musical, Romance</td>\n",
|
| 254 |
-
" </tr>\n",
|
| 255 |
-
" <tr>\n",
|
| 256 |
-
" <th>5560</th>\n",
|
| 257 |
-
" <td>Superbabies: Baby Geniuses 2</td>\n",
|
| 258 |
-
" <td>2004</td>\n",
|
| 259 |
-
" <td>Bob Clark</td>\n",
|
| 260 |
-
" <td>Jon Voight, Scott Baio, Vanessa Angel, Skyler ...</td>\n",
|
| 261 |
-
" <td>1.5</td>\n",
|
| 262 |
-
" <td>88</td>\n",
|
| 263 |
-
" <td>PG</td>\n",
|
| 264 |
-
" <td>$9.11M</td>\n",
|
| 265 |
-
" <td>Comedy</td>\n",
|
| 266 |
-
" <td>Family, Sci-Fi</td>\n",
|
| 267 |
-
" </tr>\n",
|
| 268 |
-
" <tr>\n",
|
| 269 |
-
" <th>5561</th>\n",
|
| 270 |
-
" <td>Cumali Ceber: Allah Seni Alsin</td>\n",
|
| 271 |
-
" <td>2017</td>\n",
|
| 272 |
-
" <td>Gökhan Gök</td>\n",
|
| 273 |
-
" <td>Halil Söyletmez, Doga Konakoglu, Emre Keskin, ...</td>\n",
|
| 274 |
-
" <td>1.0</td>\n",
|
| 275 |
-
" <td>100</td>\n",
|
| 276 |
-
" <td>Not Rated</td>\n",
|
| 277 |
-
" <td>Gross Unkown</td>\n",
|
| 278 |
-
" <td>Comedy</td>\n",
|
| 279 |
-
" <td>Comedy</td>\n",
|
| 280 |
-
" </tr>\n",
|
| 281 |
-
" </tbody>\n",
|
| 282 |
-
"</table>\n",
|
| 283 |
-
"<p>5562 rows × 10 columns</p>\n",
|
| 284 |
-
"</div>"
|
| 285 |
-
],
|
| 286 |
-
"text/plain": [
|
| 287 |
-
" Movie_Title Year \\\n",
|
| 288 |
-
"0 Kantara 2022 \n",
|
| 289 |
-
"1 The Dark Knight 2008 \n",
|
| 290 |
-
"2 The Lord of the Rings: The Return of the King 2003 \n",
|
| 291 |
-
"3 Inception 2010 \n",
|
| 292 |
-
"4 The Lord of the Rings: The Two Towers 2002 \n",
|
| 293 |
-
"... ... ... \n",
|
| 294 |
-
"5557 Disaster Movie 2008 \n",
|
| 295 |
-
"5558 The Hottie & the Nottie 2008 \n",
|
| 296 |
-
"5559 From Justin to Kelly 2003 \n",
|
| 297 |
-
"5560 Superbabies: Baby Geniuses 2 2004 \n",
|
| 298 |
-
"5561 Cumali Ceber: Allah Seni Alsin 2017 \n",
|
| 299 |
-
"\n",
|
| 300 |
-
" Director \\\n",
|
| 301 |
-
"0 Rishab Shetty \n",
|
| 302 |
-
"1 Christopher Nolan \n",
|
| 303 |
-
"2 Peter Jackson \n",
|
| 304 |
-
"3 Christopher Nolan \n",
|
| 305 |
-
"4 Peter Jackson \n",
|
| 306 |
-
"... ... \n",
|
| 307 |
-
"5557 Directors:Jason Friedberg, Aaron Seltzer \n",
|
| 308 |
-
"5558 Tom Putnam \n",
|
| 309 |
-
"5559 Robert Iscove \n",
|
| 310 |
-
"5560 Bob Clark \n",
|
| 311 |
-
"5561 Gökhan Gök \n",
|
| 312 |
-
"\n",
|
| 313 |
-
" Actors Rating \\\n",
|
| 314 |
-
"0 Rishab Shetty, Sapthami Gowda, Kishore Kumar G... 9.3 \n",
|
| 315 |
-
"1 Christian Bale, Heath Ledger, Aaron Eckhart, M... 9.0 \n",
|
| 316 |
-
"2 Elijah Wood, Viggo Mortensen, Ian McKellen, Or... 9.0 \n",
|
| 317 |
-
"3 Leonardo DiCaprio, Joseph Gordon-Levitt, Ellio... 8.8 \n",
|
| 318 |
-
"4 Elijah Wood, Ian McKellen, Viggo Mortensen, Or... 8.8 \n",
|
| 319 |
-
"... ... ... \n",
|
| 320 |
-
"5557 Carmen Electra, Vanessa Lachey, Nicole Parker,... 1.9 \n",
|
| 321 |
-
"5558 Paris Hilton, Joel David Moore, Christine Laki... 1.9 \n",
|
| 322 |
-
"5559 Kelly Clarkson, Justin Guarini, Katherine Bail... 1.9 \n",
|
| 323 |
-
"5560 Jon Voight, Scott Baio, Vanessa Angel, Skyler ... 1.5 \n",
|
| 324 |
-
"5561 Halil Söyletmez, Doga Konakoglu, Emre Keskin, ... 1.0 \n",
|
| 325 |
-
"\n",
|
| 326 |
-
" Runtime(Mins) Censor Total_Gross main_genre side_genre \n",
|
| 327 |
-
"0 148 UA Gross Unkown Action Adventure, Drama \n",
|
| 328 |
-
"1 152 UA $534.86M Action Crime, Drama \n",
|
| 329 |
-
"2 201 U $377.85M Action Adventure, Drama \n",
|
| 330 |
-
"3 148 UA $292.58M Action Adventure, Sci-Fi \n",
|
| 331 |
-
"4 179 UA $342.55M Action Adventure, Drama \n",
|
| 332 |
-
"... ... ... ... ... ... \n",
|
| 333 |
-
"5557 87 PG-13 $14.19M Comedy Sci-Fi \n",
|
| 334 |
-
"5558 91 PG-13 $0.03M Comedy Romance \n",
|
| 335 |
-
"5559 81 PG $4.92M Comedy Musical, Romance \n",
|
| 336 |
-
"5560 88 PG $9.11M Comedy Family, Sci-Fi \n",
|
| 337 |
-
"5561 100 Not Rated Gross Unkown Comedy Comedy \n",
|
| 338 |
-
"\n",
|
| 339 |
-
"[5562 rows x 10 columns]"
|
| 340 |
-
]
|
| 341 |
-
},
|
| 342 |
-
"execution_count": 4,
|
| 343 |
-
"metadata": {},
|
| 344 |
-
"output_type": "execute_result"
|
| 345 |
-
}
|
| 346 |
-
],
|
| 347 |
"source": [
|
| 348 |
"df"
|
| 349 |
]
|
| 350 |
},
|
| 351 |
{
|
| 352 |
"cell_type": "code",
|
| 353 |
-
"execution_count":
|
| 354 |
"metadata": {
|
| 355 |
"execution": {
|
| 356 |
"iopub.execute_input": "2023-12-03T16:21:48.290752Z",
|
|
@@ -376,7 +122,7 @@
|
|
| 376 |
"\u001b[0;31mKeyError\u001b[0m: 'Total Gross (millions)'",
|
| 377 |
"\nThe above exception was the direct cause of the following exception:\n",
|
| 378 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 379 |
-
"\u001b[0;32m<ipython-input-
|
| 380 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3891\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnlevels\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3892\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_getitem_multilevel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3893\u001b[0;31m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3894\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mis_integer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mindexer\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3895\u001b[0m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mindexer\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 381 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36mget_loc\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3796\u001b[0m ):\n\u001b[1;32m 3797\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mInvalidIndexError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3798\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3799\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3800\u001b[0m \u001b[0;31m# If we have a listlike key, _check_indexing_error will raise\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 382 |
"\u001b[0;31mKeyError\u001b[0m: 'Total Gross (millions)'"
|
|
|
|
| 62 |
},
|
| 63 |
{
|
| 64 |
"cell_type": "code",
|
| 65 |
+
"execution_count": null,
|
| 66 |
"metadata": {
|
| 67 |
"execution": {
|
| 68 |
"iopub.execute_input": "2023-12-03T16:02:04.302761Z",
|
|
|
|
| 72 |
"shell.execute_reply.started": "2023-12-03T16:02:04.302721Z"
|
| 73 |
}
|
| 74 |
},
|
| 75 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
"source": [
|
| 77 |
"df.shape"
|
| 78 |
]
|
| 79 |
},
|
| 80 |
{
|
| 81 |
"cell_type": "code",
|
| 82 |
+
"execution_count": null,
|
| 83 |
"metadata": {
|
| 84 |
"execution": {
|
| 85 |
"iopub.execute_input": "2023-12-03T16:02:04.321548Z",
|
|
|
|
| 89 |
"shell.execute_reply.started": "2023-12-03T16:02:04.321518Z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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
"source": [
|
| 94 |
"df"
|
| 95 |
]
|
| 96 |
},
|
| 97 |
{
|
| 98 |
"cell_type": "code",
|
| 99 |
+
"execution_count": 3,
|
| 100 |
"metadata": {
|
| 101 |
"execution": {
|
| 102 |
"iopub.execute_input": "2023-12-03T16:21:48.290752Z",
|
|
|
|
| 122 |
"\u001b[0;31mKeyError\u001b[0m: 'Total Gross (millions)'",
|
| 123 |
"\nThe above exception was the direct cause of the following exception:\n",
|
| 124 |
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
| 125 |
+
"\u001b[0;32m<ipython-input-3-e8d3ce81bdde>\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mclean_df\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"Total Gross (millions)\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m!=\u001b[0m\u001b[0;34m\"$0.00M\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m&\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mdf\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"Total Gross (millions)\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m!=\u001b[0m\u001b[0;34m\"Gross Unkown\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcopy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mclean_df\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mclean_df\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mclean_df\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Censor'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m!=\u001b[0m\u001b[0;34m\"(Banned)\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 126 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36m__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3891\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnlevels\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3892\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_getitem_multilevel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3893\u001b[0;31m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3894\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mis_integer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mindexer\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3895\u001b[0m \u001b[0mindexer\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mindexer\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 127 |
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36mget_loc\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3796\u001b[0m ):\n\u001b[1;32m 3797\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mInvalidIndexError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3798\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3799\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3800\u001b[0m \u001b[0;31m# If we have a listlike key, _check_indexing_error will raise\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 128 |
"\u001b[0;31mKeyError\u001b[0m: 'Total Gross (millions)'"
|