{ "cells": [ { "cell_type": "code", "execution_count": 44, "id": "fb59da4f", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 45, "id": "179cef88", "metadata": {}, "outputs": [], "source": [ "movies = pd.read_csv('tmdb_5000_movies.csv')\n", "credits = pd.read_csv('tmdb_5000_credits.csv')" ] }, { "cell_type": "code", "execution_count": 46, "id": "09abf78f", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | budget | \n", "genres | \n", "homepage | \n", "id | \n", "keywords | \n", "original_language | \n", "original_title | \n", "overview | \n", "popularity | \n", "production_companies | \n", "production_countries | \n", "release_date | \n", "revenue | \n", "runtime | \n", "spoken_languages | \n", "status | \n", "tagline | \n", "title | \n", "vote_average | \n", "vote_count | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
906 | \n", "50000000 | \n", "[{\"id\": 35, \"name\": \"Comedy\"}] | \n", "NaN | \n", "109443 | \n", "[{\"id\": 917, \"name\": \"journalism\"}, {\"id\": 413... | \n", "en | \n", "Anchorman 2: The Legend Continues | \n", "With the 70s behind him, San Diego's top rated... | \n", "38.125008 | \n", "[{\"name\": \"Paramount Pictures\", \"id\": 4}, {\"na... | \n", "[{\"iso_3166_1\": \"US\", \"name\": \"United States o... | \n", "2013-12-18 | \n", "173649015 | \n", "119.0 | \n", "[{\"iso_639_1\": \"en\", \"name\": \"English\"}] | \n", "Released | \n", "It's kind of a big deal | \n", "Anchorman 2: The Legend Continues | \n", "6.0 | \n", "923 | \n", "
\n", " | movie_id | \n", "title | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|
1064 | \n", "2636 | \n", "The Specialist | \n", "[{\"cast_id\": 8, \"character\": \"Ray Quick\", \"cre... | \n", "[{\"credit_id\": \"52fe4361c3a36847f804fd57\", \"de... | \n", "
\n", " | budget | \n", "genres | \n", "homepage | \n", "id | \n", "keywords | \n", "original_language | \n", "original_title | \n", "overview | \n", "popularity | \n", "production_companies | \n", "... | \n", "runtime | \n", "spoken_languages | \n", "status | \n", "tagline | \n", "title | \n", "vote_average | \n", "vote_count | \n", "movie_id | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1462 | \n", "35000000 | \n", "[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 80, \"nam... | \n", "NaN | \n", "9702 | \n", "[{\"id\": 2400, \"name\": \"juvenile prison\"}, {\"id... | \n", "en | \n", "Bound by Honor | \n", "Based on the true life experiences of poet Jim... | \n", "9.122828 | \n", "[{\"name\": \"Hollywood Pictures\", \"id\": 915}] | \n", "... | \n", "180.0 | \n", "[{\"iso_639_1\": \"en\", \"name\": \"English\"}] | \n", "Released | \n", "An epic story of three brothers. Bound by bloo... | \n", "Bound by Honor | \n", "7.7 | \n", "115 | \n", "9702 | \n", "[{\"cast_id\": 1, \"character\": \"Miklo\", \"credit_... | \n", "[{\"credit_id\": \"52fe451ec3a36847f80bd943\", \"de... | \n", "
1 rows × 23 columns
\n", "\n", " | title | \n", "movie_id | \n", "overview | \n", "genres | \n", "keywords | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|---|---|---|
4235 | \n", "The Ballad of Jack and Rose | \n", "17113 | \n", "Jack Slavin is an environmentalist with a hear... | \n", "[{\"id\": 18, \"name\": \"Drama\"}] | \n", "[{\"id\": 293, \"name\": \"female nudity\"}, {\"id\": ... | \n", "[{\"cast_id\": 1, \"character\": \"Jack Slavin\", \"c... | \n", "[{\"credit_id\": \"52fe47069251416c7508b6c1\", \"de... | \n", "
4228 | \n", "Spellbound | \n", "4174 | \n", "When Dr. Anthony Edwardes arrives at a Vermont... | \n", "[{\"id\": 18, \"name\": \"Drama\"}, {\"id\": 9648, \"na... | \n", "[{\"id\": 1453, \"name\": \"amnesia\"}, {\"id\": 4924,... | \n", "[{\"cast_id\": 7, \"character\": \"Dr. Constance Pe... | \n", "[{\"credit_id\": \"52fe43b0c3a36847f8067e55\", \"de... | \n", "
\n", " | title | \n", "movie_id | \n", "overview | \n", "genres | \n", "keywords | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|---|---|---|
1783 | \n", "Paul Blart: Mall Cop | \n", "14560 | \n", "Mild-mannered Paul Blart (Kevin James) has alw... | \n", "[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam... | \n", "[{\"id\": 41180, \"name\": \"security guard\"}, {\"id... | \n", "[{\"cast_id\": 1, \"character\": \"Paul Blart\", \"cr... | \n", "[{\"credit_id\": \"58dd4d1c92514111f7000e9f\", \"de... | \n", "
548 | \n", "Snake Eyes | \n", "8688 | \n", "All bets are off when corrupt homicide cop Ric... | \n", "[{\"id\": 80, \"name\": \"Crime\"}, {\"id\": 9648, \"na... | \n", "[{\"id\": 585, \"name\": \"casino\"}, {\"id\": 2339, \"... | \n", "[{\"cast_id\": 1, \"character\": \"Rick Santoro\", \"... | \n", "[{\"credit_id\": \"52fe44b4c3a36847f80a5533\", \"de... | \n", "
\n", " | title | \n", "movie_id | \n", "overview | \n", "genres | \n", "keywords | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|---|---|---|
382 | \n", "Seabiscuit | \n", "4464 | \n", "True story of the undersized Depression-era ra... | \n", "[Drama, History] | \n", "[{\"id\": 643, \"name\": \"horse race\"}, {\"id\": 235... | \n", "[{\"cast_id\": 2, \"character\": \"Charles Howard\",... | \n", "[{\"credit_id\": \"566839ed9251417401002f45\", \"de... | \n", "
3189 | \n", "The Ice Pirates | \n", "10179 | \n", "The time is the distant future, where by far t... | \n", "[Action, Science Fiction, Comedy] | \n", "[{\"id\": 526, \"name\": \"rebel\"}, {\"id\": 3386, \"n... | \n", "[{\"cast_id\": 1, \"character\": \"Jason\", \"credit_... | \n", "[{\"credit_id\": \"52fe433c9251416c75008a77\", \"de... | \n", "
\n", " | title | \n", "movie_id | \n", "overview | \n", "genres | \n", "keywords | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|---|---|---|
461 | \n", "Lost in Space | \n", "2157 | \n", "The prospects for continuing life on Earth in ... | \n", "[Adventure, Family, Science Fiction] | \n", "[time travel, sabotage, deep space explorer] | \n", "[{\"cast_id\": 26, \"character\": \"Dr. Zachary Smi... | \n", "[{\"credit_id\": \"52fe433bc3a36847f80448b9\", \"de... | \n", "
3884 | \n", "Rosemary's Baby | \n", "805 | \n", "A young couple moves into an infamous New York... | \n", "[Horror, Drama, Mystery] | \n", "[anti-christ, contemporary setting, laundry, o... | \n", "[{\"cast_id\": 15, \"character\": \"Rosemary Woodho... | \n", "[{\"credit_id\": \"52fe4279c3a36847f802156d\", \"de... | \n", "
\n", " | title | \n", "movie_id | \n", "overview | \n", "genres | \n", "keywords | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "Avatar | \n", "19995 | \n", "In the 22nd century, a paraplegic Marine is di... | \n", "[Action, Adventure, Fantasy, Science Fiction] | \n", "[culture clash, future, space war, space colon... | \n", "[Sam Worthington, Zoe Saldana, Sigourney Weaver] | \n", "[{\"credit_id\": \"52fe48009251416c750aca23\", \"de... | \n", "
1 | \n", "Pirates of the Caribbean: At World's End | \n", "285 | \n", "Captain Barbossa, long believed to be dead, ha... | \n", "[Adventure, Fantasy, Action] | \n", "[ocean, drug abuse, exotic island, east india ... | \n", "[Johnny Depp, Orlando Bloom, Keira Knightley] | \n", "[{\"credit_id\": \"52fe4232c3a36847f800b579\", \"de... | \n", "
2 | \n", "Spectre | \n", "206647 | \n", "A cryptic message from Bond’s past sends him o... | \n", "[Action, Adventure, Crime] | \n", "[spy, based on novel, secret agent, sequel, mi... | \n", "[Daniel Craig, Christoph Waltz, Léa Seydoux] | \n", "[{\"credit_id\": \"54805967c3a36829b5002c41\", \"de... | \n", "
3 | \n", "The Dark Knight Rises | \n", "49026 | \n", "Following the death of District Attorney Harve... | \n", "[Action, Crime, Drama, Thriller] | \n", "[dc comics, crime fighter, terrorist, secret i... | \n", "[Christian Bale, Michael Caine, Gary Oldman] | \n", "[{\"credit_id\": \"52fe4781c3a36847f81398c3\", \"de... | \n", "
4 | \n", "John Carter | \n", "49529 | \n", "John Carter is a war-weary, former military ca... | \n", "[Action, Adventure, Science Fiction] | \n", "[based on novel, mars, medallion, space travel... | \n", "[Taylor Kitsch, Lynn Collins, Samantha Morton] | \n", "[{\"credit_id\": \"52fe479ac3a36847f813eaa3\", \"de... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
4804 | \n", "El Mariachi | \n", "9367 | \n", "El Mariachi just wants to play his guitar and ... | \n", "[Action, Crime, Thriller] | \n", "[united states–mexico barrier, legs, arms, pap... | \n", "[Carlos Gallardo, Jaime de Hoyos, Peter Marqua... | \n", "[{\"credit_id\": \"52fe44eec3a36847f80b280b\", \"de... | \n", "
4805 | \n", "Newlyweds | \n", "72766 | \n", "A newlywed couple's honeymoon is upended by th... | \n", "[Comedy, Romance] | \n", "[] | \n", "[Edward Burns, Kerry Bishé, Marsha Dietlein] | \n", "[{\"credit_id\": \"52fe487dc3a368484e0fb013\", \"de... | \n", "
4806 | \n", "Signed, Sealed, Delivered | \n", "231617 | \n", "\"Signed, Sealed, Delivered\" introduces a dedic... | \n", "[Comedy, Drama, Romance, TV Movie] | \n", "[date, love at first sight, narration, investi... | \n", "[Eric Mabius, Kristin Booth, Crystal Lowe] | \n", "[{\"credit_id\": \"52fe4df3c3a36847f8275ecf\", \"de... | \n", "
4807 | \n", "Shanghai Calling | \n", "126186 | \n", "When ambitious New York attorney Sam is sent t... | \n", "[] | \n", "[] | \n", "[Daniel Henney, Eliza Coupe, Bill Paxton] | \n", "[{\"credit_id\": \"52fe4ad9c3a368484e16a36b\", \"de... | \n", "
4808 | \n", "My Date with Drew | \n", "25975 | \n", "Ever since the second grade when he first saw ... | \n", "[Documentary] | \n", "[obsession, camcorder, crush, dream girl] | \n", "[Drew Barrymore, Brian Herzlinger, Corey Feldman] | \n", "[{\"credit_id\": \"58ce021b9251415a390165d9\", \"de... | \n", "
4806 rows × 7 columns
\n", "\n", " | title | \n", "movie_id | \n", "overview | \n", "genres | \n", "keywords | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "Avatar | \n", "19995 | \n", "[In, the, 22nd, century,, a, paraplegic, Marin... | \n", "[Action, Adventure, Fantasy, Science Fiction] | \n", "[culture clash, future, space war, space colon... | \n", "[Sam Worthington, Zoe Saldana, Sigourney Weaver] | \n", "[James Cameron] | \n", "
1 | \n", "Pirates of the Caribbean: At World's End | \n", "285 | \n", "[Captain, Barbossa,, long, believed, to, be, d... | \n", "[Adventure, Fantasy, Action] | \n", "[ocean, drug abuse, exotic island, east india ... | \n", "[Johnny Depp, Orlando Bloom, Keira Knightley] | \n", "[Gore Verbinski] | \n", "
2 | \n", "Spectre | \n", "206647 | \n", "[A, cryptic, message, from, Bond’s, past, send... | \n", "[Action, Adventure, Crime] | \n", "[spy, based on novel, secret agent, sequel, mi... | \n", "[Daniel Craig, Christoph Waltz, Léa Seydoux] | \n", "[Sam Mendes] | \n", "
3 | \n", "The Dark Knight Rises | \n", "49026 | \n", "[Following, the, death, of, District, Attorney... | \n", "[Action, Crime, Drama, Thriller] | \n", "[dc comics, crime fighter, terrorist, secret i... | \n", "[Christian Bale, Michael Caine, Gary Oldman] | \n", "[Christopher Nolan] | \n", "
4 | \n", "John Carter | \n", "49529 | \n", "[John, Carter, is, a, war-weary,, former, mili... | \n", "[Action, Adventure, Science Fiction] | \n", "[based on novel, mars, medallion, space travel... | \n", "[Taylor Kitsch, Lynn Collins, Samantha Morton] | \n", "[Andrew Stanton] | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
4804 | \n", "El Mariachi | \n", "9367 | \n", "[El, Mariachi, just, wants, to, play, his, gui... | \n", "[Action, Crime, Thriller] | \n", "[united states–mexico barrier, legs, arms, pap... | \n", "[Carlos Gallardo, Jaime de Hoyos, Peter Marqua... | \n", "[Robert Rodriguez] | \n", "
4805 | \n", "Newlyweds | \n", "72766 | \n", "[A, newlywed, couple's, honeymoon, is, upended... | \n", "[Comedy, Romance] | \n", "[] | \n", "[Edward Burns, Kerry Bishé, Marsha Dietlein] | \n", "[Edward Burns] | \n", "
4806 | \n", "Signed, Sealed, Delivered | \n", "231617 | \n", "[\"Signed,, Sealed,, Delivered\", introduces, a,... | \n", "[Comedy, Drama, Romance, TV Movie] | \n", "[date, love at first sight, narration, investi... | \n", "[Eric Mabius, Kristin Booth, Crystal Lowe] | \n", "[Scott Smith] | \n", "
4807 | \n", "Shanghai Calling | \n", "126186 | \n", "[When, ambitious, New, York, attorney, Sam, is... | \n", "[] | \n", "[] | \n", "[Daniel Henney, Eliza Coupe, Bill Paxton] | \n", "[Daniel Hsia] | \n", "
4808 | \n", "My Date with Drew | \n", "25975 | \n", "[Ever, since, the, second, grade, when, he, fi... | \n", "[Documentary] | \n", "[obsession, camcorder, crush, dream girl] | \n", "[Drew Barrymore, Brian Herzlinger, Corey Feldman] | \n", "[Brian Herzlinger] | \n", "
4806 rows × 7 columns
\n", "\n", " | title | \n", "movie_id | \n", "overview | \n", "genres | \n", "keywords | \n", "cast | \n", "crew | \n", "tags | \n", "
---|---|---|---|---|---|---|---|---|
0 | \n", "Avatar | \n", "19995 | \n", "[In, the, 22nd, century,, a, paraplegic, Marin... | \n", "[Action, Adventure, Fantasy, ScienceFiction] | \n", "[cultureclash, future, spacewar, spacecolony, ... | \n", "[SamWorthington, ZoeSaldana, SigourneyWeaver] | \n", "[JamesCameron] | \n", "[In, the, 22nd, century,, a, paraplegic, Marin... | \n", "
1 | \n", "Pirates of the Caribbean: At World's End | \n", "285 | \n", "[Captain, Barbossa,, long, believed, to, be, d... | \n", "[Adventure, Fantasy, Action] | \n", "[ocean, drugabuse, exoticisland, eastindiatrad... | \n", "[JohnnyDepp, OrlandoBloom, KeiraKnightley] | \n", "[GoreVerbinski] | \n", "[Captain, Barbossa,, long, believed, to, be, d... | \n", "
2 | \n", "Spectre | \n", "206647 | \n", "[A, cryptic, message, from, Bond’s, past, send... | \n", "[Action, Adventure, Crime] | \n", "[spy, basedonnovel, secretagent, sequel, mi6, ... | \n", "[DanielCraig, ChristophWaltz, LéaSeydoux] | \n", "[SamMendes] | \n", "[A, cryptic, message, from, Bond’s, past, send... | \n", "
3 | \n", "The Dark Knight Rises | \n", "49026 | \n", "[Following, the, death, of, District, Attorney... | \n", "[Action, Crime, Drama, Thriller] | \n", "[dccomics, crimefighter, terrorist, secretiden... | \n", "[ChristianBale, MichaelCaine, GaryOldman] | \n", "[ChristopherNolan] | \n", "[Following, the, death, of, District, Attorney... | \n", "
4 | \n", "John Carter | \n", "49529 | \n", "[John, Carter, is, a, war-weary,, former, mili... | \n", "[Action, Adventure, ScienceFiction] | \n", "[basedonnovel, mars, medallion, spacetravel, p... | \n", "[TaylorKitsch, LynnCollins, SamanthaMorton] | \n", "[AndrewStanton] | \n", "[John, Carter, is, a, war-weary,, former, mili... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
4804 | \n", "El Mariachi | \n", "9367 | \n", "[El, Mariachi, just, wants, to, play, his, gui... | \n", "[Action, Crime, Thriller] | \n", "[unitedstates–mexicobarrier, legs, arms, paper... | \n", "[CarlosGallardo, JaimedeHoyos, PeterMarquardt] | \n", "[RobertRodriguez] | \n", "[El, Mariachi, just, wants, to, play, his, gui... | \n", "
4805 | \n", "Newlyweds | \n", "72766 | \n", "[A, newlywed, couple's, honeymoon, is, upended... | \n", "[Comedy, Romance] | \n", "[] | \n", "[EdwardBurns, KerryBishé, MarshaDietlein] | \n", "[EdwardBurns] | \n", "[A, newlywed, couple's, honeymoon, is, upended... | \n", "
4806 | \n", "Signed, Sealed, Delivered | \n", "231617 | \n", "[\"Signed,, Sealed,, Delivered\", introduces, a,... | \n", "[Comedy, Drama, Romance, TVMovie] | \n", "[date, loveatfirstsight, narration, investigat... | \n", "[EricMabius, KristinBooth, CrystalLowe] | \n", "[ScottSmith] | \n", "[\"Signed,, Sealed,, Delivered\", introduces, a,... | \n", "
4807 | \n", "Shanghai Calling | \n", "126186 | \n", "[When, ambitious, New, York, attorney, Sam, is... | \n", "[] | \n", "[] | \n", "[DanielHenney, ElizaCoupe, BillPaxton] | \n", "[DanielHsia] | \n", "[When, ambitious, New, York, attorney, Sam, is... | \n", "
4808 | \n", "My Date with Drew | \n", "25975 | \n", "[Ever, since, the, second, grade, when, he, fi... | \n", "[Documentary] | \n", "[obsession, camcorder, crush, dreamgirl] | \n", "[DrewBarrymore, BrianHerzlinger, CoreyFeldman] | \n", "[BrianHerzlinger] | \n", "[Ever, since, the, second, grade, when, he, fi... | \n", "
4806 rows × 8 columns
\n", "\n", " | title | \n", "movie_id | \n", "tags | \n", "
---|---|---|---|
0 | \n", "Avatar | \n", "19995 | \n", "in the 22nd century, a paraplegic marine is di... | \n", "
1 | \n", "Pirates of the Caribbean: At World's End | \n", "285 | \n", "captain barbossa, long believed to be dead, ha... | \n", "
2 | \n", "Spectre | \n", "206647 | \n", "a cryptic message from bond’s past sends him o... | \n", "
3 | \n", "The Dark Knight Rises | \n", "49026 | \n", "following the death of district attorney harve... | \n", "
4 | \n", "John Carter | \n", "49529 | \n", "john carter is a war-weary, former military ca... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "
4804 | \n", "El Mariachi | \n", "9367 | \n", "el mariachi just wants to play his guitar and ... | \n", "
4805 | \n", "Newlyweds | \n", "72766 | \n", "a newlywed couple's honeymoon is upended by th... | \n", "
4806 | \n", "Signed, Sealed, Delivered | \n", "231617 | \n", "\"signed, sealed, delivered\" introduces a dedic... | \n", "
4807 | \n", "Shanghai Calling | \n", "126186 | \n", "when ambitious new york attorney sam is sent t... | \n", "
4808 | \n", "My Date with Drew | \n", "25975 | \n", "ever since the second grade when he first saw ... | \n", "
4806 rows × 3 columns
\n", "