{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "faab86b6-6af3-4b86-8288-534228ce01ea", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting pandas\n", " Using cached pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (91 kB)\n", "Requirement already satisfied: numpy in /home/jermaine/Desktop/CineMatch/venv/lib/python3.11/site-packages (2.3.3)\n", "Collecting seaborn\n", " Downloading seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)\n", "Requirement already satisfied: python-dateutil>=2.8.2 in /home/jermaine/Desktop/CineMatch/venv/lib/python3.11/site-packages (from pandas) (2.9.0.post0)\n", "Collecting pytz>=2020.1 (from pandas)\n", " Using cached pytz-2025.2-py2.py3-none-any.whl.metadata (22 kB)\n", "Requirement already satisfied: tzdata>=2022.7 in /home/jermaine/Desktop/CineMatch/venv/lib/python3.11/site-packages (from pandas) (2025.2)\n", "Collecting matplotlib!=3.6.1,>=3.4 (from seaborn)\n", " Downloading matplotlib-3.10.7-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (11 kB)\n", "Collecting contourpy>=1.0.1 (from matplotlib!=3.6.1,>=3.4->seaborn)\n", " Downloading contourpy-1.3.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (5.5 kB)\n", "Collecting cycler>=0.10 (from matplotlib!=3.6.1,>=3.4->seaborn)\n", " Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)\n", "Collecting fonttools>=4.22.0 (from matplotlib!=3.6.1,>=3.4->seaborn)\n", " Downloading fonttools-4.61.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (113 kB)\n", "\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m113.2/113.2 kB\u001b[0m \u001b[31m276.4 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m31m23.8 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\n", "\u001b[?25hCollecting kiwisolver>=1.3.1 (from matplotlib!=3.6.1,>=3.4->seaborn)\n", " Downloading kiwisolver-1.4.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (6.3 kB)\n", "Requirement already satisfied: packaging>=20.0 in /home/jermaine/Desktop/CineMatch/venv/lib/python3.11/site-packages (from matplotlib!=3.6.1,>=3.4->seaborn) (25.0)\n", "Requirement already satisfied: pillow>=8 in /home/jermaine/Desktop/CineMatch/venv/lib/python3.11/site-packages (from matplotlib!=3.6.1,>=3.4->seaborn) (11.3.0)\n", "Collecting pyparsing>=3 (from matplotlib!=3.6.1,>=3.4->seaborn)\n", " Downloading pyparsing-3.2.5-py3-none-any.whl.metadata (5.0 kB)\n", "Requirement already satisfied: six>=1.5 in /home/jermaine/Desktop/CineMatch/venv/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas) (1.17.0)\n", "Using cached pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (12.8 MB)\n", "Downloading seaborn-0.13.2-py3-none-any.whl (294 kB)\n", "\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m294.9/294.9 kB\u001b[0m \u001b[31m409.9 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m1m745.6 kB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\n", "\u001b[?25hDownloading matplotlib-3.10.7-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (8.7 MB)\n", "\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m8.7/8.7 MB\u001b[0m \u001b[31m1.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m[36m0:00:01\u001b[0m0m\n", "\u001b[?25hUsing cached pytz-2025.2-py2.py3-none-any.whl (509 kB)\n", "Downloading contourpy-1.3.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (355 kB)\n", "\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m355.2/355.2 kB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\n", "\u001b[?25hDownloading cycler-0.12.1-py3-none-any.whl (8.3 kB)\n", "Downloading fonttools-4.61.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (5.0 MB)\n", "\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.0/5.0 MB\u001b[0m \u001b[31m3.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m0:01\u001b[0m:01\u001b[0m\n", "\u001b[?25hDownloading kiwisolver-1.4.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.4 MB)\n", "\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/1.4 MB\u001b[0m \u001b[31m4.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m0:01\u001b[0m:01\u001b[0m\n", "\u001b[?25hDownloading pyparsing-3.2.5-py3-none-any.whl (113 kB)\n", "\u001b[2K \u001b[38;2;114;156;31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m113.9/113.9 kB\u001b[0m \u001b[31m2.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0mm eta \u001b[36m0:00:01\u001b[0m\n", "\u001b[?25hInstalling collected packages: pytz, pyparsing, kiwisolver, fonttools, cycler, contourpy, pandas, matplotlib, seaborn\n", "Successfully installed contourpy-1.3.3 cycler-0.12.1 fonttools-4.61.0 kiwisolver-1.4.9 matplotlib-3.10.7 pandas-2.3.3 pyparsing-3.2.5 pytz-2025.2 seaborn-0.13.2\n", "\n", "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.0\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m25.3\u001b[0m\n", "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n" ] } ], "source": [ "!pip install pandas numpy seaborn" ] }, { "cell_type": "code", "execution_count": 7, "id": "6c83aa85-43a2-4941-8ec4-510010ed72c1", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import seaborn as sns\n", "import warnings\n", "warnings.filterwarnings(\"ignore\")" ] }, { "cell_type": "code", "execution_count": 8, "id": "6c692a3d-e17e-458b-9cfd-9edc2b9c76e5", "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv(\"~/Desktop/CineMatch/data/movies_metadata.csv\")" ] }, { "cell_type": "code", "execution_count": 9, "id": "761e4049-76e8-4637-b34a-f922a8237836", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
adultbelongs_to_collectionbudgetgenreshomepageidimdb_idoriginal_languageoriginal_titleoverview...release_daterevenueruntimespoken_languagesstatustaglinetitlevideovote_averagevote_count
0False{'id': 10194, 'name': 'Toy Story Collection', ...30000000[{'id': 16, 'name': 'Animation'}, {'id': 35, '...http://toystory.disney.com/toy-story862tt0114709enToy StoryLed by Woody, Andy's toys live happily in his ......1995-10-30373554033.081.0[{'iso_639_1': 'en', 'name': 'English'}]ReleasedNaNToy StoryFalse7.75415.0
1FalseNaN65000000[{'id': 12, 'name': 'Adventure'}, {'id': 14, '...NaN8844tt0113497enJumanjiWhen siblings Judy and Peter discover an encha......1995-12-15262797249.0104.0[{'iso_639_1': 'en', 'name': 'English'}, {'iso...ReleasedRoll the dice and unleash the excitement!JumanjiFalse6.92413.0
2False{'id': 119050, 'name': 'Grumpy Old Men Collect...0[{'id': 10749, 'name': 'Romance'}, {'id': 35, ...NaN15602tt0113228enGrumpier Old MenA family wedding reignites the ancient feud be......1995-12-220.0101.0[{'iso_639_1': 'en', 'name': 'English'}]ReleasedStill Yelling. Still Fighting. Still Ready for...Grumpier Old MenFalse6.592.0
3FalseNaN16000000[{'id': 35, 'name': 'Comedy'}, {'id': 18, 'nam...NaN31357tt0114885enWaiting to ExhaleCheated on, mistreated and stepped on, the wom......1995-12-2281452156.0127.0[{'iso_639_1': 'en', 'name': 'English'}]ReleasedFriends are the people who let you be yourself...Waiting to ExhaleFalse6.134.0
4False{'id': 96871, 'name': 'Father of the Bride Col...0[{'id': 35, 'name': 'Comedy'}]NaN11862tt0113041enFather of the Bride Part IIJust when George Banks has recovered from his ......1995-02-1076578911.0106.0[{'iso_639_1': 'en', 'name': 'English'}]ReleasedJust When His World Is Back To Normal... He's ...Father of the Bride Part IIFalse5.7173.0
..................................................................
45461FalseNaN0[{'id': 18, 'name': 'Drama'}, {'id': 10751, 'n...http://www.imdb.com/title/tt6209470/439050tt6209470faرگ خوابRising and falling between a man and woman....NaN0.090.0[{'iso_639_1': 'fa', 'name': 'فارسی'}]ReleasedRising and falling between a man and womanSubdueFalse4.01.0
45462FalseNaN0[{'id': 18, 'name': 'Drama'}]NaN111109tt2028550tlSiglo ng PagluluwalAn artist struggles to finish his work while a......2011-11-170.0360.0[{'iso_639_1': 'tl', 'name': ''}]ReleasedNaNCentury of BirthingFalse9.03.0
45463FalseNaN0[{'id': 28, 'name': 'Action'}, {'id': 18, 'nam...NaN67758tt0303758enBetrayalWhen one of her hits goes wrong, a professiona......2003-08-010.090.0[{'iso_639_1': 'en', 'name': 'English'}]ReleasedA deadly game of wits.BetrayalFalse3.86.0
45464FalseNaN0[]NaN227506tt0008536enSatana likuyushchiyIn a small town live two brothers, one a minis......1917-10-210.087.0[]ReleasedNaNSatan TriumphantFalse0.00.0
45465FalseNaN0[]NaN461257tt6980792enQueerama50 years after decriminalisation of homosexual......2017-06-090.075.0[{'iso_639_1': 'en', 'name': 'English'}]ReleasedNaNQueeramaFalse0.00.0
\n", "

45466 rows × 24 columns

\n", "
" ], "text/plain": [ " adult belongs_to_collection budget \\\n", "0 False {'id': 10194, 'name': 'Toy Story Collection', ... 30000000 \n", "1 False NaN 65000000 \n", "2 False {'id': 119050, 'name': 'Grumpy Old Men Collect... 0 \n", "3 False NaN 16000000 \n", "4 False {'id': 96871, 'name': 'Father of the Bride Col... 0 \n", "... ... ... ... \n", "45461 False NaN 0 \n", "45462 False NaN 0 \n", "45463 False NaN 0 \n", "45464 False NaN 0 \n", "45465 False NaN 0 \n", "\n", " genres \\\n", "0 [{'id': 16, 'name': 'Animation'}, {'id': 35, '... \n", "1 [{'id': 12, 'name': 'Adventure'}, {'id': 14, '... \n", "2 [{'id': 10749, 'name': 'Romance'}, {'id': 35, ... \n", "3 [{'id': 35, 'name': 'Comedy'}, {'id': 18, 'nam... \n", "4 [{'id': 35, 'name': 'Comedy'}] \n", "... ... \n", "45461 [{'id': 18, 'name': 'Drama'}, {'id': 10751, 'n... \n", "45462 [{'id': 18, 'name': 'Drama'}] \n", "45463 [{'id': 28, 'name': 'Action'}, {'id': 18, 'nam... \n", "45464 [] \n", "45465 [] \n", "\n", " homepage id imdb_id \\\n", "0 http://toystory.disney.com/toy-story 862 tt0114709 \n", "1 NaN 8844 tt0113497 \n", "2 NaN 15602 tt0113228 \n", "3 NaN 31357 tt0114885 \n", "4 NaN 11862 tt0113041 \n", "... ... ... ... \n", "45461 http://www.imdb.com/title/tt6209470/ 439050 tt6209470 \n", "45462 NaN 111109 tt2028550 \n", "45463 NaN 67758 tt0303758 \n", "45464 NaN 227506 tt0008536 \n", "45465 NaN 461257 tt6980792 \n", "\n", " original_language original_title \\\n", "0 en Toy Story \n", "1 en Jumanji \n", "2 en Grumpier Old Men \n", "3 en Waiting to Exhale \n", "4 en Father of the Bride Part II \n", "... ... ... \n", "45461 fa رگ خواب \n", "45462 tl Siglo ng Pagluluwal \n", "45463 en Betrayal \n", "45464 en Satana likuyushchiy \n", "45465 en Queerama \n", "\n", " overview ... release_date \\\n", "0 Led by Woody, Andy's toys live happily in his ... ... 1995-10-30 \n", "1 When siblings Judy and Peter discover an encha... ... 1995-12-15 \n", "2 A family wedding reignites the ancient feud be... ... 1995-12-22 \n", "3 Cheated on, mistreated and stepped on, the wom... ... 1995-12-22 \n", "4 Just when George Banks has recovered from his ... ... 1995-02-10 \n", "... ... ... ... \n", "45461 Rising and falling between a man and woman. ... NaN \n", "45462 An artist struggles to finish his work while a... ... 2011-11-17 \n", "45463 When one of her hits goes wrong, a professiona... ... 2003-08-01 \n", "45464 In a small town live two brothers, one a minis... ... 1917-10-21 \n", "45465 50 years after decriminalisation of homosexual... ... 2017-06-09 \n", "\n", " revenue runtime spoken_languages \\\n", "0 373554033.0 81.0 [{'iso_639_1': 'en', 'name': 'English'}] \n", "1 262797249.0 104.0 [{'iso_639_1': 'en', 'name': 'English'}, {'iso... \n", "2 0.0 101.0 [{'iso_639_1': 'en', 'name': 'English'}] \n", "3 81452156.0 127.0 [{'iso_639_1': 'en', 'name': 'English'}] \n", "4 76578911.0 106.0 [{'iso_639_1': 'en', 'name': 'English'}] \n", "... ... ... ... \n", "45461 0.0 90.0 [{'iso_639_1': 'fa', 'name': 'فارسی'}] \n", "45462 0.0 360.0 [{'iso_639_1': 'tl', 'name': ''}] \n", "45463 0.0 90.0 [{'iso_639_1': 'en', 'name': 'English'}] \n", "45464 0.0 87.0 [] \n", "45465 0.0 75.0 [{'iso_639_1': 'en', 'name': 'English'}] \n", "\n", " status tagline \\\n", "0 Released NaN \n", "1 Released Roll the dice and unleash the excitement! \n", "2 Released Still Yelling. Still Fighting. Still Ready for... \n", "3 Released Friends are the people who let you be yourself... \n", "4 Released Just When His World Is Back To Normal... He's ... \n", "... ... ... \n", "45461 Released Rising and falling between a man and woman \n", "45462 Released NaN \n", "45463 Released A deadly game of wits. \n", "45464 Released NaN \n", "45465 Released NaN \n", "\n", " title video vote_average vote_count \n", "0 Toy Story False 7.7 5415.0 \n", "1 Jumanji False 6.9 2413.0 \n", "2 Grumpier Old Men False 6.5 92.0 \n", "3 Waiting to Exhale False 6.1 34.0 \n", "4 Father of the Bride Part II False 5.7 173.0 \n", "... ... ... ... ... \n", "45461 Subdue False 4.0 1.0 \n", "45462 Century of Birthing False 9.0 3.0 \n", "45463 Betrayal False 3.8 6.0 \n", "45464 Satan Triumphant False 0.0 0.0 \n", "45465 Queerama False 0.0 0.0 \n", "\n", "[45466 rows x 24 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "code", "execution_count": 10, "id": "010b9a7e-2075-4119-9b3e-6a79970245c0", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "RangeIndex: 45466 entries, 0 to 45465\n", "Data columns (total 24 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", " 0 adult 45466 non-null object \n", " 1 belongs_to_collection 4494 non-null object \n", " 2 budget 45466 non-null object \n", " 3 genres 45466 non-null object \n", " 4 homepage 7782 non-null object \n", " 5 id 45466 non-null object \n", " 6 imdb_id 45449 non-null object \n", " 7 original_language 45455 non-null object \n", " 8 original_title 45466 non-null object \n", " 9 overview 44512 non-null object \n", " 10 popularity 45461 non-null object \n", " 11 poster_path 45080 non-null object \n", " 12 production_companies 45463 non-null object \n", " 13 production_countries 45463 non-null object \n", " 14 release_date 45379 non-null object \n", " 15 revenue 45460 non-null float64\n", " 16 runtime 45203 non-null float64\n", " 17 spoken_languages 45460 non-null object \n", " 18 status 45379 non-null object \n", " 19 tagline 20412 non-null object \n", " 20 title 45460 non-null object \n", " 21 video 45460 non-null object \n", " 22 vote_average 45460 non-null float64\n", " 23 vote_count 45460 non-null float64\n", "dtypes: float64(4), object(20)\n", "memory usage: 8.3+ MB\n" ] } ], "source": [ "df.info()" ] }, { "cell_type": "code", "execution_count": 11, "id": "e17d1cb7-6446-40c7-acf8-05934b5b66c0", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "adult False\n", "belongs_to_collection {'id': 10194, 'name': 'Toy Story Collection', ...\n", "budget 30000000\n", "genres [{'id': 16, 'name': 'Animation'}, {'id': 35, '...\n", "homepage http://toystory.disney.com/toy-story\n", "id 862\n", "imdb_id tt0114709\n", "original_language en\n", "original_title Toy Story\n", "overview Led by Woody, Andy's toys live happily in his ...\n", "popularity 21.946943\n", "poster_path /rhIRbceoE9lR4veEXuwCC2wARtG.jpg\n", "production_companies [{'name': 'Pixar Animation Studios', 'id': 3}]\n", "production_countries [{'iso_3166_1': 'US', 'name': 'United States o...\n", "release_date 1995-10-30\n", "revenue 373554033.0\n", "runtime 81.0\n", "spoken_languages [{'iso_639_1': 'en', 'name': 'English'}]\n", "status Released\n", "tagline NaN\n", "title Toy Story\n", "video False\n", "vote_average 7.7\n", "vote_count 5415.0\n", "Name: 0, dtype: object" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.iloc[0]" ] }, { "cell_type": "code", "execution_count": 14, "id": "0dc44094-31b5-4870-81db-16d3bc96e59e", "metadata": {}, "outputs": [], "source": [ "df.drop(['vote_count','vote_average','video'], axis=1,inplace=True)\n" ] }, { "cell_type": "code", "execution_count": 18, "id": "12d1ffb9-5cf2-4f7d-8a92-85c8471233bd", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "\"{'id': 119050, 'name': 'Grumpy Old Men Collection', 'poster_path': '/nLvUdqgPgm3F85NMCii9gVFUcet.jpg', 'backdrop_path': '/hypTnLot2z8wpFS7qwsQHW1uV8u.jpg'}\"" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df['belongs_to_collection'][2]" ] }, { "cell_type": "code", "execution_count": 20, "id": "33cce957-eed8-429a-b9f7-1ce83e4ec49c", "metadata": {}, "outputs": [], "source": [ "df.drop('belongs_to_collection',axis=1,inplace=True)" ] }, { "cell_type": "code", "execution_count": 21, "id": "ced88473-c105-4e0a-808b-f9903c8b8643", "metadata": {}, "outputs": [], "source": [ "df.drop(['homepage','status',],axis=1,inplace=True)" ] }, { "cell_type": "code", "execution_count": 22, "id": "519facbd-91c9-4784-aa32-44a0d9edb24f", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
adultbudgetgenresidimdb_idoriginal_languageoriginal_titleoverviewpopularityposter_pathproduction_companiesproduction_countriesrelease_daterevenueruntimespoken_languagestaglinetitle
0False30000000[{'id': 16, 'name': 'Animation'}, {'id': 35, '...862tt0114709enToy StoryLed by Woody, Andy's toys live happily in his ...21.946943/rhIRbceoE9lR4veEXuwCC2wARtG.jpg[{'name': 'Pixar Animation Studios', 'id': 3}][{'iso_3166_1': 'US', 'name': 'United States o...1995-10-30373554033.081.0[{'iso_639_1': 'en', 'name': 'English'}]NaNToy Story
1False65000000[{'id': 12, 'name': 'Adventure'}, {'id': 14, '...8844tt0113497enJumanjiWhen siblings Judy and Peter discover an encha...17.015539/vzmL6fP7aPKNKPRTFnZmiUfciyV.jpg[{'name': 'TriStar Pictures', 'id': 559}, {'na...[{'iso_3166_1': 'US', 'name': 'United States o...1995-12-15262797249.0104.0[{'iso_639_1': 'en', 'name': 'English'}, {'iso...Roll the dice and unleash the excitement!Jumanji
2False0[{'id': 10749, 'name': 'Romance'}, {'id': 35, ...15602tt0113228enGrumpier Old MenA family wedding reignites the ancient feud be...11.7129/6ksm1sjKMFLbO7UY2i6G1ju9SML.jpg[{'name': 'Warner Bros.', 'id': 6194}, {'name'...[{'iso_3166_1': 'US', 'name': 'United States o...1995-12-220.0101.0[{'iso_639_1': 'en', 'name': 'English'}]Still Yelling. Still Fighting. Still Ready for...Grumpier Old Men
3False16000000[{'id': 35, 'name': 'Comedy'}, {'id': 18, 'nam...31357tt0114885enWaiting to ExhaleCheated on, mistreated and stepped on, the wom...3.859495/16XOMpEaLWkrcPqSQqhTmeJuqQl.jpg[{'name': 'Twentieth Century Fox Film Corporat...[{'iso_3166_1': 'US', 'name': 'United States o...1995-12-2281452156.0127.0[{'iso_639_1': 'en', 'name': 'English'}]Friends are the people who let you be yourself...Waiting to Exhale
4False0[{'id': 35, 'name': 'Comedy'}]11862tt0113041enFather of the Bride Part IIJust when George Banks has recovered from his ...8.387519/e64sOI48hQXyru7naBFyssKFxVd.jpg[{'name': 'Sandollar Productions', 'id': 5842}...[{'iso_3166_1': 'US', 'name': 'United States o...1995-02-1076578911.0106.0[{'iso_639_1': 'en', 'name': 'English'}]Just When His World Is Back To Normal... He's ...Father of the Bride Part II
.........................................................
45461False0[{'id': 18, 'name': 'Drama'}, {'id': 10751, 'n...439050tt6209470faرگ خوابRising and falling between a man and woman.0.072051/jldsYflnId4tTWPx8es3uzsB1I8.jpg[][{'iso_3166_1': 'IR', 'name': 'Iran'}]NaN0.090.0[{'iso_639_1': 'fa', 'name': 'فارسی'}]Rising and falling between a man and womanSubdue
45462False0[{'id': 18, 'name': 'Drama'}]111109tt2028550tlSiglo ng PagluluwalAn artist struggles to finish his work while a...0.178241/xZkmxsNmYXJbKVsTRLLx3pqGHx7.jpg[{'name': 'Sine Olivia', 'id': 19653}][{'iso_3166_1': 'PH', 'name': 'Philippines'}]2011-11-170.0360.0[{'iso_639_1': 'tl', 'name': ''}]NaNCentury of Birthing
45463False0[{'id': 28, 'name': 'Action'}, {'id': 18, 'nam...67758tt0303758enBetrayalWhen one of her hits goes wrong, a professiona...0.903007/d5bX92nDsISNhu3ZT69uHwmfCGw.jpg[{'name': 'American World Pictures', 'id': 6165}][{'iso_3166_1': 'US', 'name': 'United States o...2003-08-010.090.0[{'iso_639_1': 'en', 'name': 'English'}]A deadly game of wits.Betrayal
45464False0[]227506tt0008536enSatana likuyushchiyIn a small town live two brothers, one a minis...0.003503/aorBPO7ak8e8iJKT5OcqYxU3jlK.jpg[{'name': 'Yermoliev', 'id': 88753}][{'iso_3166_1': 'RU', 'name': 'Russia'}]1917-10-210.087.0[]NaNSatan Triumphant
45465False0[]461257tt6980792enQueerama50 years after decriminalisation of homosexual...0.163015/s5UkZt6NTsrS7ZF0Rh8nzupRlIU.jpg[][{'iso_3166_1': 'GB', 'name': 'United Kingdom'}]2017-06-090.075.0[{'iso_639_1': 'en', 'name': 'English'}]NaNQueerama
\n", "

45466 rows × 18 columns

\n", "
" ], "text/plain": [ " adult budget genres \\\n", "0 False 30000000 [{'id': 16, 'name': 'Animation'}, {'id': 35, '... \n", "1 False 65000000 [{'id': 12, 'name': 'Adventure'}, {'id': 14, '... \n", "2 False 0 [{'id': 10749, 'name': 'Romance'}, {'id': 35, ... \n", "3 False 16000000 [{'id': 35, 'name': 'Comedy'}, {'id': 18, 'nam... \n", "4 False 0 [{'id': 35, 'name': 'Comedy'}] \n", "... ... ... ... \n", "45461 False 0 [{'id': 18, 'name': 'Drama'}, {'id': 10751, 'n... \n", "45462 False 0 [{'id': 18, 'name': 'Drama'}] \n", "45463 False 0 [{'id': 28, 'name': 'Action'}, {'id': 18, 'nam... \n", "45464 False 0 [] \n", "45465 False 0 [] \n", "\n", " id imdb_id original_language original_title \\\n", "0 862 tt0114709 en Toy Story \n", "1 8844 tt0113497 en Jumanji \n", "2 15602 tt0113228 en Grumpier Old Men \n", "3 31357 tt0114885 en Waiting to Exhale \n", "4 11862 tt0113041 en Father of the Bride Part II \n", "... ... ... ... ... \n", "45461 439050 tt6209470 fa رگ خواب \n", "45462 111109 tt2028550 tl Siglo ng Pagluluwal \n", "45463 67758 tt0303758 en Betrayal \n", "45464 227506 tt0008536 en Satana likuyushchiy \n", "45465 461257 tt6980792 en Queerama \n", "\n", " overview popularity \\\n", "0 Led by Woody, Andy's toys live happily in his ... 21.946943 \n", "1 When siblings Judy and Peter discover an encha... 17.015539 \n", "2 A family wedding reignites the ancient feud be... 11.7129 \n", "3 Cheated on, mistreated and stepped on, the wom... 3.859495 \n", "4 Just when George Banks has recovered from his ... 8.387519 \n", "... ... ... \n", "45461 Rising and falling between a man and woman. 0.072051 \n", "45462 An artist struggles to finish his work while a... 0.178241 \n", "45463 When one of her hits goes wrong, a professiona... 0.903007 \n", "45464 In a small town live two brothers, one a minis... 0.003503 \n", "45465 50 years after decriminalisation of homosexual... 0.163015 \n", "\n", " poster_path \\\n", "0 /rhIRbceoE9lR4veEXuwCC2wARtG.jpg \n", "1 /vzmL6fP7aPKNKPRTFnZmiUfciyV.jpg \n", "2 /6ksm1sjKMFLbO7UY2i6G1ju9SML.jpg \n", "3 /16XOMpEaLWkrcPqSQqhTmeJuqQl.jpg \n", "4 /e64sOI48hQXyru7naBFyssKFxVd.jpg \n", "... ... \n", "45461 /jldsYflnId4tTWPx8es3uzsB1I8.jpg \n", "45462 /xZkmxsNmYXJbKVsTRLLx3pqGHx7.jpg \n", "45463 /d5bX92nDsISNhu3ZT69uHwmfCGw.jpg \n", "45464 /aorBPO7ak8e8iJKT5OcqYxU3jlK.jpg \n", "45465 /s5UkZt6NTsrS7ZF0Rh8nzupRlIU.jpg \n", "\n", " production_companies \\\n", "0 [{'name': 'Pixar Animation Studios', 'id': 3}] \n", "1 [{'name': 'TriStar Pictures', 'id': 559}, {'na... \n", "2 [{'name': 'Warner Bros.', 'id': 6194}, {'name'... \n", "3 [{'name': 'Twentieth Century Fox Film Corporat... \n", "4 [{'name': 'Sandollar Productions', 'id': 5842}... \n", "... ... \n", "45461 [] \n", "45462 [{'name': 'Sine Olivia', 'id': 19653}] \n", "45463 [{'name': 'American World Pictures', 'id': 6165}] \n", "45464 [{'name': 'Yermoliev', 'id': 88753}] \n", "45465 [] \n", "\n", " production_countries release_date \\\n", "0 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-10-30 \n", "1 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-12-15 \n", "2 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-12-22 \n", "3 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-12-22 \n", "4 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-02-10 \n", "... ... ... \n", "45461 [{'iso_3166_1': 'IR', 'name': 'Iran'}] NaN \n", "45462 [{'iso_3166_1': 'PH', 'name': 'Philippines'}] 2011-11-17 \n", "45463 [{'iso_3166_1': 'US', 'name': 'United States o... 2003-08-01 \n", "45464 [{'iso_3166_1': 'RU', 'name': 'Russia'}] 1917-10-21 \n", "45465 [{'iso_3166_1': 'GB', 'name': 'United Kingdom'}] 2017-06-09 \n", "\n", " revenue runtime \\\n", "0 373554033.0 81.0 \n", "1 262797249.0 104.0 \n", "2 0.0 101.0 \n", "3 81452156.0 127.0 \n", "4 76578911.0 106.0 \n", "... ... ... \n", "45461 0.0 90.0 \n", "45462 0.0 360.0 \n", "45463 0.0 90.0 \n", "45464 0.0 87.0 \n", "45465 0.0 75.0 \n", "\n", " spoken_languages \\\n", "0 [{'iso_639_1': 'en', 'name': 'English'}] \n", "1 [{'iso_639_1': 'en', 'name': 'English'}, {'iso... \n", "2 [{'iso_639_1': 'en', 'name': 'English'}] \n", "3 [{'iso_639_1': 'en', 'name': 'English'}] \n", "4 [{'iso_639_1': 'en', 'name': 'English'}] \n", "... ... \n", "45461 [{'iso_639_1': 'fa', 'name': 'فارسی'}] \n", "45462 [{'iso_639_1': 'tl', 'name': ''}] \n", "45463 [{'iso_639_1': 'en', 'name': 'English'}] \n", "45464 [] \n", "45465 [{'iso_639_1': 'en', 'name': 'English'}] \n", "\n", " tagline \\\n", "0 NaN \n", "1 Roll the dice and unleash the excitement! \n", "2 Still Yelling. Still Fighting. Still Ready for... \n", "3 Friends are the people who let you be yourself... \n", "4 Just When His World Is Back To Normal... He's ... \n", "... ... \n", "45461 Rising and falling between a man and woman \n", "45462 NaN \n", "45463 A deadly game of wits. \n", "45464 NaN \n", "45465 NaN \n", "\n", " title \n", "0 Toy Story \n", "1 Jumanji \n", "2 Grumpier Old Men \n", "3 Waiting to Exhale \n", "4 Father of the Bride Part II \n", "... ... \n", "45461 Subdue \n", "45462 Century of Birthing \n", "45463 Betrayal \n", "45464 Satan Triumphant \n", "45465 Queerama \n", "\n", "[45466 rows x 18 columns]" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "code", "execution_count": 23, "id": "0f83fc57-1c94-44a1-a4b1-b51ca334097f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "count 45461\n", "unique 44176\n", "top 0.0\n", "freq 34\n", "Name: popularity, dtype: object" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df['popularity'].describe()" ] }, { "cell_type": "code", "execution_count": 24, "id": "e693550c-9eed-47ed-8de9-402919a59228", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
revenueruntime
count4.546000e+0445203.000000
mean1.120935e+0794.128199
std6.433225e+0738.407810
min0.000000e+000.000000
25%0.000000e+0085.000000
50%0.000000e+0095.000000
75%0.000000e+00107.000000
max2.787965e+091256.000000
\n", "
" ], "text/plain": [ " revenue runtime\n", "count 4.546000e+04 45203.000000\n", "mean 1.120935e+07 94.128199\n", "std 6.433225e+07 38.407810\n", "min 0.000000e+00 0.000000\n", "25% 0.000000e+00 85.000000\n", "50% 0.000000e+00 95.000000\n", "75% 0.000000e+00 107.000000\n", "max 2.787965e+09 1256.000000" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.describe()" ] }, { "cell_type": "code", "execution_count": null, "id": "9ae3ea42-2343-4f8a-9740-adf7a11d7d5f", "metadata": {}, "outputs": [], "source": [ "df.drop(" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.14" } }, "nbformat": 4, "nbformat_minor": 5 }