{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "#! pip install -r ../requirements.txt" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "links = pd.read_csv('../data/links.csv', index_col='movieId') # ids do filme y nas plataformas imdb e tmdb, util para enriquecer os dados\n", "movies = pd.read_csv('../data/movies_m100_u10.csv', index_col='movieId') # dados do filme y\n", "ratings = pd.read_csv('../data/ratings_m100_u10.csv', index_col='movieId') # avaliacao do usuario x pro filme y\n", "tags = pd.read_csv('../data/tags.csv', index_col='movieId') # n parece mto relevante" ] }, { "cell_type": "code", "execution_count": 4, "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", "
imdbIdtmdbId
movieId
1114709862.0
21134978844.0
311322815602.0
411488531357.0
511304111862.0
\n", "
" ], "text/plain": [ " imdbId tmdbId\n", "movieId \n", "1 114709 862.0\n", "2 113497 8844.0\n", "3 113228 15602.0\n", "4 114885 31357.0\n", "5 113041 11862.0" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "links.head()" ] }, { "cell_type": "code", "execution_count": 5, "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", "
titlegenres
movieId
1Toy Story (1995)Adventure|Animation|Children|Comedy|Fantasy
2Jumanji (1995)Adventure|Children|Fantasy
6Heat (1995)Action|Crime|Thriller
10GoldenEye (1995)Action|Adventure|Thriller
32Twelve Monkeys (a.k.a. 12 Monkeys) (1995)Mystery|Sci-Fi|Thriller
\n", "
" ], "text/plain": [ " title \\\n", "movieId \n", "1 Toy Story (1995) \n", "2 Jumanji (1995) \n", "6 Heat (1995) \n", "10 GoldenEye (1995) \n", "32 Twelve Monkeys (a.k.a. 12 Monkeys) (1995) \n", "\n", " genres \n", "movieId \n", "1 Adventure|Animation|Children|Comedy|Fantasy \n", "2 Adventure|Children|Fantasy \n", "6 Action|Crime|Thriller \n", "10 Action|Adventure|Thriller \n", "32 Mystery|Sci-Fi|Thriller " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "movies.head()" ] }, { "cell_type": "code", "execution_count": 6, "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", "
Unnamed: 0userIdratingtimestamp
movieId
1014.0964982703
6214.0964982224
47315.0964983815
50415.0964982931
110714.0964982176
\n", "
" ], "text/plain": [ " Unnamed: 0 userId rating timestamp\n", "movieId \n", "1 0 1 4.0 964982703\n", "6 2 1 4.0 964982224\n", "47 3 1 5.0 964983815\n", "50 4 1 5.0 964982931\n", "110 7 1 4.0 964982176" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ratings.head()" ] }, { "cell_type": "code", "execution_count": 7, "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", "
userIdtagtimestamp
movieId
607562funny1445714994
607562Highly quotable1445714996
607562will ferrell1445714992
897742Boxing story1445715207
897742MMA1445715200
\n", "
" ], "text/plain": [ " userId tag timestamp\n", "movieId \n", "60756 2 funny 1445714994\n", "60756 2 Highly quotable 1445714996\n", "60756 2 will ferrell 1445714992\n", "89774 2 Boxing story 1445715207\n", "89774 2 MMA 1445715200" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tags.head()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.4" } }, "nbformat": 4, "nbformat_minor": 2 }