From 606ef92a1e17a16e620a34d4f88407b61fb61853 Mon Sep 17 00:00:00 2001 From: Silvia Martinez Valero Date: Sat, 28 Oct 2023 14:07:53 +0200 Subject: [PATCH 1/4] pandas-apply-lambdas-challenges1y2 --- ...andas_Apply_Lambdas] Silvia Martinez.ipynb | 1190 +++++++++++++++++ notebooks/your_code_here.ipynb | 81 -- 2 files changed, 1190 insertions(+), 81 deletions(-) create mode 100644 notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb delete mode 100644 notebooks/your_code_here.ipynb diff --git a/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb b/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb new file mode 100644 index 0000000..90528ff --- /dev/null +++ b/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb @@ -0,0 +1,1190 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "280006e6", + "metadata": {}, + "source": [ + "### Pandas Apply Lambda\n", + "\n", + "Always remember the Zen of Python!!!" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "d3c3dd76", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "2c578f42", + "metadata": {}, + "outputs": [], + "source": [ + "df = pd.read_csv(\"../data/input/IMDB-Movie-Data.csv\")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "6504b944", + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)Metascore
01Guardians of the GalaxyAction,Adventure,Sci-FiA group of intergalactic criminals are forced ...James GunnChris Pratt, Vin Diesel, Bradley Cooper, Zoe S...20141218.1757074333.1376.0
12PrometheusAdventure,Mystery,Sci-FiFollowing clues to the origin of mankind, a te...Ridley ScottNoomi Rapace, Logan Marshall-Green, Michael Fa...20121247.0485820126.4665.0
23SplitHorror,ThrillerThree girls are kidnapped by a man with a diag...M. Night ShyamalanJames McAvoy, Anya Taylor-Joy, Haley Lu Richar...20161177.3157606138.1262.0
34SingAnimation,Comedy,FamilyIn a city of humanoid animals, a hustling thea...Christophe LourdeletMatthew McConaughey,Reese Witherspoon, Seth Ma...20161087.260545270.3259.0
45Suicide SquadAction,Adventure,FantasyA secret government agency recruits some of th...David AyerWill Smith, Jared Leto, Margot Robbie, Viola D...20161236.2393727325.0240.0
56The Great WallAction,Adventure,FantasyEuropean mercenaries searching for black powde...Yimou ZhangMatt Damon, Tian Jing, Willem Dafoe, Andy Lau20161036.15603645.1342.0
67La La LandComedy,Drama,MusicA jazz pianist falls for an aspiring actress i...Damien ChazelleRyan Gosling, Emma Stone, Rosemarie DeWitt, J....20161288.3258682151.0693.0
78MindhornComedyA has-been actor best known for playing the ti...Sean FoleyEssie Davis, Andrea Riseborough, Julian Barrat...2016896.42490NaN71.0
89The Lost City of ZAction,Adventure,BiographyA true-life drama, centering on British explor...James GrayCharlie Hunnam, Robert Pattinson, Sienna Mille...20161417.171888.0178.0
910PassengersAdventure,Drama,RomanceA spacecraft traveling to a distant colony pla...Morten TyldumJennifer Lawrence, Chris Pratt, Michael Sheen,...20161167.0192177100.0141.0
\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + "5 6 The Great Wall Action,Adventure,Fantasy \n", + "6 7 La La Land Comedy,Drama,Music \n", + "7 8 Mindhorn Comedy \n", + "8 9 The Lost City of Z Action,Adventure,Biography \n", + "9 10 Passengers Adventure,Drama,Romance \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + "5 European mercenaries searching for black powde... Yimou Zhang \n", + "6 A jazz pianist falls for an aspiring actress i... Damien Chazelle \n", + "7 A has-been actor best known for playing the ti... Sean Foley \n", + "8 A true-life drama, centering on British explor... James Gray \n", + "9 A spacecraft traveling to a distant colony pla... Morten Tyldum \n", + "\n", + " Actors Year Runtime (Minutes) \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 121 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 124 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 117 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 108 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 123 \n", + "5 Matt Damon, Tian Jing, Willem Dafoe, Andy Lau 2016 103 \n", + "6 Ryan Gosling, Emma Stone, Rosemarie DeWitt, J.... 2016 128 \n", + "7 Essie Davis, Andrea Riseborough, Julian Barrat... 2016 89 \n", + "8 Charlie Hunnam, Robert Pattinson, Sienna Mille... 2016 141 \n", + "9 Jennifer Lawrence, Chris Pratt, Michael Sheen,... 2016 116 \n", + "\n", + " Rating Votes Revenue (Millions) Metascore \n", + "0 8.1 757074 333.13 76.0 \n", + "1 7.0 485820 126.46 65.0 \n", + "2 7.3 157606 138.12 62.0 \n", + "3 7.2 60545 270.32 59.0 \n", + "4 6.2 393727 325.02 40.0 \n", + "5 6.1 56036 45.13 42.0 \n", + "6 8.3 258682 151.06 93.0 \n", + "7 6.4 2490 NaN 71.0 \n", + "8 7.1 7188 8.01 78.0 \n", + "9 7.0 192177 100.01 41.0 " + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.head(10)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "bf6b244f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 1000 entries, 0 to 999\n", + "Data columns (total 12 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 Rank 1000 non-null int64 \n", + " 1 Title 1000 non-null object \n", + " 2 Genre 1000 non-null object \n", + " 3 Description 1000 non-null object \n", + " 4 Director 1000 non-null object \n", + " 5 Actors 1000 non-null object \n", + " 6 Year 1000 non-null int64 \n", + " 7 Runtime (Minutes) 1000 non-null int64 \n", + " 8 Rating 1000 non-null float64\n", + " 9 Votes 1000 non-null int64 \n", + " 10 Revenue (Millions) 872 non-null float64\n", + " 11 Metascore 936 non-null float64\n", + "dtypes: float64(3), int64(4), object(5)\n", + "memory usage: 93.9+ KB\n" + ] + } + ], + "source": [ + "df.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "9c77ffb1", + "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", + "
RankYearRuntime (Minutes)RatingVotesRevenue (Millions)Metascore
count1000.0000001000.0000001000.0000001000.0000001.000000e+03872.000000936.000000
mean500.5000002012.783000113.1720006.7232001.698083e+0582.95637658.985043
std288.8194363.20596218.8109080.9454291.887626e+05103.25354017.194757
min1.0000002006.00000066.0000001.9000006.100000e+010.00000011.000000
25%250.7500002010.000000100.0000006.2000003.630900e+0413.27000047.000000
50%500.5000002014.000000111.0000006.8000001.107990e+0547.98500059.500000
75%750.2500002016.000000123.0000007.4000002.399098e+05113.71500072.000000
max1000.0000002016.000000191.0000009.0000001.791916e+06936.630000100.000000
\n", + "
" + ], + "text/plain": [ + " Rank Year Runtime (Minutes) Rating Votes \\\n", + "count 1000.000000 1000.000000 1000.000000 1000.000000 1.000000e+03 \n", + "mean 500.500000 2012.783000 113.172000 6.723200 1.698083e+05 \n", + "std 288.819436 3.205962 18.810908 0.945429 1.887626e+05 \n", + "min 1.000000 2006.000000 66.000000 1.900000 6.100000e+01 \n", + "25% 250.750000 2010.000000 100.000000 6.200000 3.630900e+04 \n", + "50% 500.500000 2014.000000 111.000000 6.800000 1.107990e+05 \n", + "75% 750.250000 2016.000000 123.000000 7.400000 2.399098e+05 \n", + "max 1000.000000 2016.000000 191.000000 9.000000 1.791916e+06 \n", + "\n", + " Revenue (Millions) Metascore \n", + "count 872.000000 936.000000 \n", + "mean 82.956376 58.985043 \n", + "std 103.253540 17.194757 \n", + "min 0.000000 11.000000 \n", + "25% 13.270000 47.000000 \n", + "50% 47.985000 59.500000 \n", + "75% 113.715000 72.000000 \n", + "max 936.630000 100.000000 " + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.describe()" + ] + }, + { + "cell_type": "markdown", + "id": "d5d05749", + "metadata": {}, + "source": [ + "## Challenge 1. Using a single argument" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "0e329800", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'cat_2'" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "def bins(votes):\n", + " if votes >= 0 and votes <= 999:\n", + " return \"cat_1\"\n", + " elif votes >= 1000 and votes <= 9999:\n", + " return \"cat_2\"\n", + " elif votes >= 10000 and votes <= 99999:\n", + " return \"cat_3\"\n", + " elif votes >= 100000 and votes <= 999999:\n", + " return \"cat_4\"\n", + " elif votes >= 1000000:\n", + " return \"cat_5\"\n", + " \n", + "bins(1000)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "35fc08c9", + "metadata": {}, + "outputs": [], + "source": [ + "df[\"Bin\"] = df.apply(lambda x: bins(x[\"Votes\"]), axis = 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "af83288a", + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBin
01Guardians of the GalaxyAction,Adventure,Sci-FiA group of intergalactic criminals are forced ...James GunnChris Pratt, Vin Diesel, Bradley Cooper, Zoe S...20141218.1757074333.1376.0cat_4
12PrometheusAdventure,Mystery,Sci-FiFollowing clues to the origin of mankind, a te...Ridley ScottNoomi Rapace, Logan Marshall-Green, Michael Fa...20121247.0485820126.4665.0cat_4
23SplitHorror,ThrillerThree girls are kidnapped by a man with a diag...M. Night ShyamalanJames McAvoy, Anya Taylor-Joy, Haley Lu Richar...20161177.3157606138.1262.0cat_4
34SingAnimation,Comedy,FamilyIn a city of humanoid animals, a hustling thea...Christophe LourdeletMatthew McConaughey,Reese Witherspoon, Seth Ma...20161087.260545270.3259.0cat_3
45Suicide SquadAction,Adventure,FantasyA secret government agency recruits some of th...David AyerWill Smith, Jared Leto, Margot Robbie, Viola D...20161236.2393727325.0240.0cat_4
..........................................
995996Secret in Their EyesCrime,Drama,MysteryA tight-knit team of rising investigators, alo...Billy RayChiwetel Ejiofor, Nicole Kidman, Julia Roberts...20151116.227585NaN45.0cat_3
996997Hostel: Part IIHorrorThree American college students studying abroa...Eli RothLauren German, Heather Matarazzo, Bijou Philli...2007945.57315217.5446.0cat_3
997998Step Up 2: The StreetsDrama,Music,RomanceRomantic sparks occur between two dance studen...Jon M. ChuRobert Hoffman, Briana Evigan, Cassie Ventura,...2008986.27069958.0150.0cat_3
998999Search PartyAdventure,ComedyA pair of friends embark on a mission to reuni...Scot ArmstrongAdam Pally, T.J. Miller, Thomas Middleditch,Sh...2014935.64881NaN22.0cat_2
9991000Nine LivesComedy,Family,FantasyA stuffy businessman finds himself trapped ins...Barry SonnenfeldKevin Spacey, Jennifer Garner, Robbie Amell,Ch...2016875.31243519.6411.0cat_3
\n", + "

1000 rows × 13 columns

\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + ".. ... ... ... \n", + "995 996 Secret in Their Eyes Crime,Drama,Mystery \n", + "996 997 Hostel: Part II Horror \n", + "997 998 Step Up 2: The Streets Drama,Music,Romance \n", + "998 999 Search Party Adventure,Comedy \n", + "999 1000 Nine Lives Comedy,Family,Fantasy \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + ".. ... ... \n", + "995 A tight-knit team of rising investigators, alo... Billy Ray \n", + "996 Three American college students studying abroa... Eli Roth \n", + "997 Romantic sparks occur between two dance studen... Jon M. Chu \n", + "998 A pair of friends embark on a mission to reuni... Scot Armstrong \n", + "999 A stuffy businessman finds himself trapped ins... Barry Sonnenfeld \n", + "\n", + " Actors Year \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 \n", + ".. ... ... \n", + "995 Chiwetel Ejiofor, Nicole Kidman, Julia Roberts... 2015 \n", + "996 Lauren German, Heather Matarazzo, Bijou Philli... 2007 \n", + "997 Robert Hoffman, Briana Evigan, Cassie Ventura,... 2008 \n", + "998 Adam Pally, T.J. Miller, Thomas Middleditch,Sh... 2014 \n", + "999 Kevin Spacey, Jennifer Garner, Robbie Amell,Ch... 2016 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \n", + "0 121 8.1 757074 333.13 76.0 cat_4 \n", + "1 124 7.0 485820 126.46 65.0 cat_4 \n", + "2 117 7.3 157606 138.12 62.0 cat_4 \n", + "3 108 7.2 60545 270.32 59.0 cat_3 \n", + "4 123 6.2 393727 325.02 40.0 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "995 111 6.2 27585 NaN 45.0 cat_3 \n", + "996 94 5.5 73152 17.54 46.0 cat_3 \n", + "997 98 6.2 70699 58.01 50.0 cat_3 \n", + "998 93 5.6 4881 NaN 22.0 cat_2 \n", + "999 87 5.3 12435 19.64 11.0 cat_3 \n", + "\n", + "[1000 rows x 13 columns]" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "markdown", + "id": "d75e12ce", + "metadata": {}, + "source": [ + "## Challenge 2. Using 2 arguments" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "4a2a6a6e", + "metadata": {}, + "outputs": [], + "source": [ + "def revenue_minute(revenue, minute):\n", + " return revenue / minute" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "e702cb7b", + "metadata": {}, + "outputs": [], + "source": [ + "df[\"Revenue per Minute\"] = df.apply(lambda x: revenue_minute(x[\"Revenue (Millions)\"], x[\"Runtime (Minutes)\"]), axis = 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "fffa468a", + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBinRevenue per Minute
01Guardians of the GalaxyAction,Adventure,Sci-FiA group of intergalactic criminals are forced ...James GunnChris Pratt, Vin Diesel, Bradley Cooper, Zoe S...20141218.1757074333.1376.0cat_42.753140
12PrometheusAdventure,Mystery,Sci-FiFollowing clues to the origin of mankind, a te...Ridley ScottNoomi Rapace, Logan Marshall-Green, Michael Fa...20121247.0485820126.4665.0cat_41.019839
23SplitHorror,ThrillerThree girls are kidnapped by a man with a diag...M. Night ShyamalanJames McAvoy, Anya Taylor-Joy, Haley Lu Richar...20161177.3157606138.1262.0cat_41.180513
34SingAnimation,Comedy,FamilyIn a city of humanoid animals, a hustling thea...Christophe LourdeletMatthew McConaughey,Reese Witherspoon, Seth Ma...20161087.260545270.3259.0cat_32.502963
45Suicide SquadAction,Adventure,FantasyA secret government agency recruits some of th...David AyerWill Smith, Jared Leto, Margot Robbie, Viola D...20161236.2393727325.0240.0cat_42.642439
.............................................
995996Secret in Their EyesCrime,Drama,MysteryA tight-knit team of rising investigators, alo...Billy RayChiwetel Ejiofor, Nicole Kidman, Julia Roberts...20151116.227585NaN45.0cat_3NaN
996997Hostel: Part IIHorrorThree American college students studying abroa...Eli RothLauren German, Heather Matarazzo, Bijou Philli...2007945.57315217.5446.0cat_30.186596
997998Step Up 2: The StreetsDrama,Music,RomanceRomantic sparks occur between two dance studen...Jon M. ChuRobert Hoffman, Briana Evigan, Cassie Ventura,...2008986.27069958.0150.0cat_30.591939
998999Search PartyAdventure,ComedyA pair of friends embark on a mission to reuni...Scot ArmstrongAdam Pally, T.J. Miller, Thomas Middleditch,Sh...2014935.64881NaN22.0cat_2NaN
9991000Nine LivesComedy,Family,FantasyA stuffy businessman finds himself trapped ins...Barry SonnenfeldKevin Spacey, Jennifer Garner, Robbie Amell,Ch...2016875.31243519.6411.0cat_30.225747
\n", + "

1000 rows × 14 columns

\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + ".. ... ... ... \n", + "995 996 Secret in Their Eyes Crime,Drama,Mystery \n", + "996 997 Hostel: Part II Horror \n", + "997 998 Step Up 2: The Streets Drama,Music,Romance \n", + "998 999 Search Party Adventure,Comedy \n", + "999 1000 Nine Lives Comedy,Family,Fantasy \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + ".. ... ... \n", + "995 A tight-knit team of rising investigators, alo... Billy Ray \n", + "996 Three American college students studying abroa... Eli Roth \n", + "997 Romantic sparks occur between two dance studen... Jon M. Chu \n", + "998 A pair of friends embark on a mission to reuni... Scot Armstrong \n", + "999 A stuffy businessman finds himself trapped ins... Barry Sonnenfeld \n", + "\n", + " Actors Year \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 \n", + ".. ... ... \n", + "995 Chiwetel Ejiofor, Nicole Kidman, Julia Roberts... 2015 \n", + "996 Lauren German, Heather Matarazzo, Bijou Philli... 2007 \n", + "997 Robert Hoffman, Briana Evigan, Cassie Ventura,... 2008 \n", + "998 Adam Pally, T.J. Miller, Thomas Middleditch,Sh... 2014 \n", + "999 Kevin Spacey, Jennifer Garner, Robbie Amell,Ch... 2016 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "0 121 8.1 757074 333.13 76.0 cat_4 \n", + "1 124 7.0 485820 126.46 65.0 cat_4 \n", + "2 117 7.3 157606 138.12 62.0 cat_4 \n", + "3 108 7.2 60545 270.32 59.0 cat_3 \n", + "4 123 6.2 393727 325.02 40.0 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "995 111 6.2 27585 NaN 45.0 cat_3 \n", + "996 94 5.5 73152 17.54 46.0 cat_3 \n", + "997 98 6.2 70699 58.01 50.0 cat_3 \n", + "998 93 5.6 4881 NaN 22.0 cat_2 \n", + "999 87 5.3 12435 19.64 11.0 cat_3 \n", + "\n", + " Revenue per Minute \n", + "0 2.753140 \n", + "1 1.019839 \n", + "2 1.180513 \n", + "3 2.502963 \n", + "4 2.642439 \n", + ".. ... \n", + "995 NaN \n", + "996 0.186596 \n", + "997 0.591939 \n", + "998 NaN \n", + "999 0.225747 \n", + "\n", + "[1000 rows x 14 columns]" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c2c89286", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python (jupyter_env)", + "language": "python", + "name": "jupyter_env" + }, + "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.10.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/your_code_here.ipynb b/notebooks/your_code_here.ipynb deleted file mode 100644 index f60a09e..0000000 --- a/notebooks/your_code_here.ipynb +++ /dev/null @@ -1,81 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "280006e6", - "metadata": {}, - "source": [ - "### Pandas Apply Lambda\n", - "\n", - "Always remember the Zen of Python!!!" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "ace6da70", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The Zen of Python, by Tim Peters\n", - "\n", - "Beautiful is better than ugly.\n", - "Explicit is better than implicit.\n", - "Simple is better than complex.\n", - "Complex is better than complicated.\n", - "Flat is better than nested.\n", - "Sparse is better than dense.\n", - "Readability counts.\n", - "Special cases aren't special enough to break the rules.\n", - "Although practicality beats purity.\n", - "Errors should never pass silently.\n", - "Unless explicitly silenced.\n", - "In the face of ambiguity, refuse the temptation to guess.\n", - "There should be one-- and preferably only one --obvious way to do it.\n", - "Although that way may not be obvious at first unless you're Dutch.\n", - "Now is better than never.\n", - "Although never is often better than *right* now.\n", - "If the implementation is hard to explain, it's a bad idea.\n", - "If the implementation is easy to explain, it may be a good idea.\n", - "Namespaces are one honking great idea -- let's do more of those!\n" - ] - } - ], - "source": [ - "import this" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d3c3dd76", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python [conda env:.conda-m1_env]", - "language": "python", - "name": "conda-env-.conda-m1_env-py" - }, - "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.9.16" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} From c6176bc36cca6d25a393e3fb0817a228a668aaad Mon Sep 17 00:00:00 2001 From: Silvia Martinez Valero Date: Sat, 28 Oct 2023 14:38:11 +0200 Subject: [PATCH 2/4] pandas-apply-lambdas-challenge1,2,3 --- ...andas_Apply_Lambdas] Silvia Martinez.ipynb | 705 +++++++++++++++++- 1 file changed, 689 insertions(+), 16 deletions(-) diff --git a/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb b/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb index 90528ff..9ae8b95 100644 --- a/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb +++ b/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb @@ -23,7 +23,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "2c578f42", "metadata": {}, "outputs": [], @@ -33,7 +33,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 3, "id": "6504b944", "metadata": {}, "outputs": [ @@ -277,7 +277,7 @@ "9 7.0 192177 100.01 41.0 " ] }, - "execution_count": 5, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -288,7 +288,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 4, "id": "bf6b244f", "metadata": {}, "outputs": [ @@ -324,7 +324,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 5, "id": "9c77ffb1", "metadata": {}, "outputs": [ @@ -465,7 +465,7 @@ "max 936.630000 100.000000 " ] }, - "execution_count": 7, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -484,7 +484,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 6, "id": "0e329800", "metadata": {}, "outputs": [ @@ -494,7 +494,7 @@ "'cat_2'" ] }, - "execution_count": 15, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -517,7 +517,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 7, "id": "35fc08c9", "metadata": {}, "outputs": [], @@ -527,7 +527,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 8, "id": "af83288a", "metadata": {}, "outputs": [ @@ -805,7 +805,7 @@ "[1000 rows x 13 columns]" ] }, - "execution_count": 18, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -824,7 +824,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 9, "id": "4a2a6a6e", "metadata": {}, "outputs": [], @@ -835,7 +835,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 10, "id": "e702cb7b", "metadata": {}, "outputs": [], @@ -845,7 +845,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 11, "id": "fffa468a", "metadata": {}, "outputs": [ @@ -1148,7 +1148,680 @@ "[1000 rows x 14 columns]" ] }, - "execution_count": 22, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "markdown", + "id": "47c2531c", + "metadata": {}, + "source": [ + "## Challenge 3. A bit more complicated" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "47fe1029", + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBinRevenue per Minute
01Guardians of the GalaxyAction,Adventure,Sci-FiA group of intergalactic criminals are forced ...James GunnChris Pratt, Vin Diesel, Bradley Cooper, Zoe S...20141218.1757074333.1376.0cat_42.753140
12PrometheusAdventure,Mystery,Sci-FiFollowing clues to the origin of mankind, a te...Ridley ScottNoomi Rapace, Logan Marshall-Green, Michael Fa...20121247.0485820126.4665.0cat_41.019839
23SplitHorror,ThrillerThree girls are kidnapped by a man with a diag...M. Night ShyamalanJames McAvoy, Anya Taylor-Joy, Haley Lu Richar...20161177.3157606138.1262.0cat_41.180513
34SingAnimation,Comedy,FamilyIn a city of humanoid animals, a hustling thea...Christophe LourdeletMatthew McConaughey,Reese Witherspoon, Seth Ma...20161087.260545270.3259.0cat_32.502963
45Suicide SquadAction,Adventure,FantasyA secret government agency recruits some of th...David AyerWill Smith, Jared Leto, Margot Robbie, Viola D...20161236.2393727325.0240.0cat_42.642439
.............................................
995996Secret in Their EyesCrime,Drama,MysteryA tight-knit team of rising investigators, alo...Billy RayChiwetel Ejiofor, Nicole Kidman, Julia Roberts...20151116.227585NaN45.0cat_3NaN
996997Hostel: Part IIHorrorThree American college students studying abroa...Eli RothLauren German, Heather Matarazzo, Bijou Philli...2007945.57315217.5446.0cat_30.186596
997998Step Up 2: The StreetsDrama,Music,RomanceRomantic sparks occur between two dance studen...Jon M. ChuRobert Hoffman, Briana Evigan, Cassie Ventura,...2008986.27069958.0150.0cat_30.591939
998999Search PartyAdventure,ComedyA pair of friends embark on a mission to reuni...Scot ArmstrongAdam Pally, T.J. Miller, Thomas Middleditch,Sh...2014935.64881NaN22.0cat_2NaN
9991000Nine LivesComedy,Family,FantasyA stuffy businessman finds himself trapped ins...Barry SonnenfeldKevin Spacey, Jennifer Garner, Robbie Amell,Ch...2016875.31243519.6411.0cat_30.225747
\n", + "

1000 rows × 14 columns

\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + ".. ... ... ... \n", + "995 996 Secret in Their Eyes Crime,Drama,Mystery \n", + "996 997 Hostel: Part II Horror \n", + "997 998 Step Up 2: The Streets Drama,Music,Romance \n", + "998 999 Search Party Adventure,Comedy \n", + "999 1000 Nine Lives Comedy,Family,Fantasy \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + ".. ... ... \n", + "995 A tight-knit team of rising investigators, alo... Billy Ray \n", + "996 Three American college students studying abroa... Eli Roth \n", + "997 Romantic sparks occur between two dance studen... Jon M. Chu \n", + "998 A pair of friends embark on a mission to reuni... Scot Armstrong \n", + "999 A stuffy businessman finds himself trapped ins... Barry Sonnenfeld \n", + "\n", + " Actors Year \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 \n", + ".. ... ... \n", + "995 Chiwetel Ejiofor, Nicole Kidman, Julia Roberts... 2015 \n", + "996 Lauren German, Heather Matarazzo, Bijou Philli... 2007 \n", + "997 Robert Hoffman, Briana Evigan, Cassie Ventura,... 2008 \n", + "998 Adam Pally, T.J. Miller, Thomas Middleditch,Sh... 2014 \n", + "999 Kevin Spacey, Jennifer Garner, Robbie Amell,Ch... 2016 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "0 121 8.1 757074 333.13 76.0 cat_4 \n", + "1 124 7.0 485820 126.46 65.0 cat_4 \n", + "2 117 7.3 157606 138.12 62.0 cat_4 \n", + "3 108 7.2 60545 270.32 59.0 cat_3 \n", + "4 123 6.2 393727 325.02 40.0 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "995 111 6.2 27585 NaN 45.0 cat_3 \n", + "996 94 5.5 73152 17.54 46.0 cat_3 \n", + "997 98 6.2 70699 58.01 50.0 cat_3 \n", + "998 93 5.6 4881 NaN 22.0 cat_2 \n", + "999 87 5.3 12435 19.64 11.0 cat_3 \n", + "\n", + " Revenue per Minute \n", + "0 2.753140 \n", + "1 1.019839 \n", + "2 1.180513 \n", + "3 2.502963 \n", + "4 2.642439 \n", + ".. ... \n", + "995 NaN \n", + "996 0.186596 \n", + "997 0.591939 \n", + "998 NaN \n", + "999 0.225747 \n", + "\n", + "[1000 rows x 14 columns]" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "fa346936", + "metadata": {}, + "outputs": [], + "source": [ + "def new_rating(genre, rating):\n", + " if \"thriller\" in genre.lower():\n", + " rating = rating + 1\n", + " elif \"comedy\" in genre.lower():\n", + " rating = rating -1\n", + " return rating" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "785f6324", + "metadata": {}, + "outputs": [], + "source": [ + "df[\"New Rating\"] = df.apply(lambda x: new_rating(x[\"Genre\"], x[\"Rating\"]), axis = 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "9ea130d3", + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBinRevenue per MinuteNew Rating
01Guardians of the GalaxyAction,Adventure,Sci-FiA group of intergalactic criminals are forced ...James GunnChris Pratt, Vin Diesel, Bradley Cooper, Zoe S...20141218.1757074333.1376.0cat_42.7531408.1
12PrometheusAdventure,Mystery,Sci-FiFollowing clues to the origin of mankind, a te...Ridley ScottNoomi Rapace, Logan Marshall-Green, Michael Fa...20121247.0485820126.4665.0cat_41.0198397.0
23SplitHorror,ThrillerThree girls are kidnapped by a man with a diag...M. Night ShyamalanJames McAvoy, Anya Taylor-Joy, Haley Lu Richar...20161177.3157606138.1262.0cat_41.1805138.3
34SingAnimation,Comedy,FamilyIn a city of humanoid animals, a hustling thea...Christophe LourdeletMatthew McConaughey,Reese Witherspoon, Seth Ma...20161087.260545270.3259.0cat_32.5029636.2
45Suicide SquadAction,Adventure,FantasyA secret government agency recruits some of th...David AyerWill Smith, Jared Leto, Margot Robbie, Viola D...20161236.2393727325.0240.0cat_42.6424396.2
................................................
995996Secret in Their EyesCrime,Drama,MysteryA tight-knit team of rising investigators, alo...Billy RayChiwetel Ejiofor, Nicole Kidman, Julia Roberts...20151116.227585NaN45.0cat_3NaN6.2
996997Hostel: Part IIHorrorThree American college students studying abroa...Eli RothLauren German, Heather Matarazzo, Bijou Philli...2007945.57315217.5446.0cat_30.1865965.5
997998Step Up 2: The StreetsDrama,Music,RomanceRomantic sparks occur between two dance studen...Jon M. ChuRobert Hoffman, Briana Evigan, Cassie Ventura,...2008986.27069958.0150.0cat_30.5919396.2
998999Search PartyAdventure,ComedyA pair of friends embark on a mission to reuni...Scot ArmstrongAdam Pally, T.J. Miller, Thomas Middleditch,Sh...2014935.64881NaN22.0cat_2NaN4.6
9991000Nine LivesComedy,Family,FantasyA stuffy businessman finds himself trapped ins...Barry SonnenfeldKevin Spacey, Jennifer Garner, Robbie Amell,Ch...2016875.31243519.6411.0cat_30.2257474.3
\n", + "

1000 rows × 15 columns

\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + ".. ... ... ... \n", + "995 996 Secret in Their Eyes Crime,Drama,Mystery \n", + "996 997 Hostel: Part II Horror \n", + "997 998 Step Up 2: The Streets Drama,Music,Romance \n", + "998 999 Search Party Adventure,Comedy \n", + "999 1000 Nine Lives Comedy,Family,Fantasy \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + ".. ... ... \n", + "995 A tight-knit team of rising investigators, alo... Billy Ray \n", + "996 Three American college students studying abroa... Eli Roth \n", + "997 Romantic sparks occur between two dance studen... Jon M. Chu \n", + "998 A pair of friends embark on a mission to reuni... Scot Armstrong \n", + "999 A stuffy businessman finds himself trapped ins... Barry Sonnenfeld \n", + "\n", + " Actors Year \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 \n", + ".. ... ... \n", + "995 Chiwetel Ejiofor, Nicole Kidman, Julia Roberts... 2015 \n", + "996 Lauren German, Heather Matarazzo, Bijou Philli... 2007 \n", + "997 Robert Hoffman, Briana Evigan, Cassie Ventura,... 2008 \n", + "998 Adam Pally, T.J. Miller, Thomas Middleditch,Sh... 2014 \n", + "999 Kevin Spacey, Jennifer Garner, Robbie Amell,Ch... 2016 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "0 121 8.1 757074 333.13 76.0 cat_4 \n", + "1 124 7.0 485820 126.46 65.0 cat_4 \n", + "2 117 7.3 157606 138.12 62.0 cat_4 \n", + "3 108 7.2 60545 270.32 59.0 cat_3 \n", + "4 123 6.2 393727 325.02 40.0 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "995 111 6.2 27585 NaN 45.0 cat_3 \n", + "996 94 5.5 73152 17.54 46.0 cat_3 \n", + "997 98 6.2 70699 58.01 50.0 cat_3 \n", + "998 93 5.6 4881 NaN 22.0 cat_2 \n", + "999 87 5.3 12435 19.64 11.0 cat_3 \n", + "\n", + " Revenue per Minute New Rating \n", + "0 2.753140 8.1 \n", + "1 1.019839 7.0 \n", + "2 1.180513 8.3 \n", + "3 2.502963 6.2 \n", + "4 2.642439 6.2 \n", + ".. ... ... \n", + "995 NaN 6.2 \n", + "996 0.186596 5.5 \n", + "997 0.591939 6.2 \n", + "998 NaN 4.6 \n", + "999 0.225747 4.3 \n", + "\n", + "[1000 rows x 15 columns]" + ] + }, + "execution_count": 51, "metadata": {}, "output_type": "execute_result" } @@ -1160,7 +1833,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c2c89286", + "id": "06325fc8", "metadata": {}, "outputs": [], "source": [] From 1b73dfda33c8d5ea49ca315a1ff9424bc2966812 Mon Sep 17 00:00:00 2001 From: Silvia Martinez Valero Date: Sun, 29 Oct 2023 00:12:12 +0200 Subject: [PATCH 3/4] challenges 1,2,3,4 --- ...andas_Apply_Lambdas] Silvia Martinez.ipynb | 2007 ++++++++++++++++- 1 file changed, 2002 insertions(+), 5 deletions(-) diff --git a/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb b/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb index 9ae8b95..973f8f1 100644 --- a/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb +++ b/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb @@ -1481,7 +1481,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 13, "id": "fa346936", "metadata": {}, "outputs": [], @@ -1496,7 +1496,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 14, "id": "785f6324", "metadata": {}, "outputs": [], @@ -1506,7 +1506,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 15, "id": "9ea130d3", "metadata": {}, "outputs": [ @@ -1821,7 +1821,7 @@ "[1000 rows x 15 columns]" ] }, - "execution_count": 51, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -1830,10 +1830,2007 @@ "df" ] }, + { + "cell_type": "markdown", + "id": "ef54ae50", + "metadata": {}, + "source": [ + "## Challenge 4. A bit too weird..." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "734632a9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "def prime(movie_title, votes):\n", + " ascii_movie = []\n", + " def criba_eratostenes(n): #Definimos una función para determinar si el número es o no primo siguiendo el método de la criba de eratóstenes.\n", + " primos = []\n", + " no_primos = []\n", + " for i in range(2, n + 1):\n", + " if i not in no_primos:\n", + " primos.append(i)\n", + " for j in range(i * i, n + 1, i):\n", + " no_primos.append(j)\n", + " if n in primos:\n", + " return True\n", + " else:\n", + " return False\n", + " for i in movie_title:\n", + " ascii_movie.append(ord(i))\n", + " number = int((sum(ascii_movie)) / votes)\n", + " if criba_eratostenes(number) == True:\n", + " return True\n", + " else:\n", + " return False\n", + " \n", + " \n", + "prime(\"Hola caracola\", 90)" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "21af3d36", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "def criba_eratostenes(n): #Definimos una función para determinar si el número es o no primo siguiendo el método de la criba de eratóstenes.\n", + " primos = []\n", + " no_primos = []\n", + " for i in range(2, n + 1):\n", + " if i not in no_primos:\n", + " primos.append(i)\n", + "\n", + " for j in range(i * i, n + 1, i):\n", + " no_primos.append(j)\n", + " if n in primos:\n", + " return True\n", + " else:\n", + " return False\n", + " \n", + "criba_eratostenes(23)\n", + "\n", + "#Dejo la función sola para comprobar que funciona (es muy difícil que coincida en el dataset, aunque da True en el 45, por ejemplo.)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "aa57e8fa", + "metadata": {}, + "outputs": [], + "source": [ + "df[\"Is Prime?\"] = df.apply(lambda x: prime(x[\"Title\"], x[\"Votes\"]), axis = 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "70ffb2f0", + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBinRevenue per MinuteNew RatingIs Prime?
01Guardians of the GalaxyAction,Adventure,Sci-FiA group of intergalactic criminals are forced ...James GunnChris Pratt, Vin Diesel, Bradley Cooper, Zoe S...20141218.1757074333.1376.0cat_42.7531408.1False
12PrometheusAdventure,Mystery,Sci-FiFollowing clues to the origin of mankind, a te...Ridley ScottNoomi Rapace, Logan Marshall-Green, Michael Fa...20121247.0485820126.4665.0cat_41.0198397.0False
23SplitHorror,ThrillerThree girls are kidnapped by a man with a diag...M. Night ShyamalanJames McAvoy, Anya Taylor-Joy, Haley Lu Richar...20161177.3157606138.1262.0cat_41.1805138.3False
34SingAnimation,Comedy,FamilyIn a city of humanoid animals, a hustling thea...Christophe LourdeletMatthew McConaughey,Reese Witherspoon, Seth Ma...20161087.260545270.3259.0cat_32.5029636.2False
45Suicide SquadAction,Adventure,FantasyA secret government agency recruits some of th...David AyerWill Smith, Jared Leto, Margot Robbie, Viola D...20161236.2393727325.0240.0cat_42.6424396.2False
...................................................
995996Secret in Their EyesCrime,Drama,MysteryA tight-knit team of rising investigators, alo...Billy RayChiwetel Ejiofor, Nicole Kidman, Julia Roberts...20151116.227585NaN45.0cat_3NaN6.2False
996997Hostel: Part IIHorrorThree American college students studying abroa...Eli RothLauren German, Heather Matarazzo, Bijou Philli...2007945.57315217.5446.0cat_30.1865965.5False
997998Step Up 2: The StreetsDrama,Music,RomanceRomantic sparks occur between two dance studen...Jon M. ChuRobert Hoffman, Briana Evigan, Cassie Ventura,...2008986.27069958.0150.0cat_30.5919396.2False
998999Search PartyAdventure,ComedyA pair of friends embark on a mission to reuni...Scot ArmstrongAdam Pally, T.J. Miller, Thomas Middleditch,Sh...2014935.64881NaN22.0cat_2NaN4.6False
9991000Nine LivesComedy,Family,FantasyA stuffy businessman finds himself trapped ins...Barry SonnenfeldKevin Spacey, Jennifer Garner, Robbie Amell,Ch...2016875.31243519.6411.0cat_30.2257474.3False
\n", + "

1000 rows × 16 columns

\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + ".. ... ... ... \n", + "995 996 Secret in Their Eyes Crime,Drama,Mystery \n", + "996 997 Hostel: Part II Horror \n", + "997 998 Step Up 2: The Streets Drama,Music,Romance \n", + "998 999 Search Party Adventure,Comedy \n", + "999 1000 Nine Lives Comedy,Family,Fantasy \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + ".. ... ... \n", + "995 A tight-knit team of rising investigators, alo... Billy Ray \n", + "996 Three American college students studying abroa... Eli Roth \n", + "997 Romantic sparks occur between two dance studen... Jon M. Chu \n", + "998 A pair of friends embark on a mission to reuni... Scot Armstrong \n", + "999 A stuffy businessman finds himself trapped ins... Barry Sonnenfeld \n", + "\n", + " Actors Year \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 \n", + ".. ... ... \n", + "995 Chiwetel Ejiofor, Nicole Kidman, Julia Roberts... 2015 \n", + "996 Lauren German, Heather Matarazzo, Bijou Philli... 2007 \n", + "997 Robert Hoffman, Briana Evigan, Cassie Ventura,... 2008 \n", + "998 Adam Pally, T.J. Miller, Thomas Middleditch,Sh... 2014 \n", + "999 Kevin Spacey, Jennifer Garner, Robbie Amell,Ch... 2016 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "0 121 8.1 757074 333.13 76.0 cat_4 \n", + "1 124 7.0 485820 126.46 65.0 cat_4 \n", + "2 117 7.3 157606 138.12 62.0 cat_4 \n", + "3 108 7.2 60545 270.32 59.0 cat_3 \n", + "4 123 6.2 393727 325.02 40.0 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "995 111 6.2 27585 NaN 45.0 cat_3 \n", + "996 94 5.5 73152 17.54 46.0 cat_3 \n", + "997 98 6.2 70699 58.01 50.0 cat_3 \n", + "998 93 5.6 4881 NaN 22.0 cat_2 \n", + "999 87 5.3 12435 19.64 11.0 cat_3 \n", + "\n", + " Revenue per Minute New Rating Is Prime? \n", + "0 2.753140 8.1 False \n", + "1 1.019839 7.0 False \n", + "2 1.180513 8.3 False \n", + "3 2.502963 6.2 False \n", + "4 2.642439 6.2 False \n", + ".. ... ... ... \n", + "995 NaN 6.2 False \n", + "996 0.186596 5.5 False \n", + "997 0.591939 6.2 False \n", + "998 NaN 4.6 False \n", + "999 0.225747 4.3 False \n", + "\n", + "[1000 rows x 16 columns]" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "markdown", + "id": "dc37872f", + "metadata": {}, + "source": [ + "## Challege 5. And finally some fantasy..." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c252a2bd", + "metadata": {}, + "outputs": [], + "source": [ + "Feel free to propose your own ranking based in aggregations of at least 3 columns of the dataset." + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "8379ad1d", + "metadata": {}, + "outputs": [], + "source": [ + "groupby_object = df.groupby([\"Rating\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "b6e3b567", + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)VotesRevenue (Millions)MetascoreBinRevenue per MinuteNew RatingIs Prime?
Rating
6.116758The Great WallThe Bad BatchJack Reacher: Never...Action,Adventure,FantasyRomance,Sci-FiAction,A...European mercenaries searching for black powde...Yimou ZhangAna Lily AmirpourEdward ZwickBrad P...Matt Damon, Tian Jing, Willem Dafoe, Andy LauK...62422330425283951408.731317.0cat_3cat_1cat_3cat_4cat_2cat_3cat_4cat_1cat_3c...12.434090183.11
4.5772The AssignmentAction,Crime,ThrillerAfter waking up and discovering that he has un...Walter HillSigourney Weaver, Michelle Rodriguez, Tony Sha...20169520430.0034.0cat_20.0000005.50
6.523350TrollsThe Girl on the TrainNow You See Me 2Tom...Animation,Adventure,ComedyCrime,Drama,MysteryA...After the Bergens invade Troll Village, Poppy,...Walt DohrnTate TaylorJon M. ChuBrad BirdGore V...Anna Kendrick, Justin Timberlake,Zooey Deschan...80525440940848842281.061921.0cat_3cat_4cat_4cat_4cat_3cat_4cat_3cat_3cat_4c...20.779299253.00
4.4937The Human Centipede (First Sequence)HorrorA mad scientist kidnaps and mutilates a trio o...Tom SixDieter Laser, Ashley C. Williams, Ashlynn Yenn...200992606550.1833.0cat_30.0019574.40
7.818410Hidden FiguresAvatarThe Hateful EightThe Big S...Biography,Drama,HistoryAction,Adventure,Fantas...The story of a team of female African-American...Theodore MelfiJames CameronQuentin TarantinoAd...Taraji P. Henson, Octavia Spencer, Janelle Mon...804584946126955064786.962837.0cat_3cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4c...39.289341305.00
7.413822Me Before YouPatriots DayThe AccountantAvenger...Drama,RomanceDrama,History,ThrillerAction,Crim...A girl in a small town forms an unlikely bond ...Thea SharrockPeter BergGavin O'ConnorJoss Whed...Emilia Clarke, Sam Claflin, Janet McTeer, Char...66445393260599723209.231948.0cat_4cat_3cat_4cat_4cat_4cat_4cat_3cat_3cat_4c...26.820653242.21
5.47182The ComedianBlackhatGrown Ups 2TuskThe Green I...ComedyCrime,Drama,MysteryComedyComedy,Drama,Ho...A look at the life of an aging insult comic na...Taylor HackfordMichael MannDennis DuganKevin S...Robert De Niro, Leslie Mann, Danny DeVito, Edi...241731227542441449.91488.0cat_2cat_3cat_4cat_3cat_3cat_3cat_4cat_3cat_2c...4.58704863.80
4.82623RuptureThe Ridiculous 6Chalk It UpTexas Chains...Horror,Sci-Fi,ThrillerComedy,WesternComedyHorr...A single mom tries to break free from a myster...Steven ShainbergFrank CoraciHisonni JohnsonJoh...Noomi Rapace, Michael Chiklis, Kerry Bishé,Pet...80604037109034.33115.0cat_2cat_3cat_1cat_30.37315219.20
2.7915Don't Fuck in the WoodsDragonball EvolutionHorrorAction,Adventure,FantasyA group of friends are going on a camping trip...Shawn BurkettJames WongBrittany Blanton, Ayse Howard, Roman Jossart,N...4025158600089.3545.0cat_1cat_30.1100005.40
3.7320The Last FaceSatanicDramaHorrorA director (Charlize Theron) of an internation...Sean PennJeffrey G. HuntCharlize Theron, Javier Bardem, Adèle Exarchop...403221533710.0016.0cat_1cat_20.0000007.40
6.418538MindhornColossalLive by NightMamma Mia!The Sha...ComedyAction,Comedy,DramaCrime,DramaComedy,Fam...A has-been actor best known for playing the ti...Sean FoleyNacho VigalondoBen AffleckPhyllida L...Essie Davis, Andrea Riseborough, Julian Barrat...70435363842087632223.421989.0cat_2cat_2cat_3cat_4cat_3cat_3cat_4cat_3cat_4c...22.465497219.01
7.613353Doctor StrangeWatchmenSuperbadSicarioDawn of t...Action,Adventure,FantasyAction,Drama,MysteryCo...While on a journey of physical and spiritual h...Scott DerricksonZack SnyderGreg MottolaDenis V...Benedict Cumberbatch, Chiwetel Ejiofor, Rachel...54303336071777762713.571970.0cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4c...21.842981208.20
4.164Fifty Shades of GreyDrama,Romance,ThrillerLiterature student Anastasia Steele's life cha...Sam Taylor-JohnsonDakota Johnson, Jamie Dornan, Jennifer Ehle,El...2015125244474166.1546.0cat_41.3292005.10
7.711451MoanaKingsman: The Secret ServiceHell or High ...Animation,Adventure,ComedyAction,Adventure,Com...In Ancient Polynesia, when a terrible curse in...Ron ClementsMatthew VaughnDavid MackenzieAlex ...Auli'i Cravalho, Dwayne Johnson, Rachel House,...54301304474184382258.021800.0cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_1cat_4c...19.661901198.91
5.36224Independence Day: ResurgenceGhostbustersSpring...Action,Adventure,Sci-FiAction,Comedy,FantasyDr...Two decades after the first Independence Day i...Roland EmmerichPaul FeigHarmony KorineLana Wac...Liam Hemsworth, Jeff Goldblum, Bill Pullman,Ma...241761271739995444.30423.0cat_4cat_4cat_4cat_4cat_2cat_3cat_3cat_3cat_2c...3.84066962.60
4.63738The Boy Next DoorOnly for One NightMax SteelWo...Mystery,ThrillerThrillerAction,Adventure,Famil...A woman, separated from her unfaithful husband...Rob CohenChris StokesStewart HendlerJohn R. Le...Jennifer Lopez, Ryan Guzman, Kristin Chenoweth...100794334832746.04175.0cat_3cat_1cat_3cat_1cat_20.50548427.02
7.020575PrometheusPassengersTheir FinestJurassic World...Adventure,Mystery,Sci-FiAdventure,Drama,Romanc...Following clues to the origin of mankind, a te...Ridley ScottMorten TyldumLone ScherfigColin Tr...Noomi Rapace, Logan Marshall-Green, Michael Fa...925605358102243194039.932769.0cat_4cat_4cat_2cat_4cat_4cat_4cat_4cat_4cat_2c...34.846896315.00
8.42073Django Unchained3 IdiotsWALL·EKoe no katachiDrama,WesternComedy,DramaAnimation,Adventure,F...With the help of a German bounty hunter , a fr...Quentin TarantinoRajkumar HiraniAndrew Stanton...Jamie Foxx, Christoph Waltz, Leonardo DiCaprio...80455622057222393.13228.0cat_5cat_4cat_4cat_23.30879532.60
4.72829Dead AwakeAliens vs Predator - RequiemZoolande...Horror,ThrillerAction,Horror,Sci-FiComedyActio...A young woman must save herself and her friend...Phillip GuzmanColin StrauseBen StillerAndrey K...Jocelin Donahue, Jesse Bradford, Jesse Borrego...1208660516149893.70244.0cat_1cat_3cat_3cat_2cat_2cat_20.90083530.20
5.69503Resident Evil: The Final ChapterFallenMother's...Action,Horror,Sci-FiAdventure,Drama,FantasyCom...Alice returns to where the nightmare began: Th...Paul W.S. AndersonScott HicksGarry MarshallApr...Milla Jovovich, Iain Glen, Ali Larter, Shawn R...342271693929994478.06662.0cat_3cat_2cat_3cat_2cat_4cat_3cat_1cat_3cat_3c...4.56007390.20
6.724065Jason BourneGoldHounds of LovePirates of the C...Action,ThrillerAdventure,Drama,ThrillerCrime,D...The CIA's most dangerous former operative is d...Paul GreengrassStephen GaghanBen YoungRob Mars...Matt Damon, Tommy Lee Jones, Alicia Vikander,V...96618547671619513768.352658.0cat_4cat_3cat_2cat_4cat_4cat_4cat_4cat_3cat_3c...31.924417315.60
5.710359Transformers: Age of ExtinctionAllegiantMonste...Action,Adventure,Sci-FiAction,Adventure,Myster...Autobots must escape sight from a bounty hunte...Michael BayRobert SchwentkeChris WedgeNicholas...Mark Wahlberg, Nicola Peltz, Jack Reynor, Stan...423032292934610673.37830.0cat_4cat_3cat_2cat_3cat_3cat_3cat_3cat_2cat_2c...5.675561117.70
8.23781Hacksaw RidgeThe Wolf of Wall StreetRoomWarrio...Biography,Drama,HistoryBiography,Comedy,CrimeD...WWII American Army Medic Desmond T. Doss, who ...Mel GibsonMartin ScorseseLenny AbrahamsonGavin...Andrew Garfield, Sam Worthington, Luke Bracey,...2011713193508761792.08706.0cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_3cat_4c...6.97942779.00
7.320163SplitMiss SloaneSilencePirates of the Caribbea...Horror,ThrillerDrama,ThrillerAdventure,Drama,H...Three girls are kidnapped by a man with a diag...M. Night ShyamalanJohn MaddenMartin ScorseseGo...James McAvoy, Anya Taylor-Joy, Haley Lu Richar...84526494771192142933.502614.0cat_4cat_3cat_3cat_4cat_4cat_3cat_4cat_4cat_3c...23.818135310.61
4.21421The Last AirbenderExposedAction,Adventure,FamilyCrime,Drama,MysteryFollows the adventures of Aang, a young succes...M. Night ShyamalanGee Malik LintonNoah Ringer, Nicola Peltz, Jackson Rathbone,De...40262051335380.0043.0cat_4cat_20.0000008.40
5.13038Jennifer's BodySex TapeThe Rise of the KraysBl...Comedy,HorrorComedy,RomanceCrime,DramaHorror,T...A newly possessed high school cheerleader turn...Karyn KusamaJake KasdanZackary AdlerAdam Winga...Megan Fox, Amanda Seyfried, Adam Brody, Johnny...1007049722509182.80255.0cat_3cat_3cat_2cat_3cat_30.86898025.50
5.911381Assassin's CreedThe PromiseRealiveThe HostPerc...Action,Adventure,DramaDrama,HistorySci-FiActio...When Callum Lynch explores the memories of his...Justin KurzelTerry GeorgeMateo GilAndrew Nicco...Michael Fassbender, Marion Cotillard, Jeremy I...3826220721475960805.34806.0cat_4cat_4cat_2cat_3cat_4cat_1cat_4cat_4cat_4c...7.540647109.10
3.2648Tall MenFantasy,Horror,ThrillerA challenged man is stalked by tall phantoms i...Jonathan HolbrookDan Crisafulli, Kay Whitney, Richard Garcia, P...20161331730.0057.0cat_10.0000004.20
6.323829Why Him?Sausage PartyLowridersPersonal Shopper...ComedyAnimation,Adventure,ComedyDramaDrama,Mys...A holiday gathering threatens to go off the ra...John HamburgGreg TiernanRicardo de MontreuilOl...Zoey Deutch, James Franco, Tangie Ambrose,Cedr...88639474735012712105.082017.0cat_3cat_4cat_1cat_3cat_4cat_2cat_3cat_4cat_2c...18.082360274.21
4.06172307: Winter's DreamSci-FiIn 2307, a future soldier is sent on a mission...Joey CurtisPaul Sidhu, Branden Coles, Arielle Holmes, Kel...201610127720.7653.0cat_10.2055454.01
1.9830Disaster MovieComedyOver the course of one evening, an unsuspectin...Jason FriedbergCarmen Electra, Vanessa Lachey,Nicole Parker, ...2008877720714.1715.0cat_30.1628740.90
8.15975Guardians of the GalaxyLionStar Wars: Episode ...Action,Adventure,Sci-FiBiography,DramaAction,A...A group of intergalactic criminals are forced ...James GunnGarth DavisJ.J. AbramsGeorge MillerB...Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S...523213290114361764211.661964.0cat_4cat_4cat_4cat_4cat_4cat_5cat_4cat_4cat_4c...33.055304213.60
7.125226The Lost City of ZX-Men: Apocalypse5- 25- 77St...Action,Adventure,BiographyAction,Adventure,Sci...A true-life drama, centering on British explor...James GrayBryan SingerPatrick Read JohnsonJust...Charlie Hunnam, Robert Pattinson, Sienna Mille...104636607682148143379.012894.0cat_2cat_4cat_1cat_4cat_3cat_4cat_4cat_4cat_3c...27.139367363.20
6.011882Mike and Dave Need Wedding DatesInto the Woods...Adventure,Comedy,RomanceAdventure,Comedy,Drama...Two hard-partying brothers place an online ad ...Jake SzymanskiRob MarshallFabio GuaglioneGaspa...Zac Efron, Adam Devine, Anna Kendrick, Aubrey ...52370279821779541653.341055.0cat_3cat_4cat_2cat_3cat_3cat_3cat_4cat_4cat_3c...14.264225151.00
5.02640Whisky GaloreThe HappeningLída BaarováAmateur ...Comedy,RomanceSci-Fi,ThrillerBiography,Drama,H...Scottish islanders try to plunder cases of whi...Gillies MacKinnonM. Night ShyamalanFilip RencL...Tim Pigott-Smith, Naomi Battrick, Ellie Kendri...805638717358164.51179.0cat_1cat_4cat_1cat_20.70890119.01
7.98465Rogue OneManchester by the SeaCaptain America:...Action,Adventure,Sci-FiDramaAction,Adventure,S...The Rebel Alliance makes a risky move to steal...Gareth EdwardsKenneth LonerganAnthony RussoMat...Felicity Jones, Diego Luna, Alan Tudyk, Donnie...46289286366046752621.511653.0cat_4cat_4cat_4cat_4cat_2cat_4cat_4cat_3cat_4c...19.417432179.70
3.51860The IntentWreckerCrime,DramaAction,Horror,ThrillerGunz (Dylan Duffus) is thrust into a world of ...Femi OyeniranMicheal BafaroDylan Duffus, Scorcher,Shone Romulus, Jade Ash...403118714120.0096.0cat_1cat_20.0000008.00
4.32816Movie 43Fantastic FourYoga HosersSex and the C...Comedy,RomanceAction,Adventure,Sci-FiComedy,Fa...A series of interconnected short films follows...Elizabeth BanksJosh TrankKevin SmithMichael Pa...Emma Stone, Stephen Merchant, Richard Gere, Li...8054428274966160.2795.0cat_3cat_4cat_2cat_31.30798114.20
4.94549Bonjour AnneKnock KnockKickboxer: VengeanceMeg...Comedy,Drama,RomanceDrama,Horror,ThrillerActio...Anne is at a crossroads in her life. Long marr...Eleanor CoppolaEli RothJohn StockwellMichael G...Diane Lane, Alec Baldwin, Arnaud Viard, Linda ...14092707616607774.23370.0cat_1cat_3cat_2cat_2cat_4cat_4cat_46.89841035.30
6.820442Paris pieds nusThe Autopsy of Jane DoeCollater...ComedyHorror,Mystery,ThrillerDrama,RomanceActi...Fiona visits Paris for the first time to assis...Dominique AbelAndré ØvredalDavid FrankelSam Me...Fiona Gordon, Dominique Abel,Emmanuelle Riva, ...74474399046704671890.942083.0cat_1cat_3cat_3cat_4cat_4cat_4cat_3cat_2cat_4c...16.550461250.61
8.05542ArrivalDeadpoolThe MartianThe RevenantStar Tre...Drama,Mystery,Sci-FiAction,Adventure,ComedyAdv...When twelve mysterious spacecraft appear aroun...Denis VilleneuveTim MillerRidley ScottAlejandr...Amy Adams, Jeremy Renner, Forest Whitaker,Mich...38217233184299472540.561501.0cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_3c...20.647620155.00
7.516219Fantastic Beasts and Where to Find ThemNocturn...Adventure,Family,FantasyDrama,ThrillerDramaBio...The adventures of writer Newt Scamander in New...David YatesTom FordBarry JenkinsClint Eastwood...Eddie Redmayne, Katherine Waterston, Alison Su...70438425661621502925.552408.0cat_4cat_4cat_4cat_4cat_1cat_3cat_4cat_4cat_4c...24.775876260.51
6.223796Suicide SquadBad MomsThe Neon DemonDiary of a ...Action,Adventure,FantasyComedyHorror,ThrillerC...A secret government agency recruits some of th...David AyerJon LucasNicolas Winding RefnThor Fr...Will Smith, Jared Leto, Margot Robbie, Viola D...74480403339261132715.281852.0cat_4cat_3cat_3cat_3cat_3cat_3cat_3cat_3cat_4c...23.984000224.40
8.32236La La LandBahubali: The BeginningInglourious B...Comedy,Drama,MusicAction,Adventure,DramaAdvent...A jazz pianist falls for an aspiring actress i...Damien ChazelleS.S. RajamouliQuentin Tarantino...Ryan Gosling, Emma Stone, Rosemarie DeWitt, J....140878502795136986.65489.0cat_4cat_3cat_4cat_4cat_1cat_4cat_49.09486155.10
3.91166The Disappointments RoomThe Black RoomBirth of...Drama,Horror,ThrillerHorrorAction,Biography,DramaA mother and her young son release unimaginabl...D.J. CarusoRolfe KanefskyGeorge NolfiKate Beckinsale, Mel Raido, Duncan Joiner, Luc...6048279568795.46163.0cat_2cat_1cat_10.93175112.72
8.8199InceptionDangalAction,Adventure,Sci-FiAction,Biography,DramaA thief, who steals corporate secrets through ...Christopher NolanNitesh TiwariLeonardo DiCaprio, Joseph Gordon-Levitt, Ellen...40263091632594303.7274.0cat_5cat_32.04607917.60
8.51893The PrestigeThe DepartedThe Dark Knight RisesW...Drama,Mystery,Sci-FiCrime,Drama,ThrillerAction...Two stage magicians engage in competitive one-...Christopher NolanMartin ScorseseChristopher No...Christian Bale, Hugh Jackman, Scarlett Johanss...120518543931287659.15448.0cat_4cat_4cat_5cat_4cat_4cat_44.22937554.00
8.6384InterstellarKimi no na waThe IntouchablesAdventure,Drama,Sci-FiAnimation,Drama,FantasyB...A team of explorers travel through a wormhole ...Christopher NolanMakoto ShinkaiOlivier NakacheMatthew McConaughey, Anne Hathaway, Jessica Ch...60413871639822205.85210.0cat_5cat_3cat_41.27419624.80
9.055The Dark KnightAction,Crime,DramaWhen the menace known as the Joker wreaks havo...Christopher NolanChristian Bale, Heath Ledger, Aaron Eckhart,Mi...20081521791916533.3282.0cat_53.5086849.00
7.220603SingThe FounderJohn WickDon't BreatheDeepwater...Animation,Comedy,FamilyBiography,Drama,History...In a city of humanoid animals, a hustling thea...Christophe LourdeletJohn Lee HancockChad Stahe...Matthew McConaughey,Reese Witherspoon, Seth Ma...84526480674906823499.912603.0cat_3cat_3cat_4cat_4cat_3cat_4cat_4cat_4cat_3c...30.197025306.40
6.625421The Secret Life of PetsNerveCrimson PeakThe Ch...Animation,Adventure,ComedyAdventure,Crime,Myst...The quiet life of a terrier named Max is upend...Chris RenaudHenry JoostGuillermo del ToroRoss ...Louis C.K., Eric Stonestreet, Kevin Hart, Lake...84498462063917212856.552067.0cat_4cat_3cat_3cat_3cat_4cat_3cat_4cat_3cat_4c...25.737712269.21
5.25926TwilightBeyond the GatesA Kind of MurderThe 5t...Drama,Fantasy,RomanceAdventure,HorrorCrime,Dra...A teenage girl risks everything when she falls...Catherine HardwickeJackson StewartAndy Goddard...Kristen Stewart, Robert Pattinson, Billy Burke...221341176974947505.78427.0cat_4cat_2cat_2cat_3cat_3cat_4cat_4cat_2cat_3c...4.39900061.20
6.919301The Magnificent SevenCaptain America: The Firs...Action,Adventure,WesternAction,Adventure,Sci-F...Seven gunmen in the old west gradually come to...Antoine FuquaJoe JohnstonDavid Robert Mitchell...Denzel Washington, Chris Pratt, Ethan Hawke,Vi...62397341738660091432.781634.0cat_4cat_4cat_4cat_3cat_4cat_1cat_3cat_4cat_1c...12.987459209.93
5.811829Underworld: Blood WarsThe VoidAll We HadOffice...Action,Adventure,FantasyHorror,Mystery,Sci-FiD...Vampire death dealer, Selene (Kate Beckinsale)...Anna FoersterJeremy GillespieKatie HolmesJosh ...Kate Beckinsale, Theo James, Tobias Menzies, L...52353275420674001215.231179.0cat_3cat_2cat_2cat_3cat_2cat_3cat_3cat_2cat_4c...10.512693148.80
5.58506Gods of EgyptThe House BunnyVincent N RoxxySev...Action,Adventure,FantasyComedy,RomanceCrime,Dr...Mortal hero Bek teams with the god Horus in an...Alex ProyasFred WolfGary Michael SchultzSergei...Brenton Thwaites, Nikolaj Coster-Waldau, Gerar...2816314761074968875.18570.0cat_3cat_3cat_1cat_3cat_4cat_3cat_2cat_3cat_2c...7.71025573.01
\n", + "
" + ], + "text/plain": [ + " Rank Title \\\n", + "Rating \n", + "6.1 16758 The Great WallThe Bad BatchJack Reacher: Never... \n", + "4.5 772 The Assignment \n", + "6.5 23350 TrollsThe Girl on the TrainNow You See Me 2Tom... \n", + "4.4 937 The Human Centipede (First Sequence) \n", + "7.8 18410 Hidden FiguresAvatarThe Hateful EightThe Big S... \n", + "7.4 13822 Me Before YouPatriots DayThe AccountantAvenger... \n", + "5.4 7182 The ComedianBlackhatGrown Ups 2TuskThe Green I... \n", + "4.8 2623 RuptureThe Ridiculous 6Chalk It UpTexas Chains... \n", + "2.7 915 Don't Fuck in the WoodsDragonball Evolution \n", + "3.7 320 The Last FaceSatanic \n", + "6.4 18538 MindhornColossalLive by NightMamma Mia!The Sha... \n", + "7.6 13353 Doctor StrangeWatchmenSuperbadSicarioDawn of t... \n", + "4.1 64 Fifty Shades of Grey \n", + "7.7 11451 MoanaKingsman: The Secret ServiceHell or High ... \n", + "5.3 6224 Independence Day: ResurgenceGhostbustersSpring... \n", + "4.6 3738 The Boy Next DoorOnly for One NightMax SteelWo... \n", + "7.0 20575 PrometheusPassengersTheir FinestJurassic World... \n", + "8.4 2073 Django Unchained3 IdiotsWALL·EKoe no katachi \n", + "4.7 2829 Dead AwakeAliens vs Predator - RequiemZoolande... \n", + "5.6 9503 Resident Evil: The Final ChapterFallenMother's... \n", + "6.7 24065 Jason BourneGoldHounds of LovePirates of the C... \n", + "5.7 10359 Transformers: Age of ExtinctionAllegiantMonste... \n", + "8.2 3781 Hacksaw RidgeThe Wolf of Wall StreetRoomWarrio... \n", + "7.3 20163 SplitMiss SloaneSilencePirates of the Caribbea... \n", + "4.2 1421 The Last AirbenderExposed \n", + "5.1 3038 Jennifer's BodySex TapeThe Rise of the KraysBl... \n", + "5.9 11381 Assassin's CreedThe PromiseRealiveThe HostPerc... \n", + "3.2 648 Tall Men \n", + "6.3 23829 Why Him?Sausage PartyLowridersPersonal Shopper... \n", + "4.0 617 2307: Winter's Dream \n", + "1.9 830 Disaster Movie \n", + "8.1 5975 Guardians of the GalaxyLionStar Wars: Episode ... \n", + "7.1 25226 The Lost City of ZX-Men: Apocalypse5- 25- 77St... \n", + "6.0 11882 Mike and Dave Need Wedding DatesInto the Woods... \n", + "5.0 2640 Whisky GaloreThe HappeningLída BaarováAmateur ... \n", + "7.9 8465 Rogue OneManchester by the SeaCaptain America:... \n", + "3.5 1860 The IntentWrecker \n", + "4.3 2816 Movie 43Fantastic FourYoga HosersSex and the C... \n", + "4.9 4549 Bonjour AnneKnock KnockKickboxer: VengeanceMeg... \n", + "6.8 20442 Paris pieds nusThe Autopsy of Jane DoeCollater... \n", + "8.0 5542 ArrivalDeadpoolThe MartianThe RevenantStar Tre... \n", + "7.5 16219 Fantastic Beasts and Where to Find ThemNocturn... \n", + "6.2 23796 Suicide SquadBad MomsThe Neon DemonDiary of a ... \n", + "8.3 2236 La La LandBahubali: The BeginningInglourious B... \n", + "3.9 1166 The Disappointments RoomThe Black RoomBirth of... \n", + "8.8 199 InceptionDangal \n", + "8.5 1893 The PrestigeThe DepartedThe Dark Knight RisesW... \n", + "8.6 384 InterstellarKimi no na waThe Intouchables \n", + "9.0 55 The Dark Knight \n", + "7.2 20603 SingThe FounderJohn WickDon't BreatheDeepwater... \n", + "6.6 25421 The Secret Life of PetsNerveCrimson PeakThe Ch... \n", + "5.2 5926 TwilightBeyond the GatesA Kind of MurderThe 5t... \n", + "6.9 19301 The Magnificent SevenCaptain America: The Firs... \n", + "5.8 11829 Underworld: Blood WarsThe VoidAll We HadOffice... \n", + "5.5 8506 Gods of EgyptThe House BunnyVincent N RoxxySev... \n", + "\n", + " Genre \\\n", + "Rating \n", + "6.1 Action,Adventure,FantasyRomance,Sci-FiAction,A... \n", + "4.5 Action,Crime,Thriller \n", + "6.5 Animation,Adventure,ComedyCrime,Drama,MysteryA... \n", + "4.4 Horror \n", + "7.8 Biography,Drama,HistoryAction,Adventure,Fantas... \n", + "7.4 Drama,RomanceDrama,History,ThrillerAction,Crim... \n", + "5.4 ComedyCrime,Drama,MysteryComedyComedy,Drama,Ho... \n", + "4.8 Horror,Sci-Fi,ThrillerComedy,WesternComedyHorr... \n", + "2.7 HorrorAction,Adventure,Fantasy \n", + "3.7 DramaHorror \n", + "6.4 ComedyAction,Comedy,DramaCrime,DramaComedy,Fam... \n", + "7.6 Action,Adventure,FantasyAction,Drama,MysteryCo... \n", + "4.1 Drama,Romance,Thriller \n", + "7.7 Animation,Adventure,ComedyAction,Adventure,Com... \n", + "5.3 Action,Adventure,Sci-FiAction,Comedy,FantasyDr... \n", + "4.6 Mystery,ThrillerThrillerAction,Adventure,Famil... \n", + "7.0 Adventure,Mystery,Sci-FiAdventure,Drama,Romanc... \n", + "8.4 Drama,WesternComedy,DramaAnimation,Adventure,F... \n", + "4.7 Horror,ThrillerAction,Horror,Sci-FiComedyActio... \n", + "5.6 Action,Horror,Sci-FiAdventure,Drama,FantasyCom... \n", + "6.7 Action,ThrillerAdventure,Drama,ThrillerCrime,D... \n", + "5.7 Action,Adventure,Sci-FiAction,Adventure,Myster... \n", + "8.2 Biography,Drama,HistoryBiography,Comedy,CrimeD... \n", + "7.3 Horror,ThrillerDrama,ThrillerAdventure,Drama,H... \n", + "4.2 Action,Adventure,FamilyCrime,Drama,Mystery \n", + "5.1 Comedy,HorrorComedy,RomanceCrime,DramaHorror,T... \n", + "5.9 Action,Adventure,DramaDrama,HistorySci-FiActio... \n", + "3.2 Fantasy,Horror,Thriller \n", + "6.3 ComedyAnimation,Adventure,ComedyDramaDrama,Mys... \n", + "4.0 Sci-Fi \n", + "1.9 Comedy \n", + "8.1 Action,Adventure,Sci-FiBiography,DramaAction,A... \n", + "7.1 Action,Adventure,BiographyAction,Adventure,Sci... \n", + "6.0 Adventure,Comedy,RomanceAdventure,Comedy,Drama... \n", + "5.0 Comedy,RomanceSci-Fi,ThrillerBiography,Drama,H... \n", + "7.9 Action,Adventure,Sci-FiDramaAction,Adventure,S... \n", + "3.5 Crime,DramaAction,Horror,Thriller \n", + "4.3 Comedy,RomanceAction,Adventure,Sci-FiComedy,Fa... \n", + "4.9 Comedy,Drama,RomanceDrama,Horror,ThrillerActio... \n", + "6.8 ComedyHorror,Mystery,ThrillerDrama,RomanceActi... \n", + "8.0 Drama,Mystery,Sci-FiAction,Adventure,ComedyAdv... \n", + "7.5 Adventure,Family,FantasyDrama,ThrillerDramaBio... \n", + "6.2 Action,Adventure,FantasyComedyHorror,ThrillerC... \n", + "8.3 Comedy,Drama,MusicAction,Adventure,DramaAdvent... \n", + "3.9 Drama,Horror,ThrillerHorrorAction,Biography,Drama \n", + "8.8 Action,Adventure,Sci-FiAction,Biography,Drama \n", + "8.5 Drama,Mystery,Sci-FiCrime,Drama,ThrillerAction... \n", + "8.6 Adventure,Drama,Sci-FiAnimation,Drama,FantasyB... \n", + "9.0 Action,Crime,Drama \n", + "7.2 Animation,Comedy,FamilyBiography,Drama,History... \n", + "6.6 Animation,Adventure,ComedyAdventure,Crime,Myst... \n", + "5.2 Drama,Fantasy,RomanceAdventure,HorrorCrime,Dra... \n", + "6.9 Action,Adventure,WesternAction,Adventure,Sci-F... \n", + "5.8 Action,Adventure,FantasyHorror,Mystery,Sci-FiD... \n", + "5.5 Action,Adventure,FantasyComedy,RomanceCrime,Dr... \n", + "\n", + " Description \\\n", + "Rating \n", + "6.1 European mercenaries searching for black powde... \n", + "4.5 After waking up and discovering that he has un... \n", + "6.5 After the Bergens invade Troll Village, Poppy,... \n", + "4.4 A mad scientist kidnaps and mutilates a trio o... \n", + "7.8 The story of a team of female African-American... \n", + "7.4 A girl in a small town forms an unlikely bond ... \n", + "5.4 A look at the life of an aging insult comic na... \n", + "4.8 A single mom tries to break free from a myster... \n", + "2.7 A group of friends are going on a camping trip... \n", + "3.7 A director (Charlize Theron) of an internation... \n", + "6.4 A has-been actor best known for playing the ti... \n", + "7.6 While on a journey of physical and spiritual h... \n", + "4.1 Literature student Anastasia Steele's life cha... \n", + "7.7 In Ancient Polynesia, when a terrible curse in... \n", + "5.3 Two decades after the first Independence Day i... \n", + "4.6 A woman, separated from her unfaithful husband... \n", + "7.0 Following clues to the origin of mankind, a te... \n", + "8.4 With the help of a German bounty hunter , a fr... \n", + "4.7 A young woman must save herself and her friend... \n", + "5.6 Alice returns to where the nightmare began: Th... \n", + "6.7 The CIA's most dangerous former operative is d... \n", + "5.7 Autobots must escape sight from a bounty hunte... \n", + "8.2 WWII American Army Medic Desmond T. Doss, who ... \n", + "7.3 Three girls are kidnapped by a man with a diag... \n", + "4.2 Follows the adventures of Aang, a young succes... \n", + "5.1 A newly possessed high school cheerleader turn... \n", + "5.9 When Callum Lynch explores the memories of his... \n", + "3.2 A challenged man is stalked by tall phantoms i... \n", + "6.3 A holiday gathering threatens to go off the ra... \n", + "4.0 In 2307, a future soldier is sent on a mission... \n", + "1.9 Over the course of one evening, an unsuspectin... \n", + "8.1 A group of intergalactic criminals are forced ... \n", + "7.1 A true-life drama, centering on British explor... \n", + "6.0 Two hard-partying brothers place an online ad ... \n", + "5.0 Scottish islanders try to plunder cases of whi... \n", + "7.9 The Rebel Alliance makes a risky move to steal... \n", + "3.5 Gunz (Dylan Duffus) is thrust into a world of ... \n", + "4.3 A series of interconnected short films follows... \n", + "4.9 Anne is at a crossroads in her life. Long marr... \n", + "6.8 Fiona visits Paris for the first time to assis... \n", + "8.0 When twelve mysterious spacecraft appear aroun... \n", + "7.5 The adventures of writer Newt Scamander in New... \n", + "6.2 A secret government agency recruits some of th... \n", + "8.3 A jazz pianist falls for an aspiring actress i... \n", + "3.9 A mother and her young son release unimaginabl... \n", + "8.8 A thief, who steals corporate secrets through ... \n", + "8.5 Two stage magicians engage in competitive one-... \n", + "8.6 A team of explorers travel through a wormhole ... \n", + "9.0 When the menace known as the Joker wreaks havo... \n", + "7.2 In a city of humanoid animals, a hustling thea... \n", + "6.6 The quiet life of a terrier named Max is upend... \n", + "5.2 A teenage girl risks everything when she falls... \n", + "6.9 Seven gunmen in the old west gradually come to... \n", + "5.8 Vampire death dealer, Selene (Kate Beckinsale)... \n", + "5.5 Mortal hero Bek teams with the god Horus in an... \n", + "\n", + " Director \\\n", + "Rating \n", + "6.1 Yimou ZhangAna Lily AmirpourEdward ZwickBrad P... \n", + "4.5 Walter Hill \n", + "6.5 Walt DohrnTate TaylorJon M. ChuBrad BirdGore V... \n", + "4.4 Tom Six \n", + "7.8 Theodore MelfiJames CameronQuentin TarantinoAd... \n", + "7.4 Thea SharrockPeter BergGavin O'ConnorJoss Whed... \n", + "5.4 Taylor HackfordMichael MannDennis DuganKevin S... \n", + "4.8 Steven ShainbergFrank CoraciHisonni JohnsonJoh... \n", + "2.7 Shawn BurkettJames Wong \n", + "3.7 Sean PennJeffrey G. Hunt \n", + "6.4 Sean FoleyNacho VigalondoBen AffleckPhyllida L... \n", + "7.6 Scott DerricksonZack SnyderGreg MottolaDenis V... \n", + "4.1 Sam Taylor-Johnson \n", + "7.7 Ron ClementsMatthew VaughnDavid MackenzieAlex ... \n", + "5.3 Roland EmmerichPaul FeigHarmony KorineLana Wac... \n", + "4.6 Rob CohenChris StokesStewart HendlerJohn R. Le... \n", + "7.0 Ridley ScottMorten TyldumLone ScherfigColin Tr... \n", + "8.4 Quentin TarantinoRajkumar HiraniAndrew Stanton... \n", + "4.7 Phillip GuzmanColin StrauseBen StillerAndrey K... \n", + "5.6 Paul W.S. AndersonScott HicksGarry MarshallApr... \n", + "6.7 Paul GreengrassStephen GaghanBen YoungRob Mars... \n", + "5.7 Michael BayRobert SchwentkeChris WedgeNicholas... \n", + "8.2 Mel GibsonMartin ScorseseLenny AbrahamsonGavin... \n", + "7.3 M. Night ShyamalanJohn MaddenMartin ScorseseGo... \n", + "4.2 M. Night ShyamalanGee Malik Linton \n", + "5.1 Karyn KusamaJake KasdanZackary AdlerAdam Winga... \n", + "5.9 Justin KurzelTerry GeorgeMateo GilAndrew Nicco... \n", + "3.2 Jonathan Holbrook \n", + "6.3 John HamburgGreg TiernanRicardo de MontreuilOl... \n", + "4.0 Joey Curtis \n", + "1.9 Jason Friedberg \n", + "8.1 James GunnGarth DavisJ.J. AbramsGeorge MillerB... \n", + "7.1 James GrayBryan SingerPatrick Read JohnsonJust... \n", + "6.0 Jake SzymanskiRob MarshallFabio GuaglioneGaspa... \n", + "5.0 Gillies MacKinnonM. Night ShyamalanFilip RencL... \n", + "7.9 Gareth EdwardsKenneth LonerganAnthony RussoMat... \n", + "3.5 Femi OyeniranMicheal Bafaro \n", + "4.3 Elizabeth BanksJosh TrankKevin SmithMichael Pa... \n", + "4.9 Eleanor CoppolaEli RothJohn StockwellMichael G... \n", + "6.8 Dominique AbelAndré ØvredalDavid FrankelSam Me... \n", + "8.0 Denis VilleneuveTim MillerRidley ScottAlejandr... \n", + "7.5 David YatesTom FordBarry JenkinsClint Eastwood... \n", + "6.2 David AyerJon LucasNicolas Winding RefnThor Fr... \n", + "8.3 Damien ChazelleS.S. RajamouliQuentin Tarantino... \n", + "3.9 D.J. CarusoRolfe KanefskyGeorge Nolfi \n", + "8.8 Christopher NolanNitesh Tiwari \n", + "8.5 Christopher NolanMartin ScorseseChristopher No... \n", + "8.6 Christopher NolanMakoto ShinkaiOlivier Nakache \n", + "9.0 Christopher Nolan \n", + "7.2 Christophe LourdeletJohn Lee HancockChad Stahe... \n", + "6.6 Chris RenaudHenry JoostGuillermo del ToroRoss ... \n", + "5.2 Catherine HardwickeJackson StewartAndy Goddard... \n", + "6.9 Antoine FuquaJoe JohnstonDavid Robert Mitchell... \n", + "5.8 Anna FoersterJeremy GillespieKatie HolmesJosh ... \n", + "5.5 Alex ProyasFred WolfGary Michael SchultzSergei... \n", + "\n", + " Actors Year \\\n", + "Rating \n", + "6.1 Matt Damon, Tian Jing, Willem Dafoe, Andy LauK... 62422 \n", + "4.5 Sigourney Weaver, Michelle Rodriguez, Tony Sha... 2016 \n", + "6.5 Anna Kendrick, Justin Timberlake,Zooey Deschan... 80525 \n", + "4.4 Dieter Laser, Ashley C. Williams, Ashlynn Yenn... 2009 \n", + "7.8 Taraji P. Henson, Octavia Spencer, Janelle Mon... 80458 \n", + "7.4 Emilia Clarke, Sam Claflin, Janet McTeer, Char... 66445 \n", + "5.4 Robert De Niro, Leslie Mann, Danny DeVito, Edi... 24173 \n", + "4.8 Noomi Rapace, Michael Chiklis, Kerry Bishé,Pet... 8060 \n", + "2.7 Brittany Blanton, Ayse Howard, Roman Jossart,N... 4025 \n", + "3.7 Charlize Theron, Javier Bardem, Adèle Exarchop... 4032 \n", + "6.4 Essie Davis, Andrea Riseborough, Julian Barrat... 70435 \n", + "7.6 Benedict Cumberbatch, Chiwetel Ejiofor, Rachel... 54303 \n", + "4.1 Dakota Johnson, Jamie Dornan, Jennifer Ehle,El... 2015 \n", + "7.7 Auli'i Cravalho, Dwayne Johnson, Rachel House,... 54301 \n", + "5.3 Liam Hemsworth, Jeff Goldblum, Bill Pullman,Ma... 24176 \n", + "4.6 Jennifer Lopez, Ryan Guzman, Kristin Chenoweth... 10079 \n", + "7.0 Noomi Rapace, Logan Marshall-Green, Michael Fa... 92560 \n", + "8.4 Jamie Foxx, Christoph Waltz, Leonardo DiCaprio... 8045 \n", + "4.7 Jocelin Donahue, Jesse Bradford, Jesse Borrego... 12086 \n", + "5.6 Milla Jovovich, Iain Glen, Ali Larter, Shawn R... 34227 \n", + "6.7 Matt Damon, Tommy Lee Jones, Alicia Vikander,V... 96618 \n", + "5.7 Mark Wahlberg, Nicola Peltz, Jack Reynor, Stan... 42303 \n", + "8.2 Andrew Garfield, Sam Worthington, Luke Bracey,... 20117 \n", + "7.3 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 84526 \n", + "4.2 Noah Ringer, Nicola Peltz, Jackson Rathbone,De... 4026 \n", + "5.1 Megan Fox, Amanda Seyfried, Adam Brody, Johnny... 10070 \n", + "5.9 Michael Fassbender, Marion Cotillard, Jeremy I... 38262 \n", + "3.2 Dan Crisafulli, Kay Whitney, Richard Garcia, P... 2016 \n", + "6.3 Zoey Deutch, James Franco, Tangie Ambrose,Cedr... 88639 \n", + "4.0 Paul Sidhu, Branden Coles, Arielle Holmes, Kel... 2016 \n", + "1.9 Carmen Electra, Vanessa Lachey,Nicole Parker, ... 2008 \n", + "8.1 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 52321 \n", + "7.1 Charlie Hunnam, Robert Pattinson, Sienna Mille... 104636 \n", + "6.0 Zac Efron, Adam Devine, Anna Kendrick, Aubrey ... 52370 \n", + "5.0 Tim Pigott-Smith, Naomi Battrick, Ellie Kendri... 8056 \n", + "7.9 Felicity Jones, Diego Luna, Alan Tudyk, Donnie... 46289 \n", + "3.5 Dylan Duffus, Scorcher,Shone Romulus, Jade Ash... 4031 \n", + "4.3 Emma Stone, Stephen Merchant, Richard Gere, Li... 8054 \n", + "4.9 Diane Lane, Alec Baldwin, Arnaud Viard, Linda ... 14092 \n", + "6.8 Fiona Gordon, Dominique Abel,Emmanuelle Riva, ... 74474 \n", + "8.0 Amy Adams, Jeremy Renner, Forest Whitaker,Mich... 38217 \n", + "7.5 Eddie Redmayne, Katherine Waterston, Alison Su... 70438 \n", + "6.2 Will Smith, Jared Leto, Margot Robbie, Viola D... 74480 \n", + "8.3 Ryan Gosling, Emma Stone, Rosemarie DeWitt, J.... 14087 \n", + "3.9 Kate Beckinsale, Mel Raido, Duncan Joiner, Luc... 6048 \n", + "8.8 Leonardo DiCaprio, Joseph Gordon-Levitt, Ellen... 4026 \n", + "8.5 Christian Bale, Hugh Jackman, Scarlett Johanss... 12051 \n", + "8.6 Matthew McConaughey, Anne Hathaway, Jessica Ch... 6041 \n", + "9.0 Christian Bale, Heath Ledger, Aaron Eckhart,Mi... 2008 \n", + "7.2 Matthew McConaughey,Reese Witherspoon, Seth Ma... 84526 \n", + "6.6 Louis C.K., Eric Stonestreet, Kevin Hart, Lake... 84498 \n", + "5.2 Kristen Stewart, Robert Pattinson, Billy Burke... 22134 \n", + "6.9 Denzel Washington, Chris Pratt, Ethan Hawke,Vi... 62397 \n", + "5.8 Kate Beckinsale, Theo James, Tobias Menzies, L... 52353 \n", + "5.5 Brenton Thwaites, Nikolaj Coster-Waldau, Gerar... 28163 \n", + "\n", + " Runtime (Minutes) Votes Revenue (Millions) Metascore \\\n", + "Rating \n", + "6.1 3304 2528395 1408.73 1317.0 \n", + "4.5 95 2043 0.00 34.0 \n", + "6.5 4409 4084884 2281.06 1921.0 \n", + "4.4 92 60655 0.18 33.0 \n", + "7.8 4946 12695506 4786.96 2837.0 \n", + "7.4 3932 6059972 3209.23 1948.0 \n", + "5.4 1227 542441 449.91 488.0 \n", + "4.8 403 71090 34.33 115.0 \n", + "2.7 158 60008 9.35 45.0 \n", + "3.7 215 3371 0.00 16.0 \n", + "6.4 3638 4208763 2223.42 1989.0 \n", + "7.6 3360 7177776 2713.57 1970.0 \n", + "4.1 125 244474 166.15 46.0 \n", + "7.7 3044 7418438 2258.02 1800.0 \n", + "5.3 1271 739995 444.30 423.0 \n", + "4.6 433 48327 46.04 175.0 \n", + "7.0 5358 10224319 4039.93 2769.0 \n", + "8.4 562 2057222 393.13 228.0 \n", + "4.7 605 161498 93.70 244.0 \n", + "5.6 1693 929994 478.06 662.0 \n", + "6.7 5476 7161951 3768.35 2658.0 \n", + "5.7 2292 934610 673.37 830.0 \n", + "8.2 1319 3508761 792.08 706.0 \n", + "7.3 4947 7119214 2933.50 2614.0 \n", + "4.2 205 133538 0.00 43.0 \n", + "5.1 497 225091 82.80 255.0 \n", + "5.9 2072 1475960 805.34 806.0 \n", + "3.2 133 173 0.00 57.0 \n", + "6.3 4747 3501271 2105.08 2017.0 \n", + "4.0 101 277 20.76 53.0 \n", + "1.9 87 77207 14.17 15.0 \n", + "8.1 3290 11436176 4211.66 1964.0 \n", + "7.1 6076 8214814 3379.01 2894.0 \n", + "6.0 2798 2177954 1653.34 1055.0 \n", + "5.0 387 173581 64.51 179.0 \n", + "7.9 2863 6604675 2621.51 1653.0 \n", + "3.5 187 1412 0.00 96.0 \n", + "4.3 428 274966 160.27 95.0 \n", + "4.9 707 616607 774.23 370.0 \n", + "6.8 3990 4670467 1890.94 2083.0 \n", + "8.0 2331 8429947 2540.56 1501.0 \n", + "7.5 4256 6162150 2925.55 2408.0 \n", + "6.2 4033 3926113 2715.28 1852.0 \n", + "8.3 850 2795136 986.65 489.0 \n", + "3.9 279 5687 95.46 163.0 \n", + "8.8 309 1632594 303.72 74.0 \n", + "8.5 854 3931287 659.15 448.0 \n", + "8.6 387 1639822 205.85 210.0 \n", + "9.0 152 1791916 533.32 82.0 \n", + "7.2 4806 7490682 3499.91 2603.0 \n", + "6.6 4620 6391721 2856.55 2067.0 \n", + "5.2 1176 974947 505.78 427.0 \n", + "6.9 3417 3866009 1432.78 1634.0 \n", + "5.8 2754 2067400 1215.23 1179.0 \n", + "5.5 1476 1074968 875.18 570.0 \n", + "\n", + " Bin Revenue per Minute \\\n", + "Rating \n", + "6.1 cat_3cat_1cat_3cat_4cat_2cat_3cat_4cat_1cat_3c... 12.434090 \n", + "4.5 cat_2 0.000000 \n", + "6.5 cat_3cat_4cat_4cat_4cat_3cat_4cat_3cat_3cat_4c... 20.779299 \n", + "4.4 cat_3 0.001957 \n", + "7.8 cat_3cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4c... 39.289341 \n", + "7.4 cat_4cat_3cat_4cat_4cat_4cat_4cat_3cat_3cat_4c... 26.820653 \n", + "5.4 cat_2cat_3cat_4cat_3cat_3cat_3cat_4cat_3cat_2c... 4.587048 \n", + "4.8 cat_2cat_3cat_1cat_3 0.373152 \n", + "2.7 cat_1cat_3 0.110000 \n", + "3.7 cat_1cat_2 0.000000 \n", + "6.4 cat_2cat_2cat_3cat_4cat_3cat_3cat_4cat_3cat_4c... 22.465497 \n", + "7.6 cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4c... 21.842981 \n", + "4.1 cat_4 1.329200 \n", + "7.7 cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_1cat_4c... 19.661901 \n", + "5.3 cat_4cat_4cat_4cat_4cat_2cat_3cat_3cat_3cat_2c... 3.840669 \n", + "4.6 cat_3cat_1cat_3cat_1cat_2 0.505484 \n", + "7.0 cat_4cat_4cat_2cat_4cat_4cat_4cat_4cat_4cat_2c... 34.846896 \n", + "8.4 cat_5cat_4cat_4cat_2 3.308795 \n", + "4.7 cat_1cat_3cat_3cat_2cat_2cat_2 0.900835 \n", + "5.6 cat_3cat_2cat_3cat_2cat_4cat_3cat_1cat_3cat_3c... 4.560073 \n", + "6.7 cat_4cat_3cat_2cat_4cat_4cat_4cat_4cat_3cat_3c... 31.924417 \n", + "5.7 cat_4cat_3cat_2cat_3cat_3cat_3cat_3cat_2cat_2c... 5.675561 \n", + "8.2 cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_3cat_4c... 6.979427 \n", + "7.3 cat_4cat_3cat_3cat_4cat_4cat_3cat_4cat_4cat_3c... 23.818135 \n", + "4.2 cat_4cat_2 0.000000 \n", + "5.1 cat_3cat_3cat_2cat_3cat_3 0.868980 \n", + "5.9 cat_4cat_4cat_2cat_3cat_4cat_1cat_4cat_4cat_4c... 7.540647 \n", + "3.2 cat_1 0.000000 \n", + "6.3 cat_3cat_4cat_1cat_3cat_4cat_2cat_3cat_4cat_2c... 18.082360 \n", + "4.0 cat_1 0.205545 \n", + "1.9 cat_3 0.162874 \n", + "8.1 cat_4cat_4cat_4cat_4cat_4cat_5cat_4cat_4cat_4c... 33.055304 \n", + "7.1 cat_2cat_4cat_1cat_4cat_3cat_4cat_4cat_4cat_3c... 27.139367 \n", + "6.0 cat_3cat_4cat_2cat_3cat_3cat_3cat_4cat_4cat_3c... 14.264225 \n", + "5.0 cat_1cat_4cat_1cat_2 0.708901 \n", + "7.9 cat_4cat_4cat_4cat_4cat_2cat_4cat_4cat_3cat_4c... 19.417432 \n", + "3.5 cat_1cat_2 0.000000 \n", + "4.3 cat_3cat_4cat_2cat_3 1.307981 \n", + "4.9 cat_1cat_3cat_2cat_2cat_4cat_4cat_4 6.898410 \n", + "6.8 cat_1cat_3cat_3cat_4cat_4cat_4cat_3cat_2cat_4c... 16.550461 \n", + "8.0 cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_3c... 20.647620 \n", + "7.5 cat_4cat_4cat_4cat_4cat_1cat_3cat_4cat_4cat_4c... 24.775876 \n", + "6.2 cat_4cat_3cat_3cat_3cat_3cat_3cat_3cat_3cat_4c... 23.984000 \n", + "8.3 cat_4cat_3cat_4cat_4cat_1cat_4cat_4 9.094861 \n", + "3.9 cat_2cat_1cat_1 0.931751 \n", + "8.8 cat_5cat_3 2.046079 \n", + "8.5 cat_4cat_4cat_5cat_4cat_4cat_4 4.229375 \n", + "8.6 cat_5cat_3cat_4 1.274196 \n", + "9.0 cat_5 3.508684 \n", + "7.2 cat_3cat_3cat_4cat_4cat_3cat_4cat_4cat_4cat_3c... 30.197025 \n", + "6.6 cat_4cat_3cat_3cat_3cat_4cat_3cat_4cat_3cat_4c... 25.737712 \n", + "5.2 cat_4cat_2cat_2cat_3cat_3cat_4cat_4cat_2cat_3c... 4.399000 \n", + "6.9 cat_4cat_4cat_4cat_3cat_4cat_1cat_3cat_4cat_1c... 12.987459 \n", + "5.8 cat_3cat_2cat_2cat_3cat_2cat_3cat_3cat_2cat_4c... 10.512693 \n", + "5.5 cat_3cat_3cat_1cat_3cat_4cat_3cat_2cat_3cat_2c... 7.710255 \n", + "\n", + " New Rating Is Prime? \n", + "Rating \n", + "6.1 183.1 1 \n", + "4.5 5.5 0 \n", + "6.5 253.0 0 \n", + "4.4 4.4 0 \n", + "7.8 305.0 0 \n", + "7.4 242.2 1 \n", + "5.4 63.8 0 \n", + "4.8 19.2 0 \n", + "2.7 5.4 0 \n", + "3.7 7.4 0 \n", + "6.4 219.0 1 \n", + "7.6 208.2 0 \n", + "4.1 5.1 0 \n", + "7.7 198.9 1 \n", + "5.3 62.6 0 \n", + "4.6 27.0 2 \n", + "7.0 315.0 0 \n", + "8.4 32.6 0 \n", + "4.7 30.2 0 \n", + "5.6 90.2 0 \n", + "6.7 315.6 0 \n", + "5.7 117.7 0 \n", + "8.2 79.0 0 \n", + "7.3 310.6 1 \n", + "4.2 8.4 0 \n", + "5.1 25.5 0 \n", + "5.9 109.1 0 \n", + "3.2 4.2 0 \n", + "6.3 274.2 1 \n", + "4.0 4.0 1 \n", + "1.9 0.9 0 \n", + "8.1 213.6 0 \n", + "7.1 363.2 0 \n", + "6.0 151.0 0 \n", + "5.0 19.0 1 \n", + "7.9 179.7 0 \n", + "3.5 8.0 0 \n", + "4.3 14.2 0 \n", + "4.9 35.3 0 \n", + "6.8 250.6 1 \n", + "8.0 155.0 0 \n", + "7.5 260.5 1 \n", + "6.2 224.4 0 \n", + "8.3 55.1 0 \n", + "3.9 12.7 2 \n", + "8.8 17.6 0 \n", + "8.5 54.0 0 \n", + "8.6 24.8 0 \n", + "9.0 9.0 0 \n", + "7.2 306.4 0 \n", + "6.6 269.2 1 \n", + "5.2 61.2 0 \n", + "6.9 209.9 3 \n", + "5.8 148.8 0 \n", + "5.5 73.0 1 " + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "groupby_object.sum().sort_values(by= \"Director\", ascending=False)" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "06325fc8", + "id": "f255bb16", "metadata": {}, "outputs": [], "source": [] From 88851fc868c612f056e882a80f79d9033cb7bd9a Mon Sep 17 00:00:00 2001 From: Silvia Martinez Valero Date: Mon, 30 Oct 2023 10:43:42 +0100 Subject: [PATCH 4/4] all challenges finished, including bonus --- ...andas_Apply_Lambdas] Silvia Martinez.ipynb | 3717 ++++++++++------- 1 file changed, 2258 insertions(+), 1459 deletions(-) diff --git a/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb b/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb index 973f8f1..ad53c33 100644 --- a/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb +++ b/notebooks/[Pandas_Apply_Lambdas] Silvia Martinez.ipynb @@ -1884,7 +1884,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 17, "id": "21af3d36", "metadata": {}, "outputs": [ @@ -1894,7 +1894,7 @@ "True" ] }, - "execution_count": 24, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -1931,7 +1931,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 19, "id": "70ffb2f0", "metadata": {}, "outputs": [ @@ -2258,7 +2258,7 @@ "[1000 rows x 16 columns]" ] }, - "execution_count": 25, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -2277,28 +2277,31 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "c252a2bd", + "execution_count": 20, + "id": "22077648", "metadata": {}, "outputs": [], "source": [ - "Feel free to propose your own ranking based in aggregations of at least 3 columns of the dataset." + "# I am goin to establish the average rating taking in consideration\n", + "#web rating(metascore) and user rating(rating)." ] }, { "cell_type": "code", - "execution_count": 29, - "id": "8379ad1d", + "execution_count": 21, + "id": "2232920d", "metadata": {}, "outputs": [], "source": [ - "groupby_object = df.groupby([\"Rating\"])" + "#I am going to convert the metascore rating into a 1-10 value, to be equal to the other rating.\n", + "\n", + "df[\"Metascore\"] = df[\"Metascore\"]/10\n" ] }, { "cell_type": "code", - "execution_count": 33, - "id": "b6e3b567", + "execution_count": 22, + "id": "1ee3d2f9", "metadata": {}, "outputs": [ { @@ -2330,6 +2333,7 @@ " Actors\n", " Year\n", " Runtime (Minutes)\n", + " Rating\n", " Votes\n", " Revenue (Millions)\n", " Metascore\n", @@ -2338,1502 +2342,2297 @@ " New Rating\n", " Is Prime?\n", " \n", - " \n", - " Rating\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", " \n", " \n", " \n", - " 6.1\n", - " 16758\n", - " The Great WallThe Bad BatchJack Reacher: Never...\n", - " Action,Adventure,FantasyRomance,Sci-FiAction,A...\n", - " European mercenaries searching for black powde...\n", - " Yimou ZhangAna Lily AmirpourEdward ZwickBrad P...\n", - " Matt Damon, Tian Jing, Willem Dafoe, Andy LauK...\n", - " 62422\n", - " 3304\n", - " 2528395\n", - " 1408.73\n", - " 1317.0\n", - " cat_3cat_1cat_3cat_4cat_2cat_3cat_4cat_1cat_3c...\n", - " 12.434090\n", - " 183.1\n", - " 1\n", - " \n", - " \n", - " 4.5\n", - " 772\n", - " The Assignment\n", - " Action,Crime,Thriller\n", - " After waking up and discovering that he has un...\n", - " Walter Hill\n", - " Sigourney Weaver, Michelle Rodriguez, Tony Sha...\n", - " 2016\n", - " 95\n", - " 2043\n", - " 0.00\n", - " 34.0\n", - " cat_2\n", - " 0.000000\n", - " 5.5\n", - " 0\n", - " \n", - " \n", - " 6.5\n", - " 23350\n", - " TrollsThe Girl on the TrainNow You See Me 2Tom...\n", - " Animation,Adventure,ComedyCrime,Drama,MysteryA...\n", - " After the Bergens invade Troll Village, Poppy,...\n", - " Walt DohrnTate TaylorJon M. ChuBrad BirdGore V...\n", - " Anna Kendrick, Justin Timberlake,Zooey Deschan...\n", - " 80525\n", - " 4409\n", - " 4084884\n", - " 2281.06\n", - " 1921.0\n", - " cat_3cat_4cat_4cat_4cat_3cat_4cat_3cat_3cat_4c...\n", - " 20.779299\n", - " 253.0\n", - " 0\n", - " \n", - " \n", - " 4.4\n", - " 937\n", - " The Human Centipede (First Sequence)\n", - " Horror\n", - " A mad scientist kidnaps and mutilates a trio o...\n", - " Tom Six\n", - " Dieter Laser, Ashley C. Williams, Ashlynn Yenn...\n", - " 2009\n", - " 92\n", - " 60655\n", - " 0.18\n", - " 33.0\n", - " cat_3\n", - " 0.001957\n", - " 4.4\n", - " 0\n", - " \n", - " \n", - " 7.8\n", - " 18410\n", - " Hidden FiguresAvatarThe Hateful EightThe Big S...\n", - " Biography,Drama,HistoryAction,Adventure,Fantas...\n", - " The story of a team of female African-American...\n", - " Theodore MelfiJames CameronQuentin TarantinoAd...\n", - " Taraji P. Henson, Octavia Spencer, Janelle Mon...\n", - " 80458\n", - " 4946\n", - " 12695506\n", - " 4786.96\n", - " 2837.0\n", - " cat_3cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4c...\n", - " 39.289341\n", - " 305.0\n", - " 0\n", - " \n", - " \n", - " 7.4\n", - " 13822\n", - " Me Before YouPatriots DayThe AccountantAvenger...\n", - " Drama,RomanceDrama,History,ThrillerAction,Crim...\n", - " A girl in a small town forms an unlikely bond ...\n", - " Thea SharrockPeter BergGavin O'ConnorJoss Whed...\n", - " Emilia Clarke, Sam Claflin, Janet McTeer, Char...\n", - " 66445\n", - " 3932\n", - " 6059972\n", - " 3209.23\n", - " 1948.0\n", - " cat_4cat_3cat_4cat_4cat_4cat_4cat_3cat_3cat_4c...\n", - " 26.820653\n", - " 242.2\n", - " 1\n", - " \n", - " \n", - " 5.4\n", - " 7182\n", - " The ComedianBlackhatGrown Ups 2TuskThe Green I...\n", - " ComedyCrime,Drama,MysteryComedyComedy,Drama,Ho...\n", - " A look at the life of an aging insult comic na...\n", - " Taylor HackfordMichael MannDennis DuganKevin S...\n", - " Robert De Niro, Leslie Mann, Danny DeVito, Edi...\n", - " 24173\n", - " 1227\n", - " 542441\n", - " 449.91\n", - " 488.0\n", - " cat_2cat_3cat_4cat_3cat_3cat_3cat_4cat_3cat_2c...\n", - " 4.587048\n", - " 63.8\n", - " 0\n", - " \n", - " \n", - " 4.8\n", - " 2623\n", - " RuptureThe Ridiculous 6Chalk It UpTexas Chains...\n", - " Horror,Sci-Fi,ThrillerComedy,WesternComedyHorr...\n", - " A single mom tries to break free from a myster...\n", - " Steven ShainbergFrank CoraciHisonni JohnsonJoh...\n", - " Noomi Rapace, Michael Chiklis, Kerry Bishé,Pet...\n", - " 8060\n", - " 403\n", - " 71090\n", - " 34.33\n", - " 115.0\n", - " cat_2cat_3cat_1cat_3\n", - " 0.373152\n", - " 19.2\n", - " 0\n", - " \n", - " \n", - " 2.7\n", - " 915\n", - " Don't Fuck in the WoodsDragonball Evolution\n", - " HorrorAction,Adventure,Fantasy\n", - " A group of friends are going on a camping trip...\n", - " Shawn BurkettJames Wong\n", - " Brittany Blanton, Ayse Howard, Roman Jossart,N...\n", - " 4025\n", - " 158\n", - " 60008\n", - " 9.35\n", - " 45.0\n", - " cat_1cat_3\n", - " 0.110000\n", - " 5.4\n", - " 0\n", - " \n", - " \n", - " 3.7\n", - " 320\n", - " The Last FaceSatanic\n", - " DramaHorror\n", - " A director (Charlize Theron) of an internation...\n", - " Sean PennJeffrey G. Hunt\n", - " Charlize Theron, Javier Bardem, Adèle Exarchop...\n", - " 4032\n", - " 215\n", - " 3371\n", - " 0.00\n", - " 16.0\n", - " cat_1cat_2\n", - " 0.000000\n", - " 7.4\n", - " 0\n", - " \n", - " \n", - " 6.4\n", - " 18538\n", - " MindhornColossalLive by NightMamma Mia!The Sha...\n", - " ComedyAction,Comedy,DramaCrime,DramaComedy,Fam...\n", - " A has-been actor best known for playing the ti...\n", - " Sean FoleyNacho VigalondoBen AffleckPhyllida L...\n", - " Essie Davis, Andrea Riseborough, Julian Barrat...\n", - " 70435\n", - " 3638\n", - " 4208763\n", - " 2223.42\n", - " 1989.0\n", - " cat_2cat_2cat_3cat_4cat_3cat_3cat_4cat_3cat_4c...\n", - " 22.465497\n", - " 219.0\n", + " 0\n", " 1\n", - " \n", - " \n", - " 7.6\n", - " 13353\n", - " Doctor StrangeWatchmenSuperbadSicarioDawn of t...\n", - " Action,Adventure,FantasyAction,Drama,MysteryCo...\n", - " While on a journey of physical and spiritual h...\n", - " Scott DerricksonZack SnyderGreg MottolaDenis V...\n", - " Benedict Cumberbatch, Chiwetel Ejiofor, Rachel...\n", - " 54303\n", - " 3360\n", - " 7177776\n", - " 2713.57\n", - " 1970.0\n", - " cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4c...\n", - " 21.842981\n", - " 208.2\n", - " 0\n", - " \n", - " \n", - " 4.1\n", - " 64\n", - " Fifty Shades of Grey\n", - " Drama,Romance,Thriller\n", - " Literature student Anastasia Steele's life cha...\n", - " Sam Taylor-Johnson\n", - " Dakota Johnson, Jamie Dornan, Jennifer Ehle,El...\n", - " 2015\n", - " 125\n", - " 244474\n", - " 166.15\n", - " 46.0\n", + " Guardians of the Galaxy\n", + " Action,Adventure,Sci-Fi\n", + " A group of intergalactic criminals are forced ...\n", + " James Gunn\n", + " Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S...\n", + " 2014\n", + " 121\n", + " 8.1\n", + " 757074\n", + " 333.13\n", + " 7.6\n", " cat_4\n", - " 1.329200\n", - " 5.1\n", - " 0\n", - " \n", - " \n", - " 7.7\n", - " 11451\n", - " MoanaKingsman: The Secret ServiceHell or High ...\n", - " Animation,Adventure,ComedyAction,Adventure,Com...\n", - " In Ancient Polynesia, when a terrible curse in...\n", - " Ron ClementsMatthew VaughnDavid MackenzieAlex ...\n", - " Auli'i Cravalho, Dwayne Johnson, Rachel House,...\n", - " 54301\n", - " 3044\n", - " 7418438\n", - " 2258.02\n", - " 1800.0\n", - " cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_1cat_4c...\n", - " 19.661901\n", - " 198.9\n", - " 1\n", + " 2.753140\n", + " 8.1\n", + " False\n", " \n", " \n", - " 5.3\n", - " 6224\n", - " Independence Day: ResurgenceGhostbustersSpring...\n", - " Action,Adventure,Sci-FiAction,Comedy,FantasyDr...\n", - " Two decades after the first Independence Day i...\n", - " Roland EmmerichPaul FeigHarmony KorineLana Wac...\n", - " Liam Hemsworth, Jeff Goldblum, Bill Pullman,Ma...\n", - " 24176\n", - " 1271\n", - " 739995\n", - " 444.30\n", - " 423.0\n", - " cat_4cat_4cat_4cat_4cat_2cat_3cat_3cat_3cat_2c...\n", - " 3.840669\n", - " 62.6\n", - " 0\n", - " \n", - " \n", - " 4.6\n", - " 3738\n", - " The Boy Next DoorOnly for One NightMax SteelWo...\n", - " Mystery,ThrillerThrillerAction,Adventure,Famil...\n", - " A woman, separated from her unfaithful husband...\n", - " Rob CohenChris StokesStewart HendlerJohn R. Le...\n", - " Jennifer Lopez, Ryan Guzman, Kristin Chenoweth...\n", - " 10079\n", - " 433\n", - " 48327\n", - " 46.04\n", - " 175.0\n", - " cat_3cat_1cat_3cat_1cat_2\n", - " 0.505484\n", - " 27.0\n", + " 1\n", " 2\n", - " \n", - " \n", - " 7.0\n", - " 20575\n", - " PrometheusPassengersTheir FinestJurassic World...\n", - " Adventure,Mystery,Sci-FiAdventure,Drama,Romanc...\n", + " Prometheus\n", + " Adventure,Mystery,Sci-Fi\n", " Following clues to the origin of mankind, a te...\n", - " Ridley ScottMorten TyldumLone ScherfigColin Tr...\n", + " Ridley Scott\n", " Noomi Rapace, Logan Marshall-Green, Michael Fa...\n", - " 92560\n", - " 5358\n", - " 10224319\n", - " 4039.93\n", - " 2769.0\n", - " cat_4cat_4cat_2cat_4cat_4cat_4cat_4cat_4cat_2c...\n", - " 34.846896\n", - " 315.0\n", - " 0\n", - " \n", - " \n", - " 8.4\n", - " 2073\n", - " Django Unchained3 IdiotsWALL·EKoe no katachi\n", - " Drama,WesternComedy,DramaAnimation,Adventure,F...\n", - " With the help of a German bounty hunter , a fr...\n", - " Quentin TarantinoRajkumar HiraniAndrew Stanton...\n", - " Jamie Foxx, Christoph Waltz, Leonardo DiCaprio...\n", - " 8045\n", - " 562\n", - " 2057222\n", - " 393.13\n", - " 228.0\n", - " cat_5cat_4cat_4cat_2\n", - " 3.308795\n", - " 32.6\n", - " 0\n", - " \n", - " \n", - " 4.7\n", - " 2829\n", - " Dead AwakeAliens vs Predator - RequiemZoolande...\n", - " Horror,ThrillerAction,Horror,Sci-FiComedyActio...\n", - " A young woman must save herself and her friend...\n", - " Phillip GuzmanColin StrauseBen StillerAndrey K...\n", - " Jocelin Donahue, Jesse Bradford, Jesse Borrego...\n", - " 12086\n", - " 605\n", - " 161498\n", - " 93.70\n", - " 244.0\n", - " cat_1cat_3cat_3cat_2cat_2cat_2\n", - " 0.900835\n", - " 30.2\n", - " 0\n", - " \n", - " \n", - " 5.6\n", - " 9503\n", - " Resident Evil: The Final ChapterFallenMother's...\n", - " Action,Horror,Sci-FiAdventure,Drama,FantasyCom...\n", - " Alice returns to where the nightmare began: Th...\n", - " Paul W.S. AndersonScott HicksGarry MarshallApr...\n", - " Milla Jovovich, Iain Glen, Ali Larter, Shawn R...\n", - " 34227\n", - " 1693\n", - " 929994\n", - " 478.06\n", - " 662.0\n", - " cat_3cat_2cat_3cat_2cat_4cat_3cat_1cat_3cat_3c...\n", - " 4.560073\n", - " 90.2\n", - " 0\n", - " \n", - " \n", - " 6.7\n", - " 24065\n", - " Jason BourneGoldHounds of LovePirates of the C...\n", - " Action,ThrillerAdventure,Drama,ThrillerCrime,D...\n", - " The CIA's most dangerous former operative is d...\n", - " Paul GreengrassStephen GaghanBen YoungRob Mars...\n", - " Matt Damon, Tommy Lee Jones, Alicia Vikander,V...\n", - " 96618\n", - " 5476\n", - " 7161951\n", - " 3768.35\n", - " 2658.0\n", - " cat_4cat_3cat_2cat_4cat_4cat_4cat_4cat_3cat_3c...\n", - " 31.924417\n", - " 315.6\n", - " 0\n", - " \n", - " \n", - " 5.7\n", - " 10359\n", - " Transformers: Age of ExtinctionAllegiantMonste...\n", - " Action,Adventure,Sci-FiAction,Adventure,Myster...\n", - " Autobots must escape sight from a bounty hunte...\n", - " Michael BayRobert SchwentkeChris WedgeNicholas...\n", - " Mark Wahlberg, Nicola Peltz, Jack Reynor, Stan...\n", - " 42303\n", - " 2292\n", - " 934610\n", - " 673.37\n", - " 830.0\n", - " cat_4cat_3cat_2cat_3cat_3cat_3cat_3cat_2cat_2c...\n", - " 5.675561\n", - " 117.7\n", - " 0\n", - " \n", - " \n", - " 8.2\n", - " 3781\n", - " Hacksaw RidgeThe Wolf of Wall StreetRoomWarrio...\n", - " Biography,Drama,HistoryBiography,Comedy,CrimeD...\n", - " WWII American Army Medic Desmond T. Doss, who ...\n", - " Mel GibsonMartin ScorseseLenny AbrahamsonGavin...\n", - " Andrew Garfield, Sam Worthington, Luke Bracey,...\n", - " 20117\n", - " 1319\n", - " 3508761\n", - " 792.08\n", - " 706.0\n", - " cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_3cat_4c...\n", - " 6.979427\n", - " 79.0\n", - " 0\n", - " \n", - " \n", - " 7.3\n", - " 20163\n", - " SplitMiss SloaneSilencePirates of the Caribbea...\n", - " Horror,ThrillerDrama,ThrillerAdventure,Drama,H...\n", - " Three girls are kidnapped by a man with a diag...\n", - " M. Night ShyamalanJohn MaddenMartin ScorseseGo...\n", - " James McAvoy, Anya Taylor-Joy, Haley Lu Richar...\n", - " 84526\n", - " 4947\n", - " 7119214\n", - " 2933.50\n", - " 2614.0\n", - " cat_4cat_3cat_3cat_4cat_4cat_3cat_4cat_4cat_3c...\n", - " 23.818135\n", - " 310.6\n", - " 1\n", + " 2012\n", + " 124\n", + " 7.0\n", + " 485820\n", + " 126.46\n", + " 6.5\n", + " cat_4\n", + " 1.019839\n", + " 7.0\n", + " False\n", " \n", " \n", - " 4.2\n", - " 1421\n", - " The Last AirbenderExposed\n", - " Action,Adventure,FamilyCrime,Drama,Mystery\n", - " Follows the adventures of Aang, a young succes...\n", - " M. Night ShyamalanGee Malik Linton\n", - " Noah Ringer, Nicola Peltz, Jackson Rathbone,De...\n", - " 4026\n", - " 205\n", - " 133538\n", - " 0.00\n", - " 43.0\n", - " cat_4cat_2\n", - " 0.000000\n", - " 8.4\n", - " 0\n", - " \n", - " \n", - " 5.1\n", - " 3038\n", - " Jennifer's BodySex TapeThe Rise of the KraysBl...\n", - " Comedy,HorrorComedy,RomanceCrime,DramaHorror,T...\n", - " A newly possessed high school cheerleader turn...\n", - " Karyn KusamaJake KasdanZackary AdlerAdam Winga...\n", - " Megan Fox, Amanda Seyfried, Adam Brody, Johnny...\n", - " 10070\n", - " 497\n", - " 225091\n", - " 82.80\n", - " 255.0\n", - " cat_3cat_3cat_2cat_3cat_3\n", - " 0.868980\n", - " 25.5\n", - " 0\n", - " \n", - " \n", - " 5.9\n", - " 11381\n", - " Assassin's CreedThe PromiseRealiveThe HostPerc...\n", - " Action,Adventure,DramaDrama,HistorySci-FiActio...\n", - " When Callum Lynch explores the memories of his...\n", - " Justin KurzelTerry GeorgeMateo GilAndrew Nicco...\n", - " Michael Fassbender, Marion Cotillard, Jeremy I...\n", - " 38262\n", - " 2072\n", - " 1475960\n", - " 805.34\n", - " 806.0\n", - " cat_4cat_4cat_2cat_3cat_4cat_1cat_4cat_4cat_4c...\n", - " 7.540647\n", - " 109.1\n", - " 0\n", - " \n", - " \n", - " 3.2\n", - " 648\n", - " Tall Men\n", - " Fantasy,Horror,Thriller\n", - " A challenged man is stalked by tall phantoms i...\n", - " Jonathan Holbrook\n", - " Dan Crisafulli, Kay Whitney, Richard Garcia, P...\n", + " 2\n", + " 3\n", + " Split\n", + " Horror,Thriller\n", + " Three girls are kidnapped by a man with a diag...\n", + " M. Night Shyamalan\n", + " James McAvoy, Anya Taylor-Joy, Haley Lu Richar...\n", " 2016\n", - " 133\n", - " 173\n", - " 0.00\n", - " 57.0\n", - " cat_1\n", - " 0.000000\n", - " 4.2\n", - " 0\n", - " \n", - " \n", - " 6.3\n", - " 23829\n", - " Why Him?Sausage PartyLowridersPersonal Shopper...\n", - " ComedyAnimation,Adventure,ComedyDramaDrama,Mys...\n", - " A holiday gathering threatens to go off the ra...\n", - " John HamburgGreg TiernanRicardo de MontreuilOl...\n", - " Zoey Deutch, James Franco, Tangie Ambrose,Cedr...\n", - " 88639\n", - " 4747\n", - " 3501271\n", - " 2105.08\n", - " 2017.0\n", - " cat_3cat_4cat_1cat_3cat_4cat_2cat_3cat_4cat_2c...\n", - " 18.082360\n", - " 274.2\n", - " 1\n", + " 117\n", + " 7.3\n", + " 157606\n", + " 138.12\n", + " 6.2\n", + " cat_4\n", + " 1.180513\n", + " 8.3\n", + " False\n", " \n", " \n", - " 4.0\n", - " 617\n", - " 2307: Winter's Dream\n", - " Sci-Fi\n", - " In 2307, a future soldier is sent on a mission...\n", - " Joey Curtis\n", - " Paul Sidhu, Branden Coles, Arielle Holmes, Kel...\n", + " 3\n", + " 4\n", + " Sing\n", + " Animation,Comedy,Family\n", + " In a city of humanoid animals, a hustling thea...\n", + " Christophe Lourdelet\n", + " Matthew McConaughey,Reese Witherspoon, Seth Ma...\n", " 2016\n", - " 101\n", - " 277\n", - " 20.76\n", - " 53.0\n", - " cat_1\n", - " 0.205545\n", - " 4.0\n", - " 1\n", - " \n", - " \n", - " 1.9\n", - " 830\n", - " Disaster Movie\n", - " Comedy\n", - " Over the course of one evening, an unsuspectin...\n", - " Jason Friedberg\n", - " Carmen Electra, Vanessa Lachey,Nicole Parker, ...\n", - " 2008\n", - " 87\n", - " 77207\n", - " 14.17\n", - " 15.0\n", + " 108\n", + " 7.2\n", + " 60545\n", + " 270.32\n", + " 5.9\n", " cat_3\n", - " 0.162874\n", - " 0.9\n", - " 0\n", + " 2.502963\n", + " 6.2\n", + " False\n", " \n", " \n", - " 8.1\n", - " 5975\n", - " Guardians of the GalaxyLionStar Wars: Episode ...\n", - " Action,Adventure,Sci-FiBiography,DramaAction,A...\n", - " A group of intergalactic criminals are forced ...\n", - " James GunnGarth DavisJ.J. AbramsGeorge MillerB...\n", - " Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S...\n", - " 52321\n", - " 3290\n", - " 11436176\n", - " 4211.66\n", - " 1964.0\n", - " cat_4cat_4cat_4cat_4cat_4cat_5cat_4cat_4cat_4c...\n", - " 33.055304\n", - " 213.6\n", - " 0\n", - " \n", - " \n", - " 7.1\n", - " 25226\n", - " The Lost City of ZX-Men: Apocalypse5- 25- 77St...\n", - " Action,Adventure,BiographyAction,Adventure,Sci...\n", - " A true-life drama, centering on British explor...\n", - " James GrayBryan SingerPatrick Read JohnsonJust...\n", - " Charlie Hunnam, Robert Pattinson, Sienna Mille...\n", - " 104636\n", - " 6076\n", - " 8214814\n", - " 3379.01\n", - " 2894.0\n", - " cat_2cat_4cat_1cat_4cat_3cat_4cat_4cat_4cat_3c...\n", - " 27.139367\n", - " 363.2\n", - " 0\n", - " \n", - " \n", - " 6.0\n", - " 11882\n", - " Mike and Dave Need Wedding DatesInto the Woods...\n", - " Adventure,Comedy,RomanceAdventure,Comedy,Drama...\n", - " Two hard-partying brothers place an online ad ...\n", - " Jake SzymanskiRob MarshallFabio GuaglioneGaspa...\n", - " Zac Efron, Adam Devine, Anna Kendrick, Aubrey ...\n", - " 52370\n", - " 2798\n", - " 2177954\n", - " 1653.34\n", - " 1055.0\n", - " cat_3cat_4cat_2cat_3cat_3cat_3cat_4cat_4cat_3c...\n", - " 14.264225\n", - " 151.0\n", - " 0\n", - " \n", - " \n", - " 5.0\n", - " 2640\n", - " Whisky GaloreThe HappeningLída BaarováAmateur ...\n", - " Comedy,RomanceSci-Fi,ThrillerBiography,Drama,H...\n", - " Scottish islanders try to plunder cases of whi...\n", - " Gillies MacKinnonM. Night ShyamalanFilip RencL...\n", - " Tim Pigott-Smith, Naomi Battrick, Ellie Kendri...\n", - " 8056\n", - " 387\n", - " 173581\n", - " 64.51\n", - " 179.0\n", - " cat_1cat_4cat_1cat_2\n", - " 0.708901\n", - " 19.0\n", - " 1\n", + " 4\n", + " 5\n", + " Suicide Squad\n", + " Action,Adventure,Fantasy\n", + " A secret government agency recruits some of th...\n", + " David Ayer\n", + " Will Smith, Jared Leto, Margot Robbie, Viola D...\n", + " 2016\n", + " 123\n", + " 6.2\n", + " 393727\n", + " 325.02\n", + " 4.0\n", + " cat_4\n", + " 2.642439\n", + " 6.2\n", + " False\n", " \n", " \n", - " 7.9\n", - " 8465\n", - " Rogue OneManchester by the SeaCaptain America:...\n", - " Action,Adventure,Sci-FiDramaAction,Adventure,S...\n", - " The Rebel Alliance makes a risky move to steal...\n", - " Gareth EdwardsKenneth LonerganAnthony RussoMat...\n", - " Felicity Jones, Diego Luna, Alan Tudyk, Donnie...\n", - " 46289\n", - " 2863\n", - " 6604675\n", - " 2621.51\n", - " 1653.0\n", - " cat_4cat_4cat_4cat_4cat_2cat_4cat_4cat_3cat_4c...\n", - " 19.417432\n", - " 179.7\n", - " 0\n", - " \n", - " \n", - " 3.5\n", - " 1860\n", - " The IntentWrecker\n", - " Crime,DramaAction,Horror,Thriller\n", - " Gunz (Dylan Duffus) is thrust into a world of ...\n", - " Femi OyeniranMicheal Bafaro\n", - " Dylan Duffus, Scorcher,Shone Romulus, Jade Ash...\n", - " 4031\n", - " 187\n", - " 1412\n", - " 0.00\n", - " 96.0\n", - " cat_1cat_2\n", - " 0.000000\n", - " 8.0\n", - " 0\n", - " \n", - " \n", - " 4.3\n", - " 2816\n", - " Movie 43Fantastic FourYoga HosersSex and the C...\n", - " Comedy,RomanceAction,Adventure,Sci-FiComedy,Fa...\n", - " A series of interconnected short films follows...\n", - " Elizabeth BanksJosh TrankKevin SmithMichael Pa...\n", - " Emma Stone, Stephen Merchant, Richard Gere, Li...\n", - " 8054\n", - " 428\n", - " 274966\n", - " 160.27\n", - " 95.0\n", - " cat_3cat_4cat_2cat_3\n", - " 1.307981\n", - " 14.2\n", - " 0\n", - " \n", - " \n", - " 4.9\n", - " 4549\n", - " Bonjour AnneKnock KnockKickboxer: VengeanceMeg...\n", - " Comedy,Drama,RomanceDrama,Horror,ThrillerActio...\n", - " Anne is at a crossroads in her life. Long marr...\n", - " Eleanor CoppolaEli RothJohn StockwellMichael G...\n", - " Diane Lane, Alec Baldwin, Arnaud Viard, Linda ...\n", - " 14092\n", - " 707\n", - " 616607\n", - " 774.23\n", - " 370.0\n", - " cat_1cat_3cat_2cat_2cat_4cat_4cat_4\n", - " 6.898410\n", - " 35.3\n", - " 0\n", - " \n", - " \n", - " 6.8\n", - " 20442\n", - " Paris pieds nusThe Autopsy of Jane DoeCollater...\n", - " ComedyHorror,Mystery,ThrillerDrama,RomanceActi...\n", - " Fiona visits Paris for the first time to assis...\n", - " Dominique AbelAndré ØvredalDavid FrankelSam Me...\n", - " Fiona Gordon, Dominique Abel,Emmanuelle Riva, ...\n", - " 74474\n", - " 3990\n", - " 4670467\n", - " 1890.94\n", - " 2083.0\n", - " cat_1cat_3cat_3cat_4cat_4cat_4cat_3cat_2cat_4c...\n", - " 16.550461\n", - " 250.6\n", - " 1\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", + " ...\n", " \n", " \n", - " 8.0\n", - " 5542\n", - " ArrivalDeadpoolThe MartianThe RevenantStar Tre...\n", - " Drama,Mystery,Sci-FiAction,Adventure,ComedyAdv...\n", - " When twelve mysterious spacecraft appear aroun...\n", - " Denis VilleneuveTim MillerRidley ScottAlejandr...\n", - " Amy Adams, Jeremy Renner, Forest Whitaker,Mich...\n", - " 38217\n", - " 2331\n", - " 8429947\n", - " 2540.56\n", - " 1501.0\n", - " cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_3c...\n", - " 20.647620\n", - " 155.0\n", - " 0\n", - " \n", - " \n", - " 7.5\n", - " 16219\n", - " Fantastic Beasts and Where to Find ThemNocturn...\n", - " Adventure,Family,FantasyDrama,ThrillerDramaBio...\n", - " The adventures of writer Newt Scamander in New...\n", - " David YatesTom FordBarry JenkinsClint Eastwood...\n", - " Eddie Redmayne, Katherine Waterston, Alison Su...\n", - " 70438\n", - " 4256\n", - " 6162150\n", - " 2925.55\n", - " 2408.0\n", - " cat_4cat_4cat_4cat_4cat_1cat_3cat_4cat_4cat_4c...\n", - " 24.775876\n", - " 260.5\n", - " 1\n", + " 995\n", + " 996\n", + " Secret in Their Eyes\n", + " Crime,Drama,Mystery\n", + " A tight-knit team of rising investigators, alo...\n", + " Billy Ray\n", + " Chiwetel Ejiofor, Nicole Kidman, Julia Roberts...\n", + " 2015\n", + " 111\n", + " 6.2\n", + " 27585\n", + " NaN\n", + " 4.5\n", + " cat_3\n", + " NaN\n", + " 6.2\n", + " False\n", " \n", " \n", - " 6.2\n", - " 23796\n", - " Suicide SquadBad MomsThe Neon DemonDiary of a ...\n", - " Action,Adventure,FantasyComedyHorror,ThrillerC...\n", - " A secret government agency recruits some of th...\n", - " David AyerJon LucasNicolas Winding RefnThor Fr...\n", - " Will Smith, Jared Leto, Margot Robbie, Viola D...\n", - " 74480\n", - " 4033\n", - " 3926113\n", - " 2715.28\n", - " 1852.0\n", - " cat_4cat_3cat_3cat_3cat_3cat_3cat_3cat_3cat_4c...\n", - " 23.984000\n", - " 224.4\n", - " 0\n", - " \n", - " \n", - " 8.3\n", - " 2236\n", - " La La LandBahubali: The BeginningInglourious B...\n", - " Comedy,Drama,MusicAction,Adventure,DramaAdvent...\n", - " A jazz pianist falls for an aspiring actress i...\n", - " Damien ChazelleS.S. RajamouliQuentin Tarantino...\n", - " Ryan Gosling, Emma Stone, Rosemarie DeWitt, J....\n", - " 14087\n", - " 850\n", - " 2795136\n", - " 986.65\n", - " 489.0\n", - " cat_4cat_3cat_4cat_4cat_1cat_4cat_4\n", - " 9.094861\n", - " 55.1\n", - " 0\n", - " \n", - " \n", - " 3.9\n", - " 1166\n", - " The Disappointments RoomThe Black RoomBirth of...\n", - " Drama,Horror,ThrillerHorrorAction,Biography,Drama\n", - " A mother and her young son release unimaginabl...\n", - " D.J. CarusoRolfe KanefskyGeorge Nolfi\n", - " Kate Beckinsale, Mel Raido, Duncan Joiner, Luc...\n", - " 6048\n", - " 279\n", - " 5687\n", - " 95.46\n", - " 163.0\n", - " cat_2cat_1cat_1\n", - " 0.931751\n", - " 12.7\n", - " 2\n", + " 996\n", + " 997\n", + " Hostel: Part II\n", + " Horror\n", + " Three American college students studying abroa...\n", + " Eli Roth\n", + " Lauren German, Heather Matarazzo, Bijou Philli...\n", + " 2007\n", + " 94\n", + " 5.5\n", + " 73152\n", + " 17.54\n", + " 4.6\n", + " cat_3\n", + " 0.186596\n", + " 5.5\n", + " False\n", " \n", " \n", - " 8.8\n", - " 199\n", - " InceptionDangal\n", - " Action,Adventure,Sci-FiAction,Biography,Drama\n", - " A thief, who steals corporate secrets through ...\n", - " Christopher NolanNitesh Tiwari\n", - " Leonardo DiCaprio, Joseph Gordon-Levitt, Ellen...\n", - " 4026\n", - " 309\n", - " 1632594\n", - " 303.72\n", - " 74.0\n", - " cat_5cat_3\n", - " 2.046079\n", - " 17.6\n", - " 0\n", - " \n", - " \n", - " 8.5\n", - " 1893\n", - " The PrestigeThe DepartedThe Dark Knight RisesW...\n", - " Drama,Mystery,Sci-FiCrime,Drama,ThrillerAction...\n", - " Two stage magicians engage in competitive one-...\n", - " Christopher NolanMartin ScorseseChristopher No...\n", - " Christian Bale, Hugh Jackman, Scarlett Johanss...\n", - " 12051\n", - " 854\n", - " 3931287\n", - " 659.15\n", - " 448.0\n", - " cat_4cat_4cat_5cat_4cat_4cat_4\n", - " 4.229375\n", - " 54.0\n", - " 0\n", - " \n", - " \n", - " 8.6\n", - " 384\n", - " InterstellarKimi no na waThe Intouchables\n", - " Adventure,Drama,Sci-FiAnimation,Drama,FantasyB...\n", - " A team of explorers travel through a wormhole ...\n", - " Christopher NolanMakoto ShinkaiOlivier Nakache\n", - " Matthew McConaughey, Anne Hathaway, Jessica Ch...\n", - " 6041\n", - " 387\n", - " 1639822\n", - " 205.85\n", - " 210.0\n", - " cat_5cat_3cat_4\n", - " 1.274196\n", - " 24.8\n", - " 0\n", - " \n", - " \n", - " 9.0\n", - " 55\n", - " The Dark Knight\n", - " Action,Crime,Drama\n", - " When the menace known as the Joker wreaks havo...\n", - " Christopher Nolan\n", - " Christian Bale, Heath Ledger, Aaron Eckhart,Mi...\n", + " 997\n", + " 998\n", + " Step Up 2: The Streets\n", + " Drama,Music,Romance\n", + " Romantic sparks occur between two dance studen...\n", + " Jon M. Chu\n", + " Robert Hoffman, Briana Evigan, Cassie Ventura,...\n", " 2008\n", - " 152\n", - " 1791916\n", - " 533.32\n", - " 82.0\n", - " cat_5\n", - " 3.508684\n", - " 9.0\n", - " 0\n", - " \n", - " \n", - " 7.2\n", - " 20603\n", - " SingThe FounderJohn WickDon't BreatheDeepwater...\n", - " Animation,Comedy,FamilyBiography,Drama,History...\n", - " In a city of humanoid animals, a hustling thea...\n", - " Christophe LourdeletJohn Lee HancockChad Stahe...\n", - " Matthew McConaughey,Reese Witherspoon, Seth Ma...\n", - " 84526\n", - " 4806\n", - " 7490682\n", - " 3499.91\n", - " 2603.0\n", - " cat_3cat_3cat_4cat_4cat_3cat_4cat_4cat_4cat_3c...\n", - " 30.197025\n", - " 306.4\n", - " 0\n", - " \n", - " \n", - " 6.6\n", - " 25421\n", - " The Secret Life of PetsNerveCrimson PeakThe Ch...\n", - " Animation,Adventure,ComedyAdventure,Crime,Myst...\n", - " The quiet life of a terrier named Max is upend...\n", - " Chris RenaudHenry JoostGuillermo del ToroRoss ...\n", - " Louis C.K., Eric Stonestreet, Kevin Hart, Lake...\n", - " 84498\n", - " 4620\n", - " 6391721\n", - " 2856.55\n", - " 2067.0\n", - " cat_4cat_3cat_3cat_3cat_4cat_3cat_4cat_3cat_4c...\n", - " 25.737712\n", - " 269.2\n", - " 1\n", + " 98\n", + " 6.2\n", + " 70699\n", + " 58.01\n", + " 5.0\n", + " cat_3\n", + " 0.591939\n", + " 6.2\n", + " False\n", " \n", " \n", - " 5.2\n", - " 5926\n", - " TwilightBeyond the GatesA Kind of MurderThe 5t...\n", - " Drama,Fantasy,RomanceAdventure,HorrorCrime,Dra...\n", - " A teenage girl risks everything when she falls...\n", - " Catherine HardwickeJackson StewartAndy Goddard...\n", - " Kristen Stewart, Robert Pattinson, Billy Burke...\n", - " 22134\n", - " 1176\n", - " 974947\n", - " 505.78\n", - " 427.0\n", - " cat_4cat_2cat_2cat_3cat_3cat_4cat_4cat_2cat_3c...\n", - " 4.399000\n", - " 61.2\n", - " 0\n", - " \n", - " \n", - " 6.9\n", - " 19301\n", - " The Magnificent SevenCaptain America: The Firs...\n", - " Action,Adventure,WesternAction,Adventure,Sci-F...\n", - " Seven gunmen in the old west gradually come to...\n", - " Antoine FuquaJoe JohnstonDavid Robert Mitchell...\n", - " Denzel Washington, Chris Pratt, Ethan Hawke,Vi...\n", - " 62397\n", - " 3417\n", - " 3866009\n", - " 1432.78\n", - " 1634.0\n", - " cat_4cat_4cat_4cat_3cat_4cat_1cat_3cat_4cat_1c...\n", - " 12.987459\n", - " 209.9\n", - " 3\n", + " 998\n", + " 999\n", + " Search Party\n", + " Adventure,Comedy\n", + " A pair of friends embark on a mission to reuni...\n", + " Scot Armstrong\n", + " Adam Pally, T.J. Miller, Thomas Middleditch,Sh...\n", + " 2014\n", + " 93\n", + " 5.6\n", + " 4881\n", + " NaN\n", + " 2.2\n", + " cat_2\n", + " NaN\n", + " 4.6\n", + " False\n", " \n", " \n", - " 5.8\n", - " 11829\n", - " Underworld: Blood WarsThe VoidAll We HadOffice...\n", - " Action,Adventure,FantasyHorror,Mystery,Sci-FiD...\n", - " Vampire death dealer, Selene (Kate Beckinsale)...\n", - " Anna FoersterJeremy GillespieKatie HolmesJosh ...\n", - " Kate Beckinsale, Theo James, Tobias Menzies, L...\n", - " 52353\n", - " 2754\n", - " 2067400\n", - " 1215.23\n", - " 1179.0\n", - " cat_3cat_2cat_2cat_3cat_2cat_3cat_3cat_2cat_4c...\n", - " 10.512693\n", - " 148.8\n", - " 0\n", - " \n", - " \n", - " 5.5\n", - " 8506\n", - " Gods of EgyptThe House BunnyVincent N RoxxySev...\n", - " Action,Adventure,FantasyComedy,RomanceCrime,Dr...\n", - " Mortal hero Bek teams with the god Horus in an...\n", - " Alex ProyasFred WolfGary Michael SchultzSergei...\n", - " Brenton Thwaites, Nikolaj Coster-Waldau, Gerar...\n", - " 28163\n", - " 1476\n", - " 1074968\n", - " 875.18\n", - " 570.0\n", - " cat_3cat_3cat_1cat_3cat_4cat_3cat_2cat_3cat_2c...\n", - " 7.710255\n", - " 73.0\n", - " 1\n", - " \n", - " \n", + " 999\n", + " 1000\n", + " Nine Lives\n", + " Comedy,Family,Fantasy\n", + " A stuffy businessman finds himself trapped ins...\n", + " Barry Sonnenfeld\n", + " Kevin Spacey, Jennifer Garner, Robbie Amell,Ch...\n", + " 2016\n", + " 87\n", + " 5.3\n", + " 12435\n", + " 19.64\n", + " 1.1\n", + " cat_3\n", + " 0.225747\n", + " 4.3\n", + " False\n", + " \n", + " \n", + "\n", + "

1000 rows × 16 columns

\n", + "" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + ".. ... ... ... \n", + "995 996 Secret in Their Eyes Crime,Drama,Mystery \n", + "996 997 Hostel: Part II Horror \n", + "997 998 Step Up 2: The Streets Drama,Music,Romance \n", + "998 999 Search Party Adventure,Comedy \n", + "999 1000 Nine Lives Comedy,Family,Fantasy \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + ".. ... ... \n", + "995 A tight-knit team of rising investigators, alo... Billy Ray \n", + "996 Three American college students studying abroa... Eli Roth \n", + "997 Romantic sparks occur between two dance studen... Jon M. Chu \n", + "998 A pair of friends embark on a mission to reuni... Scot Armstrong \n", + "999 A stuffy businessman finds himself trapped ins... Barry Sonnenfeld \n", + "\n", + " Actors Year \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 \n", + ".. ... ... \n", + "995 Chiwetel Ejiofor, Nicole Kidman, Julia Roberts... 2015 \n", + "996 Lauren German, Heather Matarazzo, Bijou Philli... 2007 \n", + "997 Robert Hoffman, Briana Evigan, Cassie Ventura,... 2008 \n", + "998 Adam Pally, T.J. Miller, Thomas Middleditch,Sh... 2014 \n", + "999 Kevin Spacey, Jennifer Garner, Robbie Amell,Ch... 2016 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "0 121 8.1 757074 333.13 7.6 cat_4 \n", + "1 124 7.0 485820 126.46 6.5 cat_4 \n", + "2 117 7.3 157606 138.12 6.2 cat_4 \n", + "3 108 7.2 60545 270.32 5.9 cat_3 \n", + "4 123 6.2 393727 325.02 4.0 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "995 111 6.2 27585 NaN 4.5 cat_3 \n", + "996 94 5.5 73152 17.54 4.6 cat_3 \n", + "997 98 6.2 70699 58.01 5.0 cat_3 \n", + "998 93 5.6 4881 NaN 2.2 cat_2 \n", + "999 87 5.3 12435 19.64 1.1 cat_3 \n", + "\n", + " Revenue per Minute New Rating Is Prime? \n", + "0 2.753140 8.1 False \n", + "1 1.019839 7.0 False \n", + "2 1.180513 8.3 False \n", + "3 2.502963 6.2 False \n", + "4 2.642439 6.2 False \n", + ".. ... ... ... \n", + "995 NaN 6.2 False \n", + "996 0.186596 5.5 False \n", + "997 0.591939 6.2 False \n", + "998 NaN 4.6 False \n", + "999 0.225747 4.3 False \n", + "\n", + "[1000 rows x 16 columns]" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "30aa1c51", + "metadata": {}, + "outputs": [], + "source": [ + "df[\"Average_Rating\"] = (df[\"Rating\"] + df[\"Metascore\"]) / 2" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "77c139e4", + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBinRevenue per MinuteNew RatingIs Prime?Average_Rating
01Guardians of the GalaxyAction,Adventure,Sci-FiA group of intergalactic criminals are forced ...James GunnChris Pratt, Vin Diesel, Bradley Cooper, Zoe S...20141218.1757074333.137.6cat_42.7531408.1False7.85
12PrometheusAdventure,Mystery,Sci-FiFollowing clues to the origin of mankind, a te...Ridley ScottNoomi Rapace, Logan Marshall-Green, Michael Fa...20121247.0485820126.466.5cat_41.0198397.0False6.75
23SplitHorror,ThrillerThree girls are kidnapped by a man with a diag...M. Night ShyamalanJames McAvoy, Anya Taylor-Joy, Haley Lu Richar...20161177.3157606138.126.2cat_41.1805138.3False6.75
34SingAnimation,Comedy,FamilyIn a city of humanoid animals, a hustling thea...Christophe LourdeletMatthew McConaughey,Reese Witherspoon, Seth Ma...20161087.260545270.325.9cat_32.5029636.2False6.55
45Suicide SquadAction,Adventure,FantasyA secret government agency recruits some of th...David AyerWill Smith, Jared Leto, Margot Robbie, Viola D...20161236.2393727325.024.0cat_42.6424396.2False5.10
......................................................
995996Secret in Their EyesCrime,Drama,MysteryA tight-knit team of rising investigators, alo...Billy RayChiwetel Ejiofor, Nicole Kidman, Julia Roberts...20151116.227585NaN4.5cat_3NaN6.2False5.35
996997Hostel: Part IIHorrorThree American college students studying abroa...Eli RothLauren German, Heather Matarazzo, Bijou Philli...2007945.57315217.544.6cat_30.1865965.5False5.05
997998Step Up 2: The StreetsDrama,Music,RomanceRomantic sparks occur between two dance studen...Jon M. ChuRobert Hoffman, Briana Evigan, Cassie Ventura,...2008986.27069958.015.0cat_30.5919396.2False5.60
998999Search PartyAdventure,ComedyA pair of friends embark on a mission to reuni...Scot ArmstrongAdam Pally, T.J. Miller, Thomas Middleditch,Sh...2014935.64881NaN2.2cat_2NaN4.6False3.90
9991000Nine LivesComedy,Family,FantasyA stuffy businessman finds himself trapped ins...Barry SonnenfeldKevin Spacey, Jennifer Garner, Robbie Amell,Ch...2016875.31243519.641.1cat_30.2257474.3False3.20
\n", + "

1000 rows × 17 columns

\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + ".. ... ... ... \n", + "995 996 Secret in Their Eyes Crime,Drama,Mystery \n", + "996 997 Hostel: Part II Horror \n", + "997 998 Step Up 2: The Streets Drama,Music,Romance \n", + "998 999 Search Party Adventure,Comedy \n", + "999 1000 Nine Lives Comedy,Family,Fantasy \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + ".. ... ... \n", + "995 A tight-knit team of rising investigators, alo... Billy Ray \n", + "996 Three American college students studying abroa... Eli Roth \n", + "997 Romantic sparks occur between two dance studen... Jon M. Chu \n", + "998 A pair of friends embark on a mission to reuni... Scot Armstrong \n", + "999 A stuffy businessman finds himself trapped ins... Barry Sonnenfeld \n", + "\n", + " Actors Year \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 \n", + ".. ... ... \n", + "995 Chiwetel Ejiofor, Nicole Kidman, Julia Roberts... 2015 \n", + "996 Lauren German, Heather Matarazzo, Bijou Philli... 2007 \n", + "997 Robert Hoffman, Briana Evigan, Cassie Ventura,... 2008 \n", + "998 Adam Pally, T.J. Miller, Thomas Middleditch,Sh... 2014 \n", + "999 Kevin Spacey, Jennifer Garner, Robbie Amell,Ch... 2016 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "0 121 8.1 757074 333.13 7.6 cat_4 \n", + "1 124 7.0 485820 126.46 6.5 cat_4 \n", + "2 117 7.3 157606 138.12 6.2 cat_4 \n", + "3 108 7.2 60545 270.32 5.9 cat_3 \n", + "4 123 6.2 393727 325.02 4.0 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "995 111 6.2 27585 NaN 4.5 cat_3 \n", + "996 94 5.5 73152 17.54 4.6 cat_3 \n", + "997 98 6.2 70699 58.01 5.0 cat_3 \n", + "998 93 5.6 4881 NaN 2.2 cat_2 \n", + "999 87 5.3 12435 19.64 1.1 cat_3 \n", + "\n", + " Revenue per Minute New Rating Is Prime? Average_Rating \n", + "0 2.753140 8.1 False 7.85 \n", + "1 1.019839 7.0 False 6.75 \n", + "2 1.180513 8.3 False 6.75 \n", + "3 2.502963 6.2 False 6.55 \n", + "4 2.642439 6.2 False 5.10 \n", + ".. ... ... ... ... \n", + "995 NaN 6.2 False 5.35 \n", + "996 0.186596 5.5 False 5.05 \n", + "997 0.591939 6.2 False 5.60 \n", + "998 NaN 4.6 False 3.90 \n", + "999 0.225747 4.3 False 3.20 \n", + "\n", + "[1000 rows x 17 columns]" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "2d762507", + "metadata": {}, + "outputs": [], + "source": [ + "top_avg_rated_movies = df.sort_values(by=\"Average_Rating\", ascending=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "5a019e72", + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBinRevenue per MinuteNew RatingIs Prime?Average_Rating
230231Pan's LabyrinthDrama,Fantasy,WarIn the falangist Spain of 1944, the bookish yo...Guillermo del ToroIvana Baquero, Ariadna Gil, Sergi López,Maribe...20061188.249887937.629.8cat_40.3188148.2False9.00
656657BoyhoodDramaThe life of Mason, from early childhood to his...Richard LinklaterEllar Coltrane, Patricia Arquette, Ethan Hawke...20141657.928672225.3610.0cat_40.1536977.9False8.95
11111212 Years a SlaveBiography,Drama,HistoryIn the antebellum United States, Solomon North...Steve McQueenChiwetel Ejiofor, Michael Kenneth Williams, Mi...20131348.148633856.679.6cat_40.4229108.1False8.85
67La La LandComedy,Drama,MusicA jazz pianist falls for an aspiring actress i...Damien ChazelleRyan Gosling, Emma Stone, Rosemarie DeWitt, J....20161288.3258682151.069.3cat_41.1801567.3False8.80
241242Inside OutAnimation,Adventure,ComedyAfter young Riley is uprooted from her Midwest...Pete DocterAmy Poehler, Bill Hader, Lewis Black, Mindy Ka...2015958.2416689356.459.4cat_43.7521057.2False8.80
......................................................
967968The WalkAdventure,Biography,CrimeIn 1974, high-wire artist Philippe Petit recru...Robert ZemeckisJoseph Gordon-Levitt, Charlotte Le Bon,Guillau...20151237.39237810.14NaNcat_30.0824397.3FalseNaN
969970The Lone RangerAction,Adventure,WesternNative American warrior Tonto recounts the unt...Gore VerbinskiJohnny Depp, Armie Hammer, William Fichtner,To...20131506.519085589.29NaNcat_40.5952676.5FalseNaN
971972DisturbiaDrama,Mystery,ThrillerA teen living under house arrest becomes convi...D.J. CarusoShia LaBeouf, David Morse, Carrie-Anne Moss, S...20071056.919349180.05NaNcat_40.7623817.9FalseNaN
989990SelmaBiography,Drama,HistoryA chronicle of Martin Luther King's campaign t...Ava DuVernayDavid Oyelowo, Carmen Ejogo, Tim Roth, Lorrain...20141287.56763752.07NaNcat_30.4067977.5FalseNaN
992993Take Me Home TonightComedy,Drama,RomanceFour years after graduation, an awkward high s...Michael DowseTopher Grace, Anna Faris, Dan Fogler, Teresa P...2011976.3454196.92NaNcat_30.0713405.3FalseNaN
\n", + "

1000 rows × 17 columns

\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "230 231 Pan's Labyrinth Drama,Fantasy,War \n", + "656 657 Boyhood Drama \n", + "111 112 12 Years a Slave Biography,Drama,History \n", + "6 7 La La Land Comedy,Drama,Music \n", + "241 242 Inside Out Animation,Adventure,Comedy \n", + ".. ... ... ... \n", + "967 968 The Walk Adventure,Biography,Crime \n", + "969 970 The Lone Ranger Action,Adventure,Western \n", + "971 972 Disturbia Drama,Mystery,Thriller \n", + "989 990 Selma Biography,Drama,History \n", + "992 993 Take Me Home Tonight Comedy,Drama,Romance \n", + "\n", + " Description Director \\\n", + "230 In the falangist Spain of 1944, the bookish yo... Guillermo del Toro \n", + "656 The life of Mason, from early childhood to his... Richard Linklater \n", + "111 In the antebellum United States, Solomon North... Steve McQueen \n", + "6 A jazz pianist falls for an aspiring actress i... Damien Chazelle \n", + "241 After young Riley is uprooted from her Midwest... Pete Docter \n", + ".. ... ... \n", + "967 In 1974, high-wire artist Philippe Petit recru... Robert Zemeckis \n", + "969 Native American warrior Tonto recounts the unt... Gore Verbinski \n", + "971 A teen living under house arrest becomes convi... D.J. Caruso \n", + "989 A chronicle of Martin Luther King's campaign t... Ava DuVernay \n", + "992 Four years after graduation, an awkward high s... Michael Dowse \n", + "\n", + " Actors Year \\\n", + "230 Ivana Baquero, Ariadna Gil, Sergi López,Maribe... 2006 \n", + "656 Ellar Coltrane, Patricia Arquette, Ethan Hawke... 2014 \n", + "111 Chiwetel Ejiofor, Michael Kenneth Williams, Mi... 2013 \n", + "6 Ryan Gosling, Emma Stone, Rosemarie DeWitt, J.... 2016 \n", + "241 Amy Poehler, Bill Hader, Lewis Black, Mindy Ka... 2015 \n", + ".. ... ... \n", + "967 Joseph Gordon-Levitt, Charlotte Le Bon,Guillau... 2015 \n", + "969 Johnny Depp, Armie Hammer, William Fichtner,To... 2013 \n", + "971 Shia LaBeouf, David Morse, Carrie-Anne Moss, S... 2007 \n", + "989 David Oyelowo, Carmen Ejogo, Tim Roth, Lorrain... 2014 \n", + "992 Topher Grace, Anna Faris, Dan Fogler, Teresa P... 2011 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "230 118 8.2 498879 37.62 9.8 cat_4 \n", + "656 165 7.9 286722 25.36 10.0 cat_4 \n", + "111 134 8.1 486338 56.67 9.6 cat_4 \n", + "6 128 8.3 258682 151.06 9.3 cat_4 \n", + "241 95 8.2 416689 356.45 9.4 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "967 123 7.3 92378 10.14 NaN cat_3 \n", + "969 150 6.5 190855 89.29 NaN cat_4 \n", + "971 105 6.9 193491 80.05 NaN cat_4 \n", + "989 128 7.5 67637 52.07 NaN cat_3 \n", + "992 97 6.3 45419 6.92 NaN cat_3 \n", + "\n", + " Revenue per Minute New Rating Is Prime? Average_Rating \n", + "230 0.318814 8.2 False 9.00 \n", + "656 0.153697 7.9 False 8.95 \n", + "111 0.422910 8.1 False 8.85 \n", + "6 1.180156 7.3 False 8.80 \n", + "241 3.752105 7.2 False 8.80 \n", + ".. ... ... ... ... \n", + "967 0.082439 7.3 False NaN \n", + "969 0.595267 6.5 False NaN \n", + "971 0.762381 7.9 False NaN \n", + "989 0.406797 7.5 False NaN \n", + "992 0.071340 5.3 False NaN \n", + "\n", + "[1000 rows x 17 columns]" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "top_avg_rated_movies" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "31f9595a", + "metadata": {}, + "outputs": [], + "source": [ + "# I am going to create a new ranking taking in consideration the number of votes. If a film has more than 30000 votes, the ranking will decrease 1 point. It will add 1 point to the ones below that number of votes.\n", + "\n", + "def ranking_votes(votes, rating):\n", + " if votes >= 30000:\n", + " rating = rating - 1\n", + " else:\n", + " rating = rating + 1\n", + " return rating\n", + "\n", + "df[\"Rating_Votes\"] = df.apply(lambda x: ranking_votes(x[\"Votes\"], x[\"Rating\"]), axis = 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "7ad8f5c5", + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBinRevenue per MinuteNew RatingIs Prime?Average_RatingRating_Votes
01Guardians of the GalaxyAction,Adventure,Sci-FiA group of intergalactic criminals are forced ...James GunnChris Pratt, Vin Diesel, Bradley Cooper, Zoe S...20141218.1757074333.137.6cat_42.7531408.1False7.857.1
12PrometheusAdventure,Mystery,Sci-FiFollowing clues to the origin of mankind, a te...Ridley ScottNoomi Rapace, Logan Marshall-Green, Michael Fa...20121247.0485820126.466.5cat_41.0198397.0False6.756.0
23SplitHorror,ThrillerThree girls are kidnapped by a man with a diag...M. Night ShyamalanJames McAvoy, Anya Taylor-Joy, Haley Lu Richar...20161177.3157606138.126.2cat_41.1805138.3False6.756.3
34SingAnimation,Comedy,FamilyIn a city of humanoid animals, a hustling thea...Christophe LourdeletMatthew McConaughey,Reese Witherspoon, Seth Ma...20161087.260545270.325.9cat_32.5029636.2False6.556.2
45Suicide SquadAction,Adventure,FantasyA secret government agency recruits some of th...David AyerWill Smith, Jared Leto, Margot Robbie, Viola D...20161236.2393727325.024.0cat_42.6424396.2False5.105.2
.........................................................
995996Secret in Their EyesCrime,Drama,MysteryA tight-knit team of rising investigators, alo...Billy RayChiwetel Ejiofor, Nicole Kidman, Julia Roberts...20151116.227585NaN4.5cat_3NaN6.2False5.357.2
996997Hostel: Part IIHorrorThree American college students studying abroa...Eli RothLauren German, Heather Matarazzo, Bijou Philli...2007945.57315217.544.6cat_30.1865965.5False5.054.5
997998Step Up 2: The StreetsDrama,Music,RomanceRomantic sparks occur between two dance studen...Jon M. ChuRobert Hoffman, Briana Evigan, Cassie Ventura,...2008986.27069958.015.0cat_30.5919396.2False5.605.2
998999Search PartyAdventure,ComedyA pair of friends embark on a mission to reuni...Scot ArmstrongAdam Pally, T.J. Miller, Thomas Middleditch,Sh...2014935.64881NaN2.2cat_2NaN4.6False3.906.6
9991000Nine LivesComedy,Family,FantasyA stuffy businessman finds himself trapped ins...Barry SonnenfeldKevin Spacey, Jennifer Garner, Robbie Amell,Ch...2016875.31243519.641.1cat_30.2257474.3False3.206.3
\n", + "

1000 rows × 18 columns

\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + ".. ... ... ... \n", + "995 996 Secret in Their Eyes Crime,Drama,Mystery \n", + "996 997 Hostel: Part II Horror \n", + "997 998 Step Up 2: The Streets Drama,Music,Romance \n", + "998 999 Search Party Adventure,Comedy \n", + "999 1000 Nine Lives Comedy,Family,Fantasy \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + ".. ... ... \n", + "995 A tight-knit team of rising investigators, alo... Billy Ray \n", + "996 Three American college students studying abroa... Eli Roth \n", + "997 Romantic sparks occur between two dance studen... Jon M. Chu \n", + "998 A pair of friends embark on a mission to reuni... Scot Armstrong \n", + "999 A stuffy businessman finds himself trapped ins... Barry Sonnenfeld \n", + "\n", + " Actors Year \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 \n", + ".. ... ... \n", + "995 Chiwetel Ejiofor, Nicole Kidman, Julia Roberts... 2015 \n", + "996 Lauren German, Heather Matarazzo, Bijou Philli... 2007 \n", + "997 Robert Hoffman, Briana Evigan, Cassie Ventura,... 2008 \n", + "998 Adam Pally, T.J. Miller, Thomas Middleditch,Sh... 2014 \n", + "999 Kevin Spacey, Jennifer Garner, Robbie Amell,Ch... 2016 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "0 121 8.1 757074 333.13 7.6 cat_4 \n", + "1 124 7.0 485820 126.46 6.5 cat_4 \n", + "2 117 7.3 157606 138.12 6.2 cat_4 \n", + "3 108 7.2 60545 270.32 5.9 cat_3 \n", + "4 123 6.2 393727 325.02 4.0 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "995 111 6.2 27585 NaN 4.5 cat_3 \n", + "996 94 5.5 73152 17.54 4.6 cat_3 \n", + "997 98 6.2 70699 58.01 5.0 cat_3 \n", + "998 93 5.6 4881 NaN 2.2 cat_2 \n", + "999 87 5.3 12435 19.64 1.1 cat_3 \n", + "\n", + " Revenue per Minute New Rating Is Prime? Average_Rating Rating_Votes \n", + "0 2.753140 8.1 False 7.85 7.1 \n", + "1 1.019839 7.0 False 6.75 6.0 \n", + "2 1.180513 8.3 False 6.75 6.3 \n", + "3 2.502963 6.2 False 6.55 6.2 \n", + "4 2.642439 6.2 False 5.10 5.2 \n", + ".. ... ... ... ... ... \n", + "995 NaN 6.2 False 5.35 7.2 \n", + "996 0.186596 5.5 False 5.05 4.5 \n", + "997 0.591939 6.2 False 5.60 5.2 \n", + "998 NaN 4.6 False 3.90 6.6 \n", + "999 0.225747 4.3 False 3.20 6.3 \n", + "\n", + "[1000 rows x 18 columns]" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "3f3f23f4", + "metadata": {}, + "outputs": [], + "source": [ + "#Finally, I am going to create a rating based on the the other kind of ratings. \n", + "\n", + "df[\"Final_Rating\"] = (df[\"Rating\"] + df[\"Metascore\"] + df[\"Average_Rating\"] + df[\"Rating_Votes\"]) / 4" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "9bd0d1a4", + "metadata": { + "scrolled": false + }, + "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", + "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBinRevenue per MinuteNew RatingIs Prime?Average_RatingRating_VotesFinal_Rating
230231Pan's LabyrinthDrama,Fantasy,WarIn the falangist Spain of 1944, the bookish yo...Guillermo del ToroIvana Baquero, Ariadna Gil, Sergi López,Maribe...20061188.249887937.629.8cat_40.3188148.2False9.007.28.5500
861862Koe no katachiAnimation,Drama,RomanceThe story revolves around Nishimiya Shoko, a g...Naoko YamadaMiyu Irino, Saori Hayami, Aoi Yuki, Kenshô Ono20161298.42421NaN8.0cat_2NaN8.4False8.209.48.5000
611612Toni ErdmannComedy,DramaA practical joking father tries to reconnect w...Maren AdeSandra Hüller, Peter Simonischek, Michael Witt...20161627.6243871.489.3cat_30.0091366.6False8.458.68.4875
5455The Dark KnightAction,Crime,DramaWhen the menace known as the Joker wreaks havo...Christopher NolanChristian Bale, Heath Ledger, Aaron Eckhart,Mi...20081529.01791916533.328.2cat_53.5086849.0False8.608.08.4500
184185ForushandeDrama,ThrillerWhile both participating in a production of \"D...Asghar FarhadiTaraneh Alidoosti, Shahab Hosseini, Babak Kari...20161248.0223893.408.5cat_30.0274199.0False8.259.08.4375
............................................................
967968The WalkAdventure,Biography,CrimeIn 1974, high-wire artist Philippe Petit recru...Robert ZemeckisJoseph Gordon-Levitt, Charlotte Le Bon,Guillau...20151237.39237810.14NaNcat_30.0824397.3FalseNaN6.3NaN
969970The Lone RangerAction,Adventure,WesternNative American warrior Tonto recounts the unt...Gore VerbinskiJohnny Depp, Armie Hammer, William Fichtner,To...20131506.519085589.29NaNcat_40.5952676.5FalseNaN5.5NaN
971972DisturbiaDrama,Mystery,ThrillerA teen living under house arrest becomes convi...D.J. CarusoShia LaBeouf, David Morse, Carrie-Anne Moss, S...20071056.919349180.05NaNcat_40.7623817.9FalseNaN5.9NaN
989990SelmaBiography,Drama,HistoryA chronicle of Martin Luther King's campaign t...Ava DuVernayDavid Oyelowo, Carmen Ejogo, Tim Roth, Lorrain...20141287.56763752.07NaNcat_30.4067977.5FalseNaN6.5NaN
992993Take Me Home TonightComedy,Drama,RomanceFour years after graduation, an awkward high s...Michael DowseTopher Grace, Anna Faris, Dan Fogler, Teresa P...2011976.3454196.92NaNcat_30.0713405.3FalseNaN5.3NaN
\n", + "

1000 rows × 19 columns

\n", + "
" + ], + "text/plain": [ + " Rank Title Genre \\\n", + "230 231 Pan's Labyrinth Drama,Fantasy,War \n", + "861 862 Koe no katachi Animation,Drama,Romance \n", + "611 612 Toni Erdmann Comedy,Drama \n", + "54 55 The Dark Knight Action,Crime,Drama \n", + "184 185 Forushande Drama,Thriller \n", + ".. ... ... ... \n", + "967 968 The Walk Adventure,Biography,Crime \n", + "969 970 The Lone Ranger Action,Adventure,Western \n", + "971 972 Disturbia Drama,Mystery,Thriller \n", + "989 990 Selma Biography,Drama,History \n", + "992 993 Take Me Home Tonight Comedy,Drama,Romance \n", + "\n", + " Description Director \\\n", + "230 In the falangist Spain of 1944, the bookish yo... Guillermo del Toro \n", + "861 The story revolves around Nishimiya Shoko, a g... Naoko Yamada \n", + "611 A practical joking father tries to reconnect w... Maren Ade \n", + "54 When the menace known as the Joker wreaks havo... Christopher Nolan \n", + "184 While both participating in a production of \"D... Asghar Farhadi \n", + ".. ... ... \n", + "967 In 1974, high-wire artist Philippe Petit recru... Robert Zemeckis \n", + "969 Native American warrior Tonto recounts the unt... Gore Verbinski \n", + "971 A teen living under house arrest becomes convi... D.J. Caruso \n", + "989 A chronicle of Martin Luther King's campaign t... Ava DuVernay \n", + "992 Four years after graduation, an awkward high s... Michael Dowse \n", + "\n", + " Actors Year \\\n", + "230 Ivana Baquero, Ariadna Gil, Sergi López,Maribe... 2006 \n", + "861 Miyu Irino, Saori Hayami, Aoi Yuki, Kenshô Ono 2016 \n", + "611 Sandra Hüller, Peter Simonischek, Michael Witt... 2016 \n", + "54 Christian Bale, Heath Ledger, Aaron Eckhart,Mi... 2008 \n", + "184 Taraneh Alidoosti, Shahab Hosseini, Babak Kari... 2016 \n", + ".. ... ... \n", + "967 Joseph Gordon-Levitt, Charlotte Le Bon,Guillau... 2015 \n", + "969 Johnny Depp, Armie Hammer, William Fichtner,To... 2013 \n", + "971 Shia LaBeouf, David Morse, Carrie-Anne Moss, S... 2007 \n", + "989 David Oyelowo, Carmen Ejogo, Tim Roth, Lorrain... 2014 \n", + "992 Topher Grace, Anna Faris, Dan Fogler, Teresa P... 2011 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "230 118 8.2 498879 37.62 9.8 cat_4 \n", + "861 129 8.4 2421 NaN 8.0 cat_2 \n", + "611 162 7.6 24387 1.48 9.3 cat_3 \n", + "54 152 9.0 1791916 533.32 8.2 cat_5 \n", + "184 124 8.0 22389 3.40 8.5 cat_3 \n", + ".. ... ... ... ... ... ... \n", + "967 123 7.3 92378 10.14 NaN cat_3 \n", + "969 150 6.5 190855 89.29 NaN cat_4 \n", + "971 105 6.9 193491 80.05 NaN cat_4 \n", + "989 128 7.5 67637 52.07 NaN cat_3 \n", + "992 97 6.3 45419 6.92 NaN cat_3 \n", + "\n", + " Revenue per Minute New Rating Is Prime? Average_Rating Rating_Votes \\\n", + "230 0.318814 8.2 False 9.00 7.2 \n", + "861 NaN 8.4 False 8.20 9.4 \n", + "611 0.009136 6.6 False 8.45 8.6 \n", + "54 3.508684 9.0 False 8.60 8.0 \n", + "184 0.027419 9.0 False 8.25 9.0 \n", + ".. ... ... ... ... ... \n", + "967 0.082439 7.3 False NaN 6.3 \n", + "969 0.595267 6.5 False NaN 5.5 \n", + "971 0.762381 7.9 False NaN 5.9 \n", + "989 0.406797 7.5 False NaN 6.5 \n", + "992 0.071340 5.3 False NaN 5.3 \n", + "\n", + " Final_Rating \n", + "230 8.5500 \n", + "861 8.5000 \n", + "611 8.4875 \n", + "54 8.4500 \n", + "184 8.4375 \n", + ".. ... \n", + "967 NaN \n", + "969 NaN \n", + "971 NaN \n", + "989 NaN \n", + "992 NaN \n", + "\n", + "[1000 rows x 19 columns]" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.sort_values(by = \"Final_Rating\", ascending=False)" + ] + }, + { + "cell_type": "markdown", + "id": "a9f9aeb5", + "metadata": {}, + "source": [ + "## Bonus Challenge. Freaky bonus" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "9ef24eee", + "metadata": {}, + "outputs": [], + "source": [ + "def sum_numbers(column, revenue, votes):\n", + " nums = []\n", + " for i in column:\n", + " if i.isdigit() == True:\n", + " nums.append(int(i))\n", + " if sum(nums) >= revenue and sum(nums) <= votes:\n", + " return f\"It has a hidden pattern\"\n", + " else:\n", + " return f\"There is no hidden pattern here...\"" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "e486f834", + "metadata": {}, + "outputs": [], + "source": [ + "df[\"Hidden_Patterns\"] = df.apply(lambda x: sum_numbers(x[\"Description\"], x[\"Revenue (Millions)\"], x[\"Votes\"]), axis = 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "adee4cd5", + "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", "
RankTitleGenreDescriptionDirectorActorsYearRuntime (Minutes)RatingVotesRevenue (Millions)MetascoreBinRevenue per MinuteNew RatingIs Prime?Average_RatingRating_VotesFinal_RatingHidden_Patterns
01Guardians of the GalaxyAction,Adventure,Sci-FiA group of intergalactic criminals are forced ...James GunnChris Pratt, Vin Diesel, Bradley Cooper, Zoe S...20141218.1757074333.137.6cat_42.7531408.1False7.857.17.6625There is no hidden pattern here...
12PrometheusAdventure,Mystery,Sci-FiFollowing clues to the origin of mankind, a te...Ridley ScottNoomi Rapace, Logan Marshall-Green, Michael Fa...20121247.0485820126.466.5cat_41.0198397.0False6.756.06.5625There is no hidden pattern here...
23SplitHorror,ThrillerThree girls are kidnapped by a man with a diag...M. Night ShyamalanJames McAvoy, Anya Taylor-Joy, Haley Lu Richar...20161177.3157606138.126.2cat_41.1805138.3False6.756.36.6375There is no hidden pattern here...
34SingAnimation,Comedy,FamilyIn a city of humanoid animals, a hustling thea...Christophe LourdeletMatthew McConaughey,Reese Witherspoon, Seth Ma...20161087.260545270.325.9cat_32.5029636.2False6.556.26.4625There is no hidden pattern here...
45Suicide SquadAction,Adventure,FantasyA secret government agency recruits some of th...David AyerWill Smith, Jared Leto, Margot Robbie, Viola D...20161236.2393727325.024.0cat_42.6424396.2False5.105.25.1250There is no hidden pattern here...
...............................................................
995996Secret in Their EyesCrime,Drama,MysteryA tight-knit team of rising investigators, alo...Billy RayChiwetel Ejiofor, Nicole Kidman, Julia Roberts...20151116.227585NaN4.5cat_3NaN6.2False5.357.25.8125There is no hidden pattern here...
996997Hostel: Part IIHorrorThree American college students studying abroa...Eli RothLauren German, Heather Matarazzo, Bijou Philli...2007945.57315217.544.6cat_30.1865965.5False5.054.54.9125There is no hidden pattern here...
997998Step Up 2: The StreetsDrama,Music,RomanceRomantic sparks occur between two dance studen...Jon M. ChuRobert Hoffman, Briana Evigan, Cassie Ventura,...2008986.27069958.015.0cat_30.5919396.2False5.605.25.5000There is no hidden pattern here...
998999Search PartyAdventure,ComedyA pair of friends embark on a mission to reuni...Scot ArmstrongAdam Pally, T.J. Miller, Thomas Middleditch,Sh...2014935.64881NaN2.2cat_2NaN4.6False3.906.64.5750There is no hidden pattern here...
9991000Nine LivesComedy,Family,FantasyA stuffy businessman finds himself trapped ins...Barry SonnenfeldKevin Spacey, Jennifer Garner, Robbie Amell,Ch...2016875.31243519.641.1cat_30.2257474.3False3.206.33.9750There is no hidden pattern here...
\n", + "

1000 rows × 20 columns

\n", "
" ], "text/plain": [ - " Rank Title \\\n", - "Rating \n", - "6.1 16758 The Great WallThe Bad BatchJack Reacher: Never... \n", - "4.5 772 The Assignment \n", - "6.5 23350 TrollsThe Girl on the TrainNow You See Me 2Tom... \n", - "4.4 937 The Human Centipede (First Sequence) \n", - "7.8 18410 Hidden FiguresAvatarThe Hateful EightThe Big S... \n", - "7.4 13822 Me Before YouPatriots DayThe AccountantAvenger... \n", - "5.4 7182 The ComedianBlackhatGrown Ups 2TuskThe Green I... \n", - "4.8 2623 RuptureThe Ridiculous 6Chalk It UpTexas Chains... \n", - "2.7 915 Don't Fuck in the WoodsDragonball Evolution \n", - "3.7 320 The Last FaceSatanic \n", - "6.4 18538 MindhornColossalLive by NightMamma Mia!The Sha... \n", - "7.6 13353 Doctor StrangeWatchmenSuperbadSicarioDawn of t... \n", - "4.1 64 Fifty Shades of Grey \n", - "7.7 11451 MoanaKingsman: The Secret ServiceHell or High ... \n", - "5.3 6224 Independence Day: ResurgenceGhostbustersSpring... \n", - "4.6 3738 The Boy Next DoorOnly for One NightMax SteelWo... \n", - "7.0 20575 PrometheusPassengersTheir FinestJurassic World... \n", - "8.4 2073 Django Unchained3 IdiotsWALL·EKoe no katachi \n", - "4.7 2829 Dead AwakeAliens vs Predator - RequiemZoolande... \n", - "5.6 9503 Resident Evil: The Final ChapterFallenMother's... \n", - "6.7 24065 Jason BourneGoldHounds of LovePirates of the C... \n", - "5.7 10359 Transformers: Age of ExtinctionAllegiantMonste... \n", - "8.2 3781 Hacksaw RidgeThe Wolf of Wall StreetRoomWarrio... \n", - "7.3 20163 SplitMiss SloaneSilencePirates of the Caribbea... \n", - "4.2 1421 The Last AirbenderExposed \n", - "5.1 3038 Jennifer's BodySex TapeThe Rise of the KraysBl... \n", - "5.9 11381 Assassin's CreedThe PromiseRealiveThe HostPerc... \n", - "3.2 648 Tall Men \n", - "6.3 23829 Why Him?Sausage PartyLowridersPersonal Shopper... \n", - "4.0 617 2307: Winter's Dream \n", - "1.9 830 Disaster Movie \n", - "8.1 5975 Guardians of the GalaxyLionStar Wars: Episode ... \n", - "7.1 25226 The Lost City of ZX-Men: Apocalypse5- 25- 77St... \n", - "6.0 11882 Mike and Dave Need Wedding DatesInto the Woods... \n", - "5.0 2640 Whisky GaloreThe HappeningLída BaarováAmateur ... \n", - "7.9 8465 Rogue OneManchester by the SeaCaptain America:... \n", - "3.5 1860 The IntentWrecker \n", - "4.3 2816 Movie 43Fantastic FourYoga HosersSex and the C... \n", - "4.9 4549 Bonjour AnneKnock KnockKickboxer: VengeanceMeg... \n", - "6.8 20442 Paris pieds nusThe Autopsy of Jane DoeCollater... \n", - "8.0 5542 ArrivalDeadpoolThe MartianThe RevenantStar Tre... \n", - "7.5 16219 Fantastic Beasts and Where to Find ThemNocturn... \n", - "6.2 23796 Suicide SquadBad MomsThe Neon DemonDiary of a ... \n", - "8.3 2236 La La LandBahubali: The BeginningInglourious B... \n", - "3.9 1166 The Disappointments RoomThe Black RoomBirth of... \n", - "8.8 199 InceptionDangal \n", - "8.5 1893 The PrestigeThe DepartedThe Dark Knight RisesW... \n", - "8.6 384 InterstellarKimi no na waThe Intouchables \n", - "9.0 55 The Dark Knight \n", - "7.2 20603 SingThe FounderJohn WickDon't BreatheDeepwater... \n", - "6.6 25421 The Secret Life of PetsNerveCrimson PeakThe Ch... \n", - "5.2 5926 TwilightBeyond the GatesA Kind of MurderThe 5t... \n", - "6.9 19301 The Magnificent SevenCaptain America: The Firs... \n", - "5.8 11829 Underworld: Blood WarsThe VoidAll We HadOffice... \n", - "5.5 8506 Gods of EgyptThe House BunnyVincent N RoxxySev... \n", - "\n", - " Genre \\\n", - "Rating \n", - "6.1 Action,Adventure,FantasyRomance,Sci-FiAction,A... \n", - "4.5 Action,Crime,Thriller \n", - "6.5 Animation,Adventure,ComedyCrime,Drama,MysteryA... \n", - "4.4 Horror \n", - "7.8 Biography,Drama,HistoryAction,Adventure,Fantas... \n", - "7.4 Drama,RomanceDrama,History,ThrillerAction,Crim... \n", - "5.4 ComedyCrime,Drama,MysteryComedyComedy,Drama,Ho... \n", - "4.8 Horror,Sci-Fi,ThrillerComedy,WesternComedyHorr... \n", - "2.7 HorrorAction,Adventure,Fantasy \n", - "3.7 DramaHorror \n", - "6.4 ComedyAction,Comedy,DramaCrime,DramaComedy,Fam... \n", - "7.6 Action,Adventure,FantasyAction,Drama,MysteryCo... \n", - "4.1 Drama,Romance,Thriller \n", - "7.7 Animation,Adventure,ComedyAction,Adventure,Com... \n", - "5.3 Action,Adventure,Sci-FiAction,Comedy,FantasyDr... \n", - "4.6 Mystery,ThrillerThrillerAction,Adventure,Famil... \n", - "7.0 Adventure,Mystery,Sci-FiAdventure,Drama,Romanc... \n", - "8.4 Drama,WesternComedy,DramaAnimation,Adventure,F... \n", - "4.7 Horror,ThrillerAction,Horror,Sci-FiComedyActio... \n", - "5.6 Action,Horror,Sci-FiAdventure,Drama,FantasyCom... \n", - "6.7 Action,ThrillerAdventure,Drama,ThrillerCrime,D... \n", - "5.7 Action,Adventure,Sci-FiAction,Adventure,Myster... \n", - "8.2 Biography,Drama,HistoryBiography,Comedy,CrimeD... \n", - "7.3 Horror,ThrillerDrama,ThrillerAdventure,Drama,H... \n", - "4.2 Action,Adventure,FamilyCrime,Drama,Mystery \n", - "5.1 Comedy,HorrorComedy,RomanceCrime,DramaHorror,T... \n", - "5.9 Action,Adventure,DramaDrama,HistorySci-FiActio... \n", - "3.2 Fantasy,Horror,Thriller \n", - "6.3 ComedyAnimation,Adventure,ComedyDramaDrama,Mys... \n", - "4.0 Sci-Fi \n", - "1.9 Comedy \n", - "8.1 Action,Adventure,Sci-FiBiography,DramaAction,A... \n", - "7.1 Action,Adventure,BiographyAction,Adventure,Sci... \n", - "6.0 Adventure,Comedy,RomanceAdventure,Comedy,Drama... \n", - "5.0 Comedy,RomanceSci-Fi,ThrillerBiography,Drama,H... \n", - "7.9 Action,Adventure,Sci-FiDramaAction,Adventure,S... \n", - "3.5 Crime,DramaAction,Horror,Thriller \n", - "4.3 Comedy,RomanceAction,Adventure,Sci-FiComedy,Fa... \n", - "4.9 Comedy,Drama,RomanceDrama,Horror,ThrillerActio... \n", - "6.8 ComedyHorror,Mystery,ThrillerDrama,RomanceActi... \n", - "8.0 Drama,Mystery,Sci-FiAction,Adventure,ComedyAdv... \n", - "7.5 Adventure,Family,FantasyDrama,ThrillerDramaBio... \n", - "6.2 Action,Adventure,FantasyComedyHorror,ThrillerC... \n", - "8.3 Comedy,Drama,MusicAction,Adventure,DramaAdvent... \n", - "3.9 Drama,Horror,ThrillerHorrorAction,Biography,Drama \n", - "8.8 Action,Adventure,Sci-FiAction,Biography,Drama \n", - "8.5 Drama,Mystery,Sci-FiCrime,Drama,ThrillerAction... \n", - "8.6 Adventure,Drama,Sci-FiAnimation,Drama,FantasyB... \n", - "9.0 Action,Crime,Drama \n", - "7.2 Animation,Comedy,FamilyBiography,Drama,History... \n", - "6.6 Animation,Adventure,ComedyAdventure,Crime,Myst... \n", - "5.2 Drama,Fantasy,RomanceAdventure,HorrorCrime,Dra... \n", - "6.9 Action,Adventure,WesternAction,Adventure,Sci-F... \n", - "5.8 Action,Adventure,FantasyHorror,Mystery,Sci-FiD... \n", - "5.5 Action,Adventure,FantasyComedy,RomanceCrime,Dr... \n", - "\n", - " Description \\\n", - "Rating \n", - "6.1 European mercenaries searching for black powde... \n", - "4.5 After waking up and discovering that he has un... \n", - "6.5 After the Bergens invade Troll Village, Poppy,... \n", - "4.4 A mad scientist kidnaps and mutilates a trio o... \n", - "7.8 The story of a team of female African-American... \n", - "7.4 A girl in a small town forms an unlikely bond ... \n", - "5.4 A look at the life of an aging insult comic na... \n", - "4.8 A single mom tries to break free from a myster... \n", - "2.7 A group of friends are going on a camping trip... \n", - "3.7 A director (Charlize Theron) of an internation... \n", - "6.4 A has-been actor best known for playing the ti... \n", - "7.6 While on a journey of physical and spiritual h... \n", - "4.1 Literature student Anastasia Steele's life cha... \n", - "7.7 In Ancient Polynesia, when a terrible curse in... \n", - "5.3 Two decades after the first Independence Day i... \n", - "4.6 A woman, separated from her unfaithful husband... \n", - "7.0 Following clues to the origin of mankind, a te... \n", - "8.4 With the help of a German bounty hunter , a fr... \n", - "4.7 A young woman must save herself and her friend... \n", - "5.6 Alice returns to where the nightmare began: Th... \n", - "6.7 The CIA's most dangerous former operative is d... \n", - "5.7 Autobots must escape sight from a bounty hunte... \n", - "8.2 WWII American Army Medic Desmond T. Doss, who ... \n", - "7.3 Three girls are kidnapped by a man with a diag... \n", - "4.2 Follows the adventures of Aang, a young succes... \n", - "5.1 A newly possessed high school cheerleader turn... \n", - "5.9 When Callum Lynch explores the memories of his... \n", - "3.2 A challenged man is stalked by tall phantoms i... \n", - "6.3 A holiday gathering threatens to go off the ra... \n", - "4.0 In 2307, a future soldier is sent on a mission... \n", - "1.9 Over the course of one evening, an unsuspectin... \n", - "8.1 A group of intergalactic criminals are forced ... \n", - "7.1 A true-life drama, centering on British explor... \n", - "6.0 Two hard-partying brothers place an online ad ... \n", - "5.0 Scottish islanders try to plunder cases of whi... \n", - "7.9 The Rebel Alliance makes a risky move to steal... \n", - "3.5 Gunz (Dylan Duffus) is thrust into a world of ... \n", - "4.3 A series of interconnected short films follows... \n", - "4.9 Anne is at a crossroads in her life. Long marr... \n", - "6.8 Fiona visits Paris for the first time to assis... \n", - "8.0 When twelve mysterious spacecraft appear aroun... \n", - "7.5 The adventures of writer Newt Scamander in New... \n", - "6.2 A secret government agency recruits some of th... \n", - "8.3 A jazz pianist falls for an aspiring actress i... \n", - "3.9 A mother and her young son release unimaginabl... \n", - "8.8 A thief, who steals corporate secrets through ... \n", - "8.5 Two stage magicians engage in competitive one-... \n", - "8.6 A team of explorers travel through a wormhole ... \n", - "9.0 When the menace known as the Joker wreaks havo... \n", - "7.2 In a city of humanoid animals, a hustling thea... \n", - "6.6 The quiet life of a terrier named Max is upend... \n", - "5.2 A teenage girl risks everything when she falls... \n", - "6.9 Seven gunmen in the old west gradually come to... \n", - "5.8 Vampire death dealer, Selene (Kate Beckinsale)... \n", - "5.5 Mortal hero Bek teams with the god Horus in an... \n", - "\n", - " Director \\\n", - "Rating \n", - "6.1 Yimou ZhangAna Lily AmirpourEdward ZwickBrad P... \n", - "4.5 Walter Hill \n", - "6.5 Walt DohrnTate TaylorJon M. ChuBrad BirdGore V... \n", - "4.4 Tom Six \n", - "7.8 Theodore MelfiJames CameronQuentin TarantinoAd... \n", - "7.4 Thea SharrockPeter BergGavin O'ConnorJoss Whed... \n", - "5.4 Taylor HackfordMichael MannDennis DuganKevin S... \n", - "4.8 Steven ShainbergFrank CoraciHisonni JohnsonJoh... \n", - "2.7 Shawn BurkettJames Wong \n", - "3.7 Sean PennJeffrey G. Hunt \n", - "6.4 Sean FoleyNacho VigalondoBen AffleckPhyllida L... \n", - "7.6 Scott DerricksonZack SnyderGreg MottolaDenis V... \n", - "4.1 Sam Taylor-Johnson \n", - "7.7 Ron ClementsMatthew VaughnDavid MackenzieAlex ... \n", - "5.3 Roland EmmerichPaul FeigHarmony KorineLana Wac... \n", - "4.6 Rob CohenChris StokesStewart HendlerJohn R. Le... \n", - "7.0 Ridley ScottMorten TyldumLone ScherfigColin Tr... \n", - "8.4 Quentin TarantinoRajkumar HiraniAndrew Stanton... \n", - "4.7 Phillip GuzmanColin StrauseBen StillerAndrey K... \n", - "5.6 Paul W.S. AndersonScott HicksGarry MarshallApr... \n", - "6.7 Paul GreengrassStephen GaghanBen YoungRob Mars... \n", - "5.7 Michael BayRobert SchwentkeChris WedgeNicholas... \n", - "8.2 Mel GibsonMartin ScorseseLenny AbrahamsonGavin... \n", - "7.3 M. Night ShyamalanJohn MaddenMartin ScorseseGo... \n", - "4.2 M. Night ShyamalanGee Malik Linton \n", - "5.1 Karyn KusamaJake KasdanZackary AdlerAdam Winga... \n", - "5.9 Justin KurzelTerry GeorgeMateo GilAndrew Nicco... \n", - "3.2 Jonathan Holbrook \n", - "6.3 John HamburgGreg TiernanRicardo de MontreuilOl... \n", - "4.0 Joey Curtis \n", - "1.9 Jason Friedberg \n", - "8.1 James GunnGarth DavisJ.J. AbramsGeorge MillerB... \n", - "7.1 James GrayBryan SingerPatrick Read JohnsonJust... \n", - "6.0 Jake SzymanskiRob MarshallFabio GuaglioneGaspa... \n", - "5.0 Gillies MacKinnonM. Night ShyamalanFilip RencL... \n", - "7.9 Gareth EdwardsKenneth LonerganAnthony RussoMat... \n", - "3.5 Femi OyeniranMicheal Bafaro \n", - "4.3 Elizabeth BanksJosh TrankKevin SmithMichael Pa... \n", - "4.9 Eleanor CoppolaEli RothJohn StockwellMichael G... \n", - "6.8 Dominique AbelAndré ØvredalDavid FrankelSam Me... \n", - "8.0 Denis VilleneuveTim MillerRidley ScottAlejandr... \n", - "7.5 David YatesTom FordBarry JenkinsClint Eastwood... \n", - "6.2 David AyerJon LucasNicolas Winding RefnThor Fr... \n", - "8.3 Damien ChazelleS.S. RajamouliQuentin Tarantino... \n", - "3.9 D.J. CarusoRolfe KanefskyGeorge Nolfi \n", - "8.8 Christopher NolanNitesh Tiwari \n", - "8.5 Christopher NolanMartin ScorseseChristopher No... \n", - "8.6 Christopher NolanMakoto ShinkaiOlivier Nakache \n", - "9.0 Christopher Nolan \n", - "7.2 Christophe LourdeletJohn Lee HancockChad Stahe... \n", - "6.6 Chris RenaudHenry JoostGuillermo del ToroRoss ... \n", - "5.2 Catherine HardwickeJackson StewartAndy Goddard... \n", - "6.9 Antoine FuquaJoe JohnstonDavid Robert Mitchell... \n", - "5.8 Anna FoersterJeremy GillespieKatie HolmesJosh ... \n", - "5.5 Alex ProyasFred WolfGary Michael SchultzSergei... \n", - "\n", - " Actors Year \\\n", - "Rating \n", - "6.1 Matt Damon, Tian Jing, Willem Dafoe, Andy LauK... 62422 \n", - "4.5 Sigourney Weaver, Michelle Rodriguez, Tony Sha... 2016 \n", - "6.5 Anna Kendrick, Justin Timberlake,Zooey Deschan... 80525 \n", - "4.4 Dieter Laser, Ashley C. Williams, Ashlynn Yenn... 2009 \n", - "7.8 Taraji P. Henson, Octavia Spencer, Janelle Mon... 80458 \n", - "7.4 Emilia Clarke, Sam Claflin, Janet McTeer, Char... 66445 \n", - "5.4 Robert De Niro, Leslie Mann, Danny DeVito, Edi... 24173 \n", - "4.8 Noomi Rapace, Michael Chiklis, Kerry Bishé,Pet... 8060 \n", - "2.7 Brittany Blanton, Ayse Howard, Roman Jossart,N... 4025 \n", - "3.7 Charlize Theron, Javier Bardem, Adèle Exarchop... 4032 \n", - "6.4 Essie Davis, Andrea Riseborough, Julian Barrat... 70435 \n", - "7.6 Benedict Cumberbatch, Chiwetel Ejiofor, Rachel... 54303 \n", - "4.1 Dakota Johnson, Jamie Dornan, Jennifer Ehle,El... 2015 \n", - "7.7 Auli'i Cravalho, Dwayne Johnson, Rachel House,... 54301 \n", - "5.3 Liam Hemsworth, Jeff Goldblum, Bill Pullman,Ma... 24176 \n", - "4.6 Jennifer Lopez, Ryan Guzman, Kristin Chenoweth... 10079 \n", - "7.0 Noomi Rapace, Logan Marshall-Green, Michael Fa... 92560 \n", - "8.4 Jamie Foxx, Christoph Waltz, Leonardo DiCaprio... 8045 \n", - "4.7 Jocelin Donahue, Jesse Bradford, Jesse Borrego... 12086 \n", - "5.6 Milla Jovovich, Iain Glen, Ali Larter, Shawn R... 34227 \n", - "6.7 Matt Damon, Tommy Lee Jones, Alicia Vikander,V... 96618 \n", - "5.7 Mark Wahlberg, Nicola Peltz, Jack Reynor, Stan... 42303 \n", - "8.2 Andrew Garfield, Sam Worthington, Luke Bracey,... 20117 \n", - "7.3 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 84526 \n", - "4.2 Noah Ringer, Nicola Peltz, Jackson Rathbone,De... 4026 \n", - "5.1 Megan Fox, Amanda Seyfried, Adam Brody, Johnny... 10070 \n", - "5.9 Michael Fassbender, Marion Cotillard, Jeremy I... 38262 \n", - "3.2 Dan Crisafulli, Kay Whitney, Richard Garcia, P... 2016 \n", - "6.3 Zoey Deutch, James Franco, Tangie Ambrose,Cedr... 88639 \n", - "4.0 Paul Sidhu, Branden Coles, Arielle Holmes, Kel... 2016 \n", - "1.9 Carmen Electra, Vanessa Lachey,Nicole Parker, ... 2008 \n", - "8.1 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 52321 \n", - "7.1 Charlie Hunnam, Robert Pattinson, Sienna Mille... 104636 \n", - "6.0 Zac Efron, Adam Devine, Anna Kendrick, Aubrey ... 52370 \n", - "5.0 Tim Pigott-Smith, Naomi Battrick, Ellie Kendri... 8056 \n", - "7.9 Felicity Jones, Diego Luna, Alan Tudyk, Donnie... 46289 \n", - "3.5 Dylan Duffus, Scorcher,Shone Romulus, Jade Ash... 4031 \n", - "4.3 Emma Stone, Stephen Merchant, Richard Gere, Li... 8054 \n", - "4.9 Diane Lane, Alec Baldwin, Arnaud Viard, Linda ... 14092 \n", - "6.8 Fiona Gordon, Dominique Abel,Emmanuelle Riva, ... 74474 \n", - "8.0 Amy Adams, Jeremy Renner, Forest Whitaker,Mich... 38217 \n", - "7.5 Eddie Redmayne, Katherine Waterston, Alison Su... 70438 \n", - "6.2 Will Smith, Jared Leto, Margot Robbie, Viola D... 74480 \n", - "8.3 Ryan Gosling, Emma Stone, Rosemarie DeWitt, J.... 14087 \n", - "3.9 Kate Beckinsale, Mel Raido, Duncan Joiner, Luc... 6048 \n", - "8.8 Leonardo DiCaprio, Joseph Gordon-Levitt, Ellen... 4026 \n", - "8.5 Christian Bale, Hugh Jackman, Scarlett Johanss... 12051 \n", - "8.6 Matthew McConaughey, Anne Hathaway, Jessica Ch... 6041 \n", - "9.0 Christian Bale, Heath Ledger, Aaron Eckhart,Mi... 2008 \n", - "7.2 Matthew McConaughey,Reese Witherspoon, Seth Ma... 84526 \n", - "6.6 Louis C.K., Eric Stonestreet, Kevin Hart, Lake... 84498 \n", - "5.2 Kristen Stewart, Robert Pattinson, Billy Burke... 22134 \n", - "6.9 Denzel Washington, Chris Pratt, Ethan Hawke,Vi... 62397 \n", - "5.8 Kate Beckinsale, Theo James, Tobias Menzies, L... 52353 \n", - "5.5 Brenton Thwaites, Nikolaj Coster-Waldau, Gerar... 28163 \n", - "\n", - " Runtime (Minutes) Votes Revenue (Millions) Metascore \\\n", - "Rating \n", - "6.1 3304 2528395 1408.73 1317.0 \n", - "4.5 95 2043 0.00 34.0 \n", - "6.5 4409 4084884 2281.06 1921.0 \n", - "4.4 92 60655 0.18 33.0 \n", - "7.8 4946 12695506 4786.96 2837.0 \n", - "7.4 3932 6059972 3209.23 1948.0 \n", - "5.4 1227 542441 449.91 488.0 \n", - "4.8 403 71090 34.33 115.0 \n", - "2.7 158 60008 9.35 45.0 \n", - "3.7 215 3371 0.00 16.0 \n", - "6.4 3638 4208763 2223.42 1989.0 \n", - "7.6 3360 7177776 2713.57 1970.0 \n", - "4.1 125 244474 166.15 46.0 \n", - "7.7 3044 7418438 2258.02 1800.0 \n", - "5.3 1271 739995 444.30 423.0 \n", - "4.6 433 48327 46.04 175.0 \n", - "7.0 5358 10224319 4039.93 2769.0 \n", - "8.4 562 2057222 393.13 228.0 \n", - "4.7 605 161498 93.70 244.0 \n", - "5.6 1693 929994 478.06 662.0 \n", - "6.7 5476 7161951 3768.35 2658.0 \n", - "5.7 2292 934610 673.37 830.0 \n", - "8.2 1319 3508761 792.08 706.0 \n", - "7.3 4947 7119214 2933.50 2614.0 \n", - "4.2 205 133538 0.00 43.0 \n", - "5.1 497 225091 82.80 255.0 \n", - "5.9 2072 1475960 805.34 806.0 \n", - "3.2 133 173 0.00 57.0 \n", - "6.3 4747 3501271 2105.08 2017.0 \n", - "4.0 101 277 20.76 53.0 \n", - "1.9 87 77207 14.17 15.0 \n", - "8.1 3290 11436176 4211.66 1964.0 \n", - "7.1 6076 8214814 3379.01 2894.0 \n", - "6.0 2798 2177954 1653.34 1055.0 \n", - "5.0 387 173581 64.51 179.0 \n", - "7.9 2863 6604675 2621.51 1653.0 \n", - "3.5 187 1412 0.00 96.0 \n", - "4.3 428 274966 160.27 95.0 \n", - "4.9 707 616607 774.23 370.0 \n", - "6.8 3990 4670467 1890.94 2083.0 \n", - "8.0 2331 8429947 2540.56 1501.0 \n", - "7.5 4256 6162150 2925.55 2408.0 \n", - "6.2 4033 3926113 2715.28 1852.0 \n", - "8.3 850 2795136 986.65 489.0 \n", - "3.9 279 5687 95.46 163.0 \n", - "8.8 309 1632594 303.72 74.0 \n", - "8.5 854 3931287 659.15 448.0 \n", - "8.6 387 1639822 205.85 210.0 \n", - "9.0 152 1791916 533.32 82.0 \n", - "7.2 4806 7490682 3499.91 2603.0 \n", - "6.6 4620 6391721 2856.55 2067.0 \n", - "5.2 1176 974947 505.78 427.0 \n", - "6.9 3417 3866009 1432.78 1634.0 \n", - "5.8 2754 2067400 1215.23 1179.0 \n", - "5.5 1476 1074968 875.18 570.0 \n", - "\n", - " Bin Revenue per Minute \\\n", - "Rating \n", - "6.1 cat_3cat_1cat_3cat_4cat_2cat_3cat_4cat_1cat_3c... 12.434090 \n", - "4.5 cat_2 0.000000 \n", - "6.5 cat_3cat_4cat_4cat_4cat_3cat_4cat_3cat_3cat_4c... 20.779299 \n", - "4.4 cat_3 0.001957 \n", - "7.8 cat_3cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4c... 39.289341 \n", - "7.4 cat_4cat_3cat_4cat_4cat_4cat_4cat_3cat_3cat_4c... 26.820653 \n", - "5.4 cat_2cat_3cat_4cat_3cat_3cat_3cat_4cat_3cat_2c... 4.587048 \n", - "4.8 cat_2cat_3cat_1cat_3 0.373152 \n", - "2.7 cat_1cat_3 0.110000 \n", - "3.7 cat_1cat_2 0.000000 \n", - "6.4 cat_2cat_2cat_3cat_4cat_3cat_3cat_4cat_3cat_4c... 22.465497 \n", - "7.6 cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4c... 21.842981 \n", - "4.1 cat_4 1.329200 \n", - "7.7 cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_1cat_4c... 19.661901 \n", - "5.3 cat_4cat_4cat_4cat_4cat_2cat_3cat_3cat_3cat_2c... 3.840669 \n", - "4.6 cat_3cat_1cat_3cat_1cat_2 0.505484 \n", - "7.0 cat_4cat_4cat_2cat_4cat_4cat_4cat_4cat_4cat_2c... 34.846896 \n", - "8.4 cat_5cat_4cat_4cat_2 3.308795 \n", - "4.7 cat_1cat_3cat_3cat_2cat_2cat_2 0.900835 \n", - "5.6 cat_3cat_2cat_3cat_2cat_4cat_3cat_1cat_3cat_3c... 4.560073 \n", - "6.7 cat_4cat_3cat_2cat_4cat_4cat_4cat_4cat_3cat_3c... 31.924417 \n", - "5.7 cat_4cat_3cat_2cat_3cat_3cat_3cat_3cat_2cat_2c... 5.675561 \n", - "8.2 cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_3cat_4c... 6.979427 \n", - "7.3 cat_4cat_3cat_3cat_4cat_4cat_3cat_4cat_4cat_3c... 23.818135 \n", - "4.2 cat_4cat_2 0.000000 \n", - "5.1 cat_3cat_3cat_2cat_3cat_3 0.868980 \n", - "5.9 cat_4cat_4cat_2cat_3cat_4cat_1cat_4cat_4cat_4c... 7.540647 \n", - "3.2 cat_1 0.000000 \n", - "6.3 cat_3cat_4cat_1cat_3cat_4cat_2cat_3cat_4cat_2c... 18.082360 \n", - "4.0 cat_1 0.205545 \n", - "1.9 cat_3 0.162874 \n", - "8.1 cat_4cat_4cat_4cat_4cat_4cat_5cat_4cat_4cat_4c... 33.055304 \n", - "7.1 cat_2cat_4cat_1cat_4cat_3cat_4cat_4cat_4cat_3c... 27.139367 \n", - "6.0 cat_3cat_4cat_2cat_3cat_3cat_3cat_4cat_4cat_3c... 14.264225 \n", - "5.0 cat_1cat_4cat_1cat_2 0.708901 \n", - "7.9 cat_4cat_4cat_4cat_4cat_2cat_4cat_4cat_3cat_4c... 19.417432 \n", - "3.5 cat_1cat_2 0.000000 \n", - "4.3 cat_3cat_4cat_2cat_3 1.307981 \n", - "4.9 cat_1cat_3cat_2cat_2cat_4cat_4cat_4 6.898410 \n", - "6.8 cat_1cat_3cat_3cat_4cat_4cat_4cat_3cat_2cat_4c... 16.550461 \n", - "8.0 cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_4cat_3c... 20.647620 \n", - "7.5 cat_4cat_4cat_4cat_4cat_1cat_3cat_4cat_4cat_4c... 24.775876 \n", - "6.2 cat_4cat_3cat_3cat_3cat_3cat_3cat_3cat_3cat_4c... 23.984000 \n", - "8.3 cat_4cat_3cat_4cat_4cat_1cat_4cat_4 9.094861 \n", - "3.9 cat_2cat_1cat_1 0.931751 \n", - "8.8 cat_5cat_3 2.046079 \n", - "8.5 cat_4cat_4cat_5cat_4cat_4cat_4 4.229375 \n", - "8.6 cat_5cat_3cat_4 1.274196 \n", - "9.0 cat_5 3.508684 \n", - "7.2 cat_3cat_3cat_4cat_4cat_3cat_4cat_4cat_4cat_3c... 30.197025 \n", - "6.6 cat_4cat_3cat_3cat_3cat_4cat_3cat_4cat_3cat_4c... 25.737712 \n", - "5.2 cat_4cat_2cat_2cat_3cat_3cat_4cat_4cat_2cat_3c... 4.399000 \n", - "6.9 cat_4cat_4cat_4cat_3cat_4cat_1cat_3cat_4cat_1c... 12.987459 \n", - "5.8 cat_3cat_2cat_2cat_3cat_2cat_3cat_3cat_2cat_4c... 10.512693 \n", - "5.5 cat_3cat_3cat_1cat_3cat_4cat_3cat_2cat_3cat_2c... 7.710255 \n", - "\n", - " New Rating Is Prime? \n", - "Rating \n", - "6.1 183.1 1 \n", - "4.5 5.5 0 \n", - "6.5 253.0 0 \n", - "4.4 4.4 0 \n", - "7.8 305.0 0 \n", - "7.4 242.2 1 \n", - "5.4 63.8 0 \n", - "4.8 19.2 0 \n", - "2.7 5.4 0 \n", - "3.7 7.4 0 \n", - "6.4 219.0 1 \n", - "7.6 208.2 0 \n", - "4.1 5.1 0 \n", - "7.7 198.9 1 \n", - "5.3 62.6 0 \n", - "4.6 27.0 2 \n", - "7.0 315.0 0 \n", - "8.4 32.6 0 \n", - "4.7 30.2 0 \n", - "5.6 90.2 0 \n", - "6.7 315.6 0 \n", - "5.7 117.7 0 \n", - "8.2 79.0 0 \n", - "7.3 310.6 1 \n", - "4.2 8.4 0 \n", - "5.1 25.5 0 \n", - "5.9 109.1 0 \n", - "3.2 4.2 0 \n", - "6.3 274.2 1 \n", - "4.0 4.0 1 \n", - "1.9 0.9 0 \n", - "8.1 213.6 0 \n", - "7.1 363.2 0 \n", - "6.0 151.0 0 \n", - "5.0 19.0 1 \n", - "7.9 179.7 0 \n", - "3.5 8.0 0 \n", - "4.3 14.2 0 \n", - "4.9 35.3 0 \n", - "6.8 250.6 1 \n", - "8.0 155.0 0 \n", - "7.5 260.5 1 \n", - "6.2 224.4 0 \n", - "8.3 55.1 0 \n", - "3.9 12.7 2 \n", - "8.8 17.6 0 \n", - "8.5 54.0 0 \n", - "8.6 24.8 0 \n", - "9.0 9.0 0 \n", - "7.2 306.4 0 \n", - "6.6 269.2 1 \n", - "5.2 61.2 0 \n", - "6.9 209.9 3 \n", - "5.8 148.8 0 \n", - "5.5 73.0 1 " + " Rank Title Genre \\\n", + "0 1 Guardians of the Galaxy Action,Adventure,Sci-Fi \n", + "1 2 Prometheus Adventure,Mystery,Sci-Fi \n", + "2 3 Split Horror,Thriller \n", + "3 4 Sing Animation,Comedy,Family \n", + "4 5 Suicide Squad Action,Adventure,Fantasy \n", + ".. ... ... ... \n", + "995 996 Secret in Their Eyes Crime,Drama,Mystery \n", + "996 997 Hostel: Part II Horror \n", + "997 998 Step Up 2: The Streets Drama,Music,Romance \n", + "998 999 Search Party Adventure,Comedy \n", + "999 1000 Nine Lives Comedy,Family,Fantasy \n", + "\n", + " Description Director \\\n", + "0 A group of intergalactic criminals are forced ... James Gunn \n", + "1 Following clues to the origin of mankind, a te... Ridley Scott \n", + "2 Three girls are kidnapped by a man with a diag... M. Night Shyamalan \n", + "3 In a city of humanoid animals, a hustling thea... Christophe Lourdelet \n", + "4 A secret government agency recruits some of th... David Ayer \n", + ".. ... ... \n", + "995 A tight-knit team of rising investigators, alo... Billy Ray \n", + "996 Three American college students studying abroa... Eli Roth \n", + "997 Romantic sparks occur between two dance studen... Jon M. Chu \n", + "998 A pair of friends embark on a mission to reuni... Scot Armstrong \n", + "999 A stuffy businessman finds himself trapped ins... Barry Sonnenfeld \n", + "\n", + " Actors Year \\\n", + "0 Chris Pratt, Vin Diesel, Bradley Cooper, Zoe S... 2014 \n", + "1 Noomi Rapace, Logan Marshall-Green, Michael Fa... 2012 \n", + "2 James McAvoy, Anya Taylor-Joy, Haley Lu Richar... 2016 \n", + "3 Matthew McConaughey,Reese Witherspoon, Seth Ma... 2016 \n", + "4 Will Smith, Jared Leto, Margot Robbie, Viola D... 2016 \n", + ".. ... ... \n", + "995 Chiwetel Ejiofor, Nicole Kidman, Julia Roberts... 2015 \n", + "996 Lauren German, Heather Matarazzo, Bijou Philli... 2007 \n", + "997 Robert Hoffman, Briana Evigan, Cassie Ventura,... 2008 \n", + "998 Adam Pally, T.J. Miller, Thomas Middleditch,Sh... 2014 \n", + "999 Kevin Spacey, Jennifer Garner, Robbie Amell,Ch... 2016 \n", + "\n", + " Runtime (Minutes) Rating Votes Revenue (Millions) Metascore Bin \\\n", + "0 121 8.1 757074 333.13 7.6 cat_4 \n", + "1 124 7.0 485820 126.46 6.5 cat_4 \n", + "2 117 7.3 157606 138.12 6.2 cat_4 \n", + "3 108 7.2 60545 270.32 5.9 cat_3 \n", + "4 123 6.2 393727 325.02 4.0 cat_4 \n", + ".. ... ... ... ... ... ... \n", + "995 111 6.2 27585 NaN 4.5 cat_3 \n", + "996 94 5.5 73152 17.54 4.6 cat_3 \n", + "997 98 6.2 70699 58.01 5.0 cat_3 \n", + "998 93 5.6 4881 NaN 2.2 cat_2 \n", + "999 87 5.3 12435 19.64 1.1 cat_3 \n", + "\n", + " Revenue per Minute New Rating Is Prime? Average_Rating Rating_Votes \\\n", + "0 2.753140 8.1 False 7.85 7.1 \n", + "1 1.019839 7.0 False 6.75 6.0 \n", + "2 1.180513 8.3 False 6.75 6.3 \n", + "3 2.502963 6.2 False 6.55 6.2 \n", + "4 2.642439 6.2 False 5.10 5.2 \n", + ".. ... ... ... ... ... \n", + "995 NaN 6.2 False 5.35 7.2 \n", + "996 0.186596 5.5 False 5.05 4.5 \n", + "997 0.591939 6.2 False 5.60 5.2 \n", + "998 NaN 4.6 False 3.90 6.6 \n", + "999 0.225747 4.3 False 3.20 6.3 \n", + "\n", + " Final_Rating Hidden_Patterns \n", + "0 7.6625 There is no hidden pattern here... \n", + "1 6.5625 There is no hidden pattern here... \n", + "2 6.6375 There is no hidden pattern here... \n", + "3 6.4625 There is no hidden pattern here... \n", + "4 5.1250 There is no hidden pattern here... \n", + ".. ... ... \n", + "995 5.8125 There is no hidden pattern here... \n", + "996 4.9125 There is no hidden pattern here... \n", + "997 5.5000 There is no hidden pattern here... \n", + "998 4.5750 There is no hidden pattern here... \n", + "999 3.9750 There is no hidden pattern here... \n", + "\n", + "[1000 rows x 20 columns]" ] }, - "execution_count": 33, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "groupby_object.sum().sort_values(by= \"Director\", ascending=False)" + "df" ] }, { "cell_type": "code", - "execution_count": null, - "id": "f255bb16", + "execution_count": 47, + "id": "39efeacf", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "movies_with_hidden_pattern = df[df[\"Hidden_Patterns\"] == \"It has a hidden pattern\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "bdf8a8cf", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "8 The Lost City of Z\n", + "55 Silence\n", + "100 Legend\n", + "161 Free Fire\n", + "186 Billy Lynn's Long Halftime Walk\n", + "231 A Kind of Murder\n", + "247 20th Century Women\n", + "273 Sing Street\n", + "278 Everybody Wants Some!!\n", + "288 Masterminds\n", + "305 Inherent Vice\n", + "353 Café Society\n", + "392 Steve Jobs\n", + "471 Marie Antoinette\n", + "475 Eddie the Eagle\n", + "476 The Lives of Others\n", + "501 Carol\n", + "519 Half of a Yellow Sun\n", + "551 Loving\n", + "579 All Good Things\n", + "588 Sunshine\n", + "677 Love, Rosie\n", + "679 The Age of Shadows\n", + "810 Turbo Kid\n", + "823 Christine\n", + "866 Indignation\n", + "886 The Tree of Life\n", + "897 The Fall\n", + "949 Kicks\n", + "967 The Walk\n", + "Name: Title, dtype: object" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "movies_with_hidden_pattern[\"Title\"]" + ] } ], "metadata": {