|
58 | 58 | "\n",
|
59 | 59 | "Compiler : Clang 10.0.0 \n",
|
60 | 60 | "OS : Darwin\n",
|
61 |
| - "Release : 20.3.0\n", |
| 61 | + "Release : 20.6.0\n", |
62 | 62 | "Machine : x86_64\n",
|
63 | 63 | "Processor : i386\n",
|
64 | 64 | "CPU cores : 16\n",
|
65 | 65 | "Architecture: 64bit\n",
|
66 | 66 | "\n",
|
67 |
| - "Git hash: cf1f9e0456cec9d5d960512c3269cc904d79928a\n", |
| 67 | + "Git hash: 1de312ab8ec83b204e8a22ebe02393243330f40f\n", |
68 | 68 | "\n",
|
| 69 | + "watermark : 2.1.0\n", |
69 | 70 | "matplotlib : 3.3.2\n",
|
70 |
| - "numpy : 1.19.2\n", |
71 | 71 | "numpy_financial: 1.0.0\n",
|
72 |
| - "watermark : 2.1.0\n", |
73 | 72 | "json : 2.0.9\n",
|
| 73 | + "numpy : 1.19.2\n", |
74 | 74 | "pandas : 1.1.3\n",
|
75 | 75 | "\n"
|
76 | 76 | ]
|
|
958 | 958 | "dates = pd.date_range('08/01/2020', periods=months, freq='M')+pd.Timedelta('1D')"
|
959 | 959 | ]
|
960 | 960 | },
|
| 961 | + { |
| 962 | + "cell_type": "code", |
| 963 | + "execution_count": 13, |
| 964 | + "metadata": {}, |
| 965 | + "outputs": [ |
| 966 | + { |
| 967 | + "data": { |
| 968 | + "text/plain": [ |
| 969 | + "DatetimeIndex(['2020-09-01', '2020-10-01', '2020-11-01', '2020-12-01',\n", |
| 970 | + " '2021-01-01', '2021-02-01', '2021-03-01', '2021-04-01',\n", |
| 971 | + " '2021-05-01', '2021-06-01',\n", |
| 972 | + " ...\n", |
| 973 | + " '2049-11-01', '2049-12-01', '2050-01-01', '2050-02-01',\n", |
| 974 | + " '2050-03-01', '2050-04-01', '2050-05-01', '2050-06-01',\n", |
| 975 | + " '2050-07-01', '2050-08-01'],\n", |
| 976 | + " dtype='datetime64[ns]', length=360, freq=None)" |
| 977 | + ] |
| 978 | + }, |
| 979 | + "execution_count": 13, |
| 980 | + "metadata": {}, |
| 981 | + "output_type": "execute_result" |
| 982 | + } |
| 983 | + ], |
| 984 | + "source": [ |
| 985 | + "dates" |
| 986 | + ] |
| 987 | + }, |
961 | 988 | {
|
962 | 989 | "cell_type": "markdown",
|
963 | 990 | "metadata": {},
|
|
967 | 994 | },
|
968 | 995 | {
|
969 | 996 | "cell_type": "code",
|
970 |
| - "execution_count": 13, |
| 997 | + "execution_count": 14, |
971 | 998 | "metadata": {},
|
972 | 999 | "outputs": [],
|
973 | 1000 | "source": [
|
|
1007 | 1034 | },
|
1008 | 1035 | {
|
1009 | 1036 | "cell_type": "code",
|
1010 |
| - "execution_count": 14, |
| 1037 | + "execution_count": 15, |
1011 | 1038 | "metadata": {},
|
1012 | 1039 | "outputs": [],
|
1013 | 1040 | "source": [
|
|
1018 | 1045 | },
|
1019 | 1046 | {
|
1020 | 1047 | "cell_type": "code",
|
1021 |
| - "execution_count": 15, |
| 1048 | + "execution_count": 16, |
1022 | 1049 | "metadata": {},
|
1023 | 1050 | "outputs": [
|
1024 | 1051 | {
|
|
1234 | 1261 | "[344 rows x 9 columns]"
|
1235 | 1262 | ]
|
1236 | 1263 | },
|
1237 |
| - "execution_count": 15, |
| 1264 | + "execution_count": 16, |
1238 | 1265 | "metadata": {},
|
1239 | 1266 | "output_type": "execute_result"
|
1240 | 1267 | }
|
|
1252 | 1279 | },
|
1253 | 1280 | {
|
1254 | 1281 | "cell_type": "code",
|
1255 |
| - "execution_count": 16, |
| 1282 | + "execution_count": 17, |
1256 | 1283 | "metadata": {},
|
1257 | 1284 | "outputs": [],
|
1258 | 1285 | "source": [
|
1259 | 1286 | "movies = pd.read_excel('data/movies.xlsx')"
|
1260 | 1287 | ]
|
1261 | 1288 | },
|
| 1289 | + { |
| 1290 | + "cell_type": "code", |
| 1291 | + "execution_count": 18, |
| 1292 | + "metadata": {}, |
| 1293 | + "outputs": [ |
| 1294 | + { |
| 1295 | + "data": { |
| 1296 | + "text/html": [ |
| 1297 | + "<div>\n", |
| 1298 | + "<style scoped>\n", |
| 1299 | + " .dataframe tbody tr th:only-of-type {\n", |
| 1300 | + " vertical-align: middle;\n", |
| 1301 | + " }\n", |
| 1302 | + "\n", |
| 1303 | + " .dataframe tbody tr th {\n", |
| 1304 | + " vertical-align: top;\n", |
| 1305 | + " }\n", |
| 1306 | + "\n", |
| 1307 | + " .dataframe thead th {\n", |
| 1308 | + " text-align: right;\n", |
| 1309 | + " }\n", |
| 1310 | + "</style>\n", |
| 1311 | + "<table border=\"1\" class=\"dataframe\">\n", |
| 1312 | + " <thead>\n", |
| 1313 | + " <tr style=\"text-align: right;\">\n", |
| 1314 | + " <th></th>\n", |
| 1315 | + " <th>Title</th>\n", |
| 1316 | + " <th>Year</th>\n", |
| 1317 | + " <th>Genres</th>\n", |
| 1318 | + " <th>Language</th>\n", |
| 1319 | + " <th>Country</th>\n", |
| 1320 | + " <th>Content Rating</th>\n", |
| 1321 | + " <th>Duration</th>\n", |
| 1322 | + " <th>Aspect Ratio</th>\n", |
| 1323 | + " <th>Budget</th>\n", |
| 1324 | + " <th>Gross Earnings</th>\n", |
| 1325 | + " <th>...</th>\n", |
| 1326 | + " <th>Facebook Likes - Actor 1</th>\n", |
| 1327 | + " <th>Facebook Likes - Actor 2</th>\n", |
| 1328 | + " <th>Facebook Likes - Actor 3</th>\n", |
| 1329 | + " <th>Facebook Likes - cast Total</th>\n", |
| 1330 | + " <th>Facebook likes - Movie</th>\n", |
| 1331 | + " <th>Facenumber in posters</th>\n", |
| 1332 | + " <th>User Votes</th>\n", |
| 1333 | + " <th>Reviews by Users</th>\n", |
| 1334 | + " <th>Reviews by Crtiics</th>\n", |
| 1335 | + " <th>IMDB Score</th>\n", |
| 1336 | + " </tr>\n", |
| 1337 | + " </thead>\n", |
| 1338 | + " <tbody>\n", |
| 1339 | + " <tr>\n", |
| 1340 | + " <th>0</th>\n", |
| 1341 | + " <td>Intolerance: Love's Struggle Throughout the Ages</td>\n", |
| 1342 | + " <td>1916</td>\n", |
| 1343 | + " <td>Drama|History|War</td>\n", |
| 1344 | + " <td>NaN</td>\n", |
| 1345 | + " <td>USA</td>\n", |
| 1346 | + " <td>Not Rated</td>\n", |
| 1347 | + " <td>123</td>\n", |
| 1348 | + " <td>1.33</td>\n", |
| 1349 | + " <td>385907.0</td>\n", |
| 1350 | + " <td>NaN</td>\n", |
| 1351 | + " <td>...</td>\n", |
| 1352 | + " <td>436</td>\n", |
| 1353 | + " <td>22</td>\n", |
| 1354 | + " <td>9.0</td>\n", |
| 1355 | + " <td>481</td>\n", |
| 1356 | + " <td>691</td>\n", |
| 1357 | + " <td>1</td>\n", |
| 1358 | + " <td>10718</td>\n", |
| 1359 | + " <td>88</td>\n", |
| 1360 | + " <td>69.0</td>\n", |
| 1361 | + " <td>8.0</td>\n", |
| 1362 | + " </tr>\n", |
| 1363 | + " <tr>\n", |
| 1364 | + " <th>1</th>\n", |
| 1365 | + " <td>Over the Hill to the Poorhouse</td>\n", |
| 1366 | + " <td>1920</td>\n", |
| 1367 | + " <td>Crime|Drama</td>\n", |
| 1368 | + " <td>NaN</td>\n", |
| 1369 | + " <td>USA</td>\n", |
| 1370 | + " <td>NaN</td>\n", |
| 1371 | + " <td>110</td>\n", |
| 1372 | + " <td>1.33</td>\n", |
| 1373 | + " <td>100000.0</td>\n", |
| 1374 | + " <td>3000000.0</td>\n", |
| 1375 | + " <td>...</td>\n", |
| 1376 | + " <td>2</td>\n", |
| 1377 | + " <td>2</td>\n", |
| 1378 | + " <td>0.0</td>\n", |
| 1379 | + " <td>4</td>\n", |
| 1380 | + " <td>0</td>\n", |
| 1381 | + " <td>1</td>\n", |
| 1382 | + " <td>5</td>\n", |
| 1383 | + " <td>1</td>\n", |
| 1384 | + " <td>1.0</td>\n", |
| 1385 | + " <td>4.8</td>\n", |
| 1386 | + " </tr>\n", |
| 1387 | + " <tr>\n", |
| 1388 | + " <th>2</th>\n", |
| 1389 | + " <td>The Big Parade</td>\n", |
| 1390 | + " <td>1925</td>\n", |
| 1391 | + " <td>Drama|Romance|War</td>\n", |
| 1392 | + " <td>NaN</td>\n", |
| 1393 | + " <td>USA</td>\n", |
| 1394 | + " <td>Not Rated</td>\n", |
| 1395 | + " <td>151</td>\n", |
| 1396 | + " <td>1.33</td>\n", |
| 1397 | + " <td>245000.0</td>\n", |
| 1398 | + " <td>NaN</td>\n", |
| 1399 | + " <td>...</td>\n", |
| 1400 | + " <td>81</td>\n", |
| 1401 | + " <td>12</td>\n", |
| 1402 | + " <td>6.0</td>\n", |
| 1403 | + " <td>108</td>\n", |
| 1404 | + " <td>226</td>\n", |
| 1405 | + " <td>0</td>\n", |
| 1406 | + " <td>4849</td>\n", |
| 1407 | + " <td>45</td>\n", |
| 1408 | + " <td>48.0</td>\n", |
| 1409 | + " <td>8.3</td>\n", |
| 1410 | + " </tr>\n", |
| 1411 | + " <tr>\n", |
| 1412 | + " <th>3</th>\n", |
| 1413 | + " <td>Metropolis</td>\n", |
| 1414 | + " <td>1927</td>\n", |
| 1415 | + " <td>Drama|Sci-Fi</td>\n", |
| 1416 | + " <td>German</td>\n", |
| 1417 | + " <td>Germany</td>\n", |
| 1418 | + " <td>Not Rated</td>\n", |
| 1419 | + " <td>145</td>\n", |
| 1420 | + " <td>1.33</td>\n", |
| 1421 | + " <td>6000000.0</td>\n", |
| 1422 | + " <td>26435.0</td>\n", |
| 1423 | + " <td>...</td>\n", |
| 1424 | + " <td>136</td>\n", |
| 1425 | + " <td>23</td>\n", |
| 1426 | + " <td>18.0</td>\n", |
| 1427 | + " <td>203</td>\n", |
| 1428 | + " <td>12000</td>\n", |
| 1429 | + " <td>1</td>\n", |
| 1430 | + " <td>111841</td>\n", |
| 1431 | + " <td>413</td>\n", |
| 1432 | + " <td>260.0</td>\n", |
| 1433 | + " <td>8.3</td>\n", |
| 1434 | + " </tr>\n", |
| 1435 | + " <tr>\n", |
| 1436 | + " <th>4</th>\n", |
| 1437 | + " <td>Pandora's Box</td>\n", |
| 1438 | + " <td>1929</td>\n", |
| 1439 | + " <td>Crime|Drama|Romance</td>\n", |
| 1440 | + " <td>German</td>\n", |
| 1441 | + " <td>Germany</td>\n", |
| 1442 | + " <td>Not Rated</td>\n", |
| 1443 | + " <td>110</td>\n", |
| 1444 | + " <td>1.33</td>\n", |
| 1445 | + " <td>NaN</td>\n", |
| 1446 | + " <td>9950.0</td>\n", |
| 1447 | + " <td>...</td>\n", |
| 1448 | + " <td>426</td>\n", |
| 1449 | + " <td>20</td>\n", |
| 1450 | + " <td>3.0</td>\n", |
| 1451 | + " <td>455</td>\n", |
| 1452 | + " <td>926</td>\n", |
| 1453 | + " <td>1</td>\n", |
| 1454 | + " <td>7431</td>\n", |
| 1455 | + " <td>84</td>\n", |
| 1456 | + " <td>71.0</td>\n", |
| 1457 | + " <td>8.0</td>\n", |
| 1458 | + " </tr>\n", |
| 1459 | + " </tbody>\n", |
| 1460 | + "</table>\n", |
| 1461 | + "<p>5 rows × 25 columns</p>\n", |
| 1462 | + "</div>" |
| 1463 | + ], |
| 1464 | + "text/plain": [ |
| 1465 | + " Title Year \\\n", |
| 1466 | + "0 Intolerance: Love's Struggle Throughout the Ages 1916 \n", |
| 1467 | + "1 Over the Hill to the Poorhouse 1920 \n", |
| 1468 | + "2 The Big Parade 1925 \n", |
| 1469 | + "3 Metropolis 1927 \n", |
| 1470 | + "4 Pandora's Box 1929 \n", |
| 1471 | + "\n", |
| 1472 | + " Genres Language Country Content Rating Duration \\\n", |
| 1473 | + "0 Drama|History|War NaN USA Not Rated 123 \n", |
| 1474 | + "1 Crime|Drama NaN USA NaN 110 \n", |
| 1475 | + "2 Drama|Romance|War NaN USA Not Rated 151 \n", |
| 1476 | + "3 Drama|Sci-Fi German Germany Not Rated 145 \n", |
| 1477 | + "4 Crime|Drama|Romance German Germany Not Rated 110 \n", |
| 1478 | + "\n", |
| 1479 | + " Aspect Ratio Budget Gross Earnings ... Facebook Likes - Actor 1 \\\n", |
| 1480 | + "0 1.33 385907.0 NaN ... 436 \n", |
| 1481 | + "1 1.33 100000.0 3000000.0 ... 2 \n", |
| 1482 | + "2 1.33 245000.0 NaN ... 81 \n", |
| 1483 | + "3 1.33 6000000.0 26435.0 ... 136 \n", |
| 1484 | + "4 1.33 NaN 9950.0 ... 426 \n", |
| 1485 | + "\n", |
| 1486 | + " Facebook Likes - Actor 2 Facebook Likes - Actor 3 \\\n", |
| 1487 | + "0 22 9.0 \n", |
| 1488 | + "1 2 0.0 \n", |
| 1489 | + "2 12 6.0 \n", |
| 1490 | + "3 23 18.0 \n", |
| 1491 | + "4 20 3.0 \n", |
| 1492 | + "\n", |
| 1493 | + " Facebook Likes - cast Total Facebook likes - Movie Facenumber in posters \\\n", |
| 1494 | + "0 481 691 1 \n", |
| 1495 | + "1 4 0 1 \n", |
| 1496 | + "2 108 226 0 \n", |
| 1497 | + "3 203 12000 1 \n", |
| 1498 | + "4 455 926 1 \n", |
| 1499 | + "\n", |
| 1500 | + " User Votes Reviews by Users Reviews by Crtiics IMDB Score \n", |
| 1501 | + "0 10718 88 69.0 8.0 \n", |
| 1502 | + "1 5 1 1.0 4.8 \n", |
| 1503 | + "2 4849 45 48.0 8.3 \n", |
| 1504 | + "3 111841 413 260.0 8.3 \n", |
| 1505 | + "4 7431 84 71.0 8.0 \n", |
| 1506 | + "\n", |
| 1507 | + "[5 rows x 25 columns]" |
| 1508 | + ] |
| 1509 | + }, |
| 1510 | + "execution_count": 18, |
| 1511 | + "metadata": {}, |
| 1512 | + "output_type": "execute_result" |
| 1513 | + } |
| 1514 | + ], |
| 1515 | + "source": [ |
| 1516 | + "movies.head()" |
| 1517 | + ] |
| 1518 | + }, |
1262 | 1519 | {
|
1263 | 1520 | "cell_type": "markdown",
|
1264 | 1521 | "metadata": {},
|
|
1268 | 1525 | },
|
1269 | 1526 | {
|
1270 | 1527 | "cell_type": "code",
|
1271 |
| - "execution_count": 17, |
| 1528 | + "execution_count": 19, |
1272 | 1529 | "metadata": {},
|
1273 | 1530 | "outputs": [
|
1274 | 1531 | {
|
1275 | 1532 | "data": {
|
1276 | 1533 | "text/plain": [
|
1277 |
| - "\"Intolerance: Love's Struggle Throughout the Ages\\xa0\"" |
| 1534 | + "'It Happened One Night\\xa0'" |
1278 | 1535 | ]
|
1279 | 1536 | },
|
1280 |
| - "execution_count": 17, |
| 1537 | + "execution_count": 19, |
1281 | 1538 | "metadata": {},
|
1282 | 1539 | "output_type": "execute_result"
|
1283 | 1540 | }
|
1284 | 1541 | ],
|
1285 | 1542 | "source": [
|
1286 |
| - "movies['Title'].iloc[0]" |
| 1543 | + "movies['Title'].iloc[10]" |
1287 | 1544 | ]
|
1288 | 1545 | },
|
1289 | 1546 | {
|
|
1295 | 1552 | },
|
1296 | 1553 | {
|
1297 | 1554 | "cell_type": "code",
|
1298 |
| - "execution_count": 18, |
| 1555 | + "execution_count": 20, |
1299 | 1556 | "metadata": {},
|
1300 | 1557 | "outputs": [],
|
1301 | 1558 | "source": [
|
|
1304 | 1561 | },
|
1305 | 1562 | {
|
1306 | 1563 | "cell_type": "code",
|
1307 |
| - "execution_count": 19, |
| 1564 | + "execution_count": 21, |
1308 | 1565 | "metadata": {},
|
1309 | 1566 | "outputs": [
|
1310 | 1567 | {
|
|
1313 | 1570 | "\"Intolerance: Love's Struggle Throughout the Ages\""
|
1314 | 1571 | ]
|
1315 | 1572 | },
|
1316 |
| - "execution_count": 19, |
| 1573 | + "execution_count": 21, |
1317 | 1574 | "metadata": {},
|
1318 | 1575 | "output_type": "execute_result"
|
1319 | 1576 | }
|
|
0 commit comments