{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import ast\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "credits = pd.read_csv('tmdb_5000_credits.csv')\n", "movies = pd.read_csv('tmdb_5000_movies.csv')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | movie_id | \n", "title | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|
0 | \n", "19995 | \n", "Avatar | \n", "[{\"cast_id\": 242, \"character\": \"Jake Sully\", \"... | \n", "[{\"credit_id\": \"52fe48009251416c750aca23\", \"de... | \n", "
1 | \n", "285 | \n", "Pirates of the Caribbean: At World's End | \n", "[{\"cast_id\": 4, \"character\": \"Captain Jack Spa... | \n", "[{\"credit_id\": \"52fe4232c3a36847f800b579\", \"de... | \n", "
2 | \n", "206647 | \n", "Spectre | \n", "[{\"cast_id\": 1, \"character\": \"James Bond\", \"cr... | \n", "[{\"credit_id\": \"54805967c3a36829b5002c41\", \"de... | \n", "
3 | \n", "49026 | \n", "The Dark Knight Rises | \n", "[{\"cast_id\": 2, \"character\": \"Bruce Wayne / Ba... | \n", "[{\"credit_id\": \"52fe4781c3a36847f81398c3\", \"de... | \n", "
4 | \n", "49529 | \n", "John Carter | \n", "[{\"cast_id\": 5, \"character\": \"John Carter\", \"c... | \n", "[{\"credit_id\": \"52fe479ac3a36847f813eaa3\", \"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", "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", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "237000000 | \n", "[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam... | \n", "http://www.avatarmovie.com/ | \n", "19995 | \n", "[{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":... | \n", "en | \n", "Avatar | \n", "In the 22nd century, a paraplegic Marine is di... | \n", "150.437577 | \n", "[{\"name\": \"Ingenious Film Partners\", \"id\": 289... | \n", "[{\"iso_3166_1\": \"US\", \"name\": \"United States o... | \n", "2009-12-10 | \n", "2787965087 | \n", "162.0 | \n", "[{\"iso_639_1\": \"en\", \"name\": \"English\"}, {\"iso... | \n", "Released | \n", "Enter the World of Pandora. | \n", "Avatar | \n", "7.2 | \n", "11800 | \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", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "237000000 | \n", "[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam... | \n", "http://www.avatarmovie.com/ | \n", "19995 | \n", "[{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":... | \n", "en | \n", "Avatar | \n", "In the 22nd century, a paraplegic Marine is di... | \n", "150.437577 | \n", "[{\"name\": \"Ingenious Film Partners\", \"id\": 289... | \n", "... | \n", "162.0 | \n", "[{\"iso_639_1\": \"en\", \"name\": \"English\"}, {\"iso... | \n", "Released | \n", "Enter the World of Pandora. | \n", "Avatar | \n", "7.2 | \n", "11800 | \n", "19995 | \n", "[{\"cast_id\": 242, \"character\": \"Jake Sully\", \"... | \n", "[{\"credit_id\": \"52fe48009251416c750aca23\", \"de... | \n", "
1 rows × 23 columns
\n", "\n", " | movie_id | \n", "title | \n", "overview | \n", "genres | \n", "keywords | \n", "cast | \n", "crew | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "19995 | \n", "Avatar | \n", "In the 22nd century, a paraplegic Marine is di... | \n", "[{\"id\": 28, \"name\": \"Action\"}, {\"id\": 12, \"nam... | \n", "[{\"id\": 1463, \"name\": \"culture clash\"}, {\"id\":... | \n", "[{\"cast_id\": 242, \"character\": \"Jake Sully\", \"... | \n", "[{\"credit_id\": \"52fe48009251416c750aca23\", \"de... | \n", "
\n", " | movie_id | \n", "title | \n", "overview | \n", "tags | \n", "
---|---|---|---|---|
0 | \n", "19995 | \n", "Avatar | \n", "In the 22nd century, a paraplegic Marine is di... | \n", "action adventure fantasy science fiction cultu... | \n", "
1 | \n", "285 | \n", "Pirates of the Caribbean: At World's End | \n", "Captain Barbossa, long believed to be dead, ha... | \n", "adventure fantasy action ocean drug abuse exot... | \n", "
2 | \n", "206647 | \n", "Spectre | \n", "A cryptic message from Bond’s past sends him o... | \n", "action adventure crime spy based on novel secr... | \n", "
3 | \n", "49026 | \n", "The Dark Knight Rises | \n", "Following the death of District Attorney Harve... | \n", "action crime drama thriller dc comics crime fi... | \n", "
4 | \n", "49529 | \n", "John Carter | \n", "John Carter is a war-weary, former military ca... | \n", "action adventure science fiction based on nove... | \n", "