diff --git "a/Generate Pure Datasets Movielens.ipynb" "b/Generate Pure Datasets Movielens.ipynb" deleted file mode 100644--- "a/Generate Pure Datasets Movielens.ipynb" +++ /dev/null @@ -1 +0,0 @@ -{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyMqCpROKvtivG+i6ok8PYeN"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":1,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"9iYd7Xs-76kj","executionInfo":{"status":"ok","timestamp":1723702342782,"user_tz":-420,"elapsed":27935,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"7d4cfa67-9a58-44f6-cd24-258b60f42f0a"},"outputs":[{"output_type":"stream","name":"stdout","text":["Mounted at /content/drive\n"]}],"source":["# prompt: mount google drive\n","\n","from google.colab import drive\n","drive.mount('/content/drive')"]},{"cell_type":"code","source":["# prompt: import pandas and numpy, then load dataset from google drive in folder \"Disertasi S3/DatasetCore\"\n","\n","import pandas as pd\n","import numpy as np\n","import json\n","import files"],"metadata":{"id":"IRzzvAiV8a8K","executionInfo":{"status":"ok","timestamp":1723702346053,"user_tz":-420,"elapsed":811,"user":{"displayName":"komik lu","userId":"03876213071376330190"}}},"execution_count":2,"outputs":[]},{"cell_type":"code","source":["pathCore = \"/content/drive/My Drive/Disertasi S3/DatasetCore\"\n","\n","dsCore = {}\n","dsCore[\"items\"] = pd.read_csv(pathCore + \"/movies.csv\")\n","dsCore[\"interactions\"] = pd.read_csv(pathCore + \"/ratings.csv\")\n","dsCore[\"tags\"] = pd.read_csv(pathCore + \"/tags.csv\")\n","dsCore[\"links\"] = pd.read_csv(pathCore + \"/links.csv\")\n","\n","# Generate new data\n","dsCore[\"users\"] = pd.DataFrame(dsCore[\"interactions\"][\"userId\"].unique(), columns=[\"userId\"]);\n","\n","dsCore[\"genres\"] = pd.DataFrame(dsCore[\"items\"][\"genres\"].str.split('|').explode('genres').unique(), columns=[\"genre\"])\n","dsCore[\"genres\"][\"genreId\"] = range(0, len(dsCore[\"genres\"]))\n","\n","# Extract year from title\n","dsCore[\"items\"][[\"title\", \"year\"]] = dsCore[\"items\"][\"title\"].str.extract('(.*)\\((\\d+)\\)')\n","# Remove trailing whitespace from title\n","dsCore[\"items\"][\"title\"] = dsCore[\"items\"][\"title\"].str.strip()\n","\n","# Create a list to store the mappings\n","movieId_genreId_mappings = []\n","\n","# Iterate over each movie and its genres\n","for _, row in dsCore[\"items\"].iterrows():\n"," movieId = row[\"movieId\"]\n"," genres = row[\"genres\"].split('|')\n"," for genre in genres:\n"," genreId = dsCore[\"genres\"][dsCore[\"genres\"][\"genre\"] == genre][\"genreId\"].values[0]\n"," movieId_genreId_mappings.append({\"movieId\": movieId, \"genreId\": genreId})\n","\n","# Create a new DataFrame from the mappings\n","dsCore[\"movieGenres\"] = pd.DataFrame(movieId_genreId_mappings)\n","\n","# Remove the genres column from dsCore[\"items\"]\n","dsCore[\"items\"] = dsCore[\"items\"].drop(\"genres\", axis=1)\n","movieId_genreId_mappings.clear()"],"metadata":{"id":"qNWuEd_J9IwK","executionInfo":{"status":"ok","timestamp":1723702363862,"user_tz":-420,"elapsed":15783,"user":{"displayName":"komik lu","userId":"03876213071376330190"}}},"execution_count":3,"outputs":[]},{"cell_type":"code","source":["pathDetailItem = \"/content/drive/My Drive/Disertasi S3/Datasets2\"\n","\n","dsDetailItem = {}\n","dsDetailItem[\"items\"] = pd.read_csv(pathDetailItem + \"/movies_metadata.csv\", low_memory=True)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"EClXVDO7Z2Ro","executionInfo":{"status":"ok","timestamp":1723702370453,"user_tz":-420,"elapsed":3758,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"af31f04d-ca70-4b65-a227-fcb57bbd359e"},"execution_count":4,"outputs":[{"output_type":"stream","name":"stderr","text":[":4: DtypeWarning: Columns (10) have mixed types. Specify dtype option on import or set low_memory=False.\n"," dsDetailItem[\"items\"] = pd.read_csv(pathDetailItem + \"/movies_metadata.csv\", low_memory=True)\n"]}]},{"cell_type":"code","source":["# Merge the two DataFrames on 'original_title' and 'title'\n","dsCore[\"items\"] = dsCore[\"items\"].merge(dsDetailItem[\"items\"][['adult', 'overview', 'popularity', 'poster_path', 'production_companies',\n"," 'production_countries', 'release_date', 'revenue', 'runtime',\n"," 'spoken_languages', 'vote_average', 'vote_count', 'original_title']],\n"," left_on='title', right_on='original_title', how='inner')\n","\n","# Drop the 'original_title' column as it's no longer needed\n","dsCore[\"items\"] = dsCore[\"items\"].drop('original_title', axis=1)\n","\n","dsCore[\"items\"] = dsCore[\"items\"].dropna()\n","dsDetailItem[\"items\"].iloc[0:0]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":98},"id":"IdrCx7b2cjh3","executionInfo":{"status":"ok","timestamp":1723702457025,"user_tz":-420,"elapsed":373,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"4600a1a5-b317-48d1-d24f-feb71cc8eff2"},"execution_count":5,"outputs":[{"output_type":"execute_result","data":{"text/plain":["Empty DataFrame\n","Columns: [adult, belongs_to_collection, budget, genres, homepage, id, imdb_id, original_language, original_title, overview, popularity, poster_path, production_companies, production_countries, release_date, revenue, runtime, spoken_languages, status, tagline, title, video, vote_average, vote_count]\n","Index: []\n","\n","[0 rows x 24 columns]"],"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","
adultbelongs_to_collectionbudgetgenreshomepageidimdb_idoriginal_languageoriginal_titleoverview...release_daterevenueruntimespoken_languagesstatustaglinetitlevideovote_averagevote_count
\n","

0 rows × 24 columns

\n","
\n","
\n","\n","
\n"," \n","\n"," \n","\n"," \n","
\n","\n","\n","
\n","
\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe"}},"metadata":{},"execution_count":5}]},{"cell_type":"code","source":["# Get the list of valid movieIds from dsCore[\"items\"]\n","valid_movie_ids = set(dsCore[\"items\"][\"movieId\"].unique())\n","\n","# Filter dsCore[\"interactions\"] to keep only rows with valid movieIds\n","dsCore[\"interactions\"] = dsCore[\"interactions\"][dsCore[\"interactions\"][\"movieId\"].isin(valid_movie_ids)]\n","\n","# Filter dsCore[\"tags\"] to keep only rows with valid movieIds\n","dsCore[\"tags\"] = dsCore[\"tags\"][dsCore[\"tags\"][\"movieId\"].isin(valid_movie_ids)]\n","\n","# Filter dsCore[\"links\"] to keep only rows with valid movieIds\n","dsCore[\"links\"] = dsCore[\"links\"][dsCore[\"links\"][\"movieId\"].isin(valid_movie_ids)]\n","\n","# Filter dsCore[\"movieGenres\"] to keep only rows with valid movieIds\n","dsCore[\"movieGenres\"] = dsCore[\"movieGenres\"][dsCore[\"movieGenres\"][\"movieId\"].isin(valid_movie_ids)]"],"metadata":{"id":"w6jycGc0i1zp","executionInfo":{"status":"ok","timestamp":1723702469404,"user_tz":-420,"elapsed":347,"user":{"displayName":"komik lu","userId":"03876213071376330190"}}},"execution_count":6,"outputs":[]},{"cell_type":"code","source":["pathReviewItem = \"/content/drive/My Drive/Disertasi S3/Datasets\"\n","\n","dsReviewItem = {}\n","with open(pathReviewItem + \"/reviews.json\") as json_file:\n"," data = json_file.readlines()\n"," # this line below may take at least 8-10 minutes of processing for 4-5 million rows. It converts all strings in list to actual json objects.\n"," data = list(map(json.loads, data))\n","\n","dsCore[\"reviews\"] = pd.DataFrame(data)\n","data.clear()"],"metadata":{"id":"TrF_JB76lZpV","executionInfo":{"status":"ok","timestamp":1723702594457,"user_tz":-420,"elapsed":121613,"user":{"displayName":"komik lu","userId":"03876213071376330190"}}},"execution_count":7,"outputs":[]},{"cell_type":"code","source":["# prompt: remove all rows from dsReviewItem[\"reviews\"] that value of item_id not containing in dsCore[\"items\"] on column movieId\n","\n","# Filter dsReviewItem[\"reviews\"] to keep only rows with valid movieIds\n","dsCore[\"reviews\"] = dsCore[\"reviews\"][dsCore[\"reviews\"][\"item_id\"].isin(valid_movie_ids)]"],"metadata":{"id":"Hiy0UWLWoxM-","executionInfo":{"status":"ok","timestamp":1723702600993,"user_tz":-420,"elapsed":906,"user":{"displayName":"komik lu","userId":"03876213071376330190"}}},"execution_count":8,"outputs":[]},{"cell_type":"markdown","source":["## Views DS Core\n","Table viewer of dataset core"],"metadata":{"id":"gPs_EWyd-P0V"}},{"cell_type":"code","source":["# prompt: Check how many row has NaN\n","\n","# Check for NaN values in each column of each DataFrame\n","for key, df in dsCore.items():\n"," print(f\"DataFrame '{key}':\")\n"," print(df.isna().sum())\n"," print(\"----\")\n"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"c4-Mo90Fgh57","executionInfo":{"status":"ok","timestamp":1723702607399,"user_tz":-420,"elapsed":853,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"71acc339-dafe-4f53-e096-15476bec38e7"},"execution_count":9,"outputs":[{"output_type":"stream","name":"stdout","text":["DataFrame 'items':\n","movieId 0\n","title 0\n","year 0\n","adult 0\n","overview 0\n","popularity 0\n","poster_path 0\n","production_companies 0\n","production_countries 0\n","release_date 0\n","revenue 0\n","runtime 0\n","spoken_languages 0\n","vote_average 0\n","vote_count 0\n","dtype: int64\n","----\n","DataFrame 'interactions':\n","userId 0\n","movieId 0\n","rating 0\n","timestamp 0\n","dtype: int64\n","----\n","DataFrame 'tags':\n","userId 0\n","movieId 0\n","tag 0\n","timestamp 0\n","dtype: int64\n","----\n","DataFrame 'links':\n","movieId 0\n","imdbId 0\n","tmdbId 3\n","dtype: int64\n","----\n","DataFrame 'users':\n","userId 0\n","dtype: int64\n","----\n","DataFrame 'genres':\n","genre 0\n","genreId 0\n","dtype: int64\n","----\n","DataFrame 'movieGenres':\n","movieId 0\n","genreId 0\n","dtype: int64\n","----\n","DataFrame 'reviews':\n","item_id 0\n","txt 0\n","dtype: int64\n","----\n"]}]},{"cell_type":"code","source":["dsCore[\"items\"]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":1000},"id":"XeKOX1MW-BdH","executionInfo":{"status":"ok","timestamp":1723702607827,"user_tz":-420,"elapsed":429,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"0e404774-573d-460f-da6e-23fbb847a087"},"execution_count":10,"outputs":[{"output_type":"execute_result","data":{"text/plain":[" movieId title year adult \\\n","0 1 Toy Story 1995 False \n","1 2 Jumanji 1995 False \n","2 3 Grumpier Old Men 1995 False \n","3 4 Waiting to Exhale 1995 False \n","4 5 Father of the Bride Part II 1995 False \n","... ... ... ... ... \n","7557 177765 Coco 2017 False \n","7558 180263 The Shining 1997 False \n","7559 183199 Quest 2017 False \n","7560 186587 Rampage 2018 False \n","7561 186587 Rampage 2018 False \n","\n"," overview popularity \\\n","0 Led by Woody, Andy's toys live happily in his ... 21.946943 \n","1 When siblings Judy and Peter discover an encha... 17.015539 \n","2 A family wedding reignites the ancient feud be... 11.7129 \n","3 Cheated on, mistreated and stepped on, the wom... 3.859495 \n","4 Just when George Banks has recovered from his ... 8.387519 \n","... ... ... \n","7557 Coco is a French comedy released in 2009 and p... 5.587649 \n","7558 Jack Torrance accepts a caretaker job at the O... 19.611589 \n","7559 A being made of sand wakes up in the desert. I... 0.213612 \n","7560 Rampage delves into the subject of legal insan... 2.946078 \n","7561 The boredom of small town life is eating Bill ... 5.085308 \n","\n"," poster_path \\\n","0 /rhIRbceoE9lR4veEXuwCC2wARtG.jpg \n","1 /vzmL6fP7aPKNKPRTFnZmiUfciyV.jpg \n","2 /6ksm1sjKMFLbO7UY2i6G1ju9SML.jpg \n","3 /16XOMpEaLWkrcPqSQqhTmeJuqQl.jpg \n","4 /e64sOI48hQXyru7naBFyssKFxVd.jpg \n","... ... \n","7557 /5OGNyaEnkjftMhvTfq6VaSVUA4H.jpg \n","7558 /9fgh3Ns1iRzlQNYuJyK0ARQZU7w.jpg \n","7559 /n7J10Oa6yv4xfyVaAprXNY49Kwe.jpg \n","7560 /8o0WyZOxZl04jk1hMXsqgMilfGT.jpg \n","7561 /xl1q07RVwYKbkngd4eL145cBaUP.jpg \n","\n"," production_companies \\\n","0 [{'name': 'Pixar Animation Studios', 'id': 3}] \n","1 [{'name': 'TriStar Pictures', 'id': 559}, {'na... \n","2 [{'name': 'Warner Bros.', 'id': 6194}, {'name'... \n","3 [{'name': 'Twentieth Century Fox Film Corporat... \n","4 [{'name': 'Sandollar Productions', 'id': 5842}... \n","... ... \n","7557 [{'name': 'Légende Films', 'id': 22997}] \n","7558 [{'name': 'Hawk Films', 'id': 88}, {'name': 'W... \n","7559 [] \n","7560 [{'name': 'De Laurentiis Entertainment Group (... \n","7561 [{'name': 'Boll Kino Beteiligungs GmbH & Co. K... \n","\n"," production_countries release_date \\\n","0 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-10-30 \n","1 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-12-15 \n","2 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-12-22 \n","3 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-12-22 \n","4 [{'iso_3166_1': 'US', 'name': 'United States o... 1995-02-10 \n","... ... ... \n","7557 [{'iso_3166_1': 'FR', 'name': 'France'}] 2009-07-21 \n","7558 [{'iso_3166_1': 'US', 'name': 'United States o... 1980-05-22 \n","7559 [{'iso_3166_1': 'DE', 'name': 'Germany'}] 1996-01-01 \n","7560 [{'iso_3166_1': 'US', 'name': 'United States o... 1987-09-01 \n","7561 [{'iso_3166_1': 'CA', 'name': 'Canada'}, {'iso... 2009-08-14 \n","\n"," revenue runtime spoken_languages \\\n","0 373554033.0 81.0 [{'iso_639_1': 'en', 'name': 'English'}] \n","1 262797249.0 104.0 [{'iso_639_1': 'en', 'name': 'English'}, {'iso... \n","2 0.0 101.0 [{'iso_639_1': 'en', 'name': 'English'}] \n","3 81452156.0 127.0 [{'iso_639_1': 'en', 'name': 'English'}] \n","4 76578911.0 106.0 [{'iso_639_1': 'en', 'name': 'English'}] \n","... ... ... ... \n","7557 0.0 95.0 [{'iso_639_1': 'fr', 'name': 'Français'}] \n","7558 44017374.0 144.0 [{'iso_639_1': 'en', 'name': 'English'}] \n","7559 0.0 12.0 [{'iso_639_1': 'xx', 'name': 'No Language'}] \n","7560 796368.0 97.0 [{'iso_639_1': 'en', 'name': 'English'}] \n","7561 0.0 85.0 [{'iso_639_1': 'en', 'name': 'English'}] \n","\n"," vote_average vote_count \n","0 7.7 5415.0 \n","1 6.9 2413.0 \n","2 6.5 92.0 \n","3 6.1 34.0 \n","4 5.7 173.0 \n","... ... ... \n","7557 4.4 121.0 \n","7558 8.1 3890.0 \n","7559 6.7 3.0 \n","7560 6.5 11.0 \n","7561 6.0 132.0 \n","\n","[7539 rows x 15 columns]"],"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","
movieIdtitleyearadultoverviewpopularityposter_pathproduction_companiesproduction_countriesrelease_daterevenueruntimespoken_languagesvote_averagevote_count
01Toy Story1995FalseLed by Woody, Andy's toys live happily in his ...21.946943/rhIRbceoE9lR4veEXuwCC2wARtG.jpg[{'name': 'Pixar Animation Studios', 'id': 3}][{'iso_3166_1': 'US', 'name': 'United States o...1995-10-30373554033.081.0[{'iso_639_1': 'en', 'name': 'English'}]7.75415.0
12Jumanji1995FalseWhen siblings Judy and Peter discover an encha...17.015539/vzmL6fP7aPKNKPRTFnZmiUfciyV.jpg[{'name': 'TriStar Pictures', 'id': 559}, {'na...[{'iso_3166_1': 'US', 'name': 'United States o...1995-12-15262797249.0104.0[{'iso_639_1': 'en', 'name': 'English'}, {'iso...6.92413.0
23Grumpier Old Men1995FalseA family wedding reignites the ancient feud be...11.7129/6ksm1sjKMFLbO7UY2i6G1ju9SML.jpg[{'name': 'Warner Bros.', 'id': 6194}, {'name'...[{'iso_3166_1': 'US', 'name': 'United States o...1995-12-220.0101.0[{'iso_639_1': 'en', 'name': 'English'}]6.592.0
34Waiting to Exhale1995FalseCheated on, mistreated and stepped on, the wom...3.859495/16XOMpEaLWkrcPqSQqhTmeJuqQl.jpg[{'name': 'Twentieth Century Fox Film Corporat...[{'iso_3166_1': 'US', 'name': 'United States o...1995-12-2281452156.0127.0[{'iso_639_1': 'en', 'name': 'English'}]6.134.0
45Father of the Bride Part II1995FalseJust when George Banks has recovered from his ...8.387519/e64sOI48hQXyru7naBFyssKFxVd.jpg[{'name': 'Sandollar Productions', 'id': 5842}...[{'iso_3166_1': 'US', 'name': 'United States o...1995-02-1076578911.0106.0[{'iso_639_1': 'en', 'name': 'English'}]5.7173.0
................................................
7557177765Coco2017FalseCoco is a French comedy released in 2009 and p...5.587649/5OGNyaEnkjftMhvTfq6VaSVUA4H.jpg[{'name': 'Légende Films', 'id': 22997}][{'iso_3166_1': 'FR', 'name': 'France'}]2009-07-210.095.0[{'iso_639_1': 'fr', 'name': 'Français'}]4.4121.0
7558180263The Shining1997FalseJack Torrance accepts a caretaker job at the O...19.611589/9fgh3Ns1iRzlQNYuJyK0ARQZU7w.jpg[{'name': 'Hawk Films', 'id': 88}, {'name': 'W...[{'iso_3166_1': 'US', 'name': 'United States o...1980-05-2244017374.0144.0[{'iso_639_1': 'en', 'name': 'English'}]8.13890.0
7559183199Quest2017FalseA being made of sand wakes up in the desert. I...0.213612/n7J10Oa6yv4xfyVaAprXNY49Kwe.jpg[][{'iso_3166_1': 'DE', 'name': 'Germany'}]1996-01-010.012.0[{'iso_639_1': 'xx', 'name': 'No Language'}]6.73.0
7560186587Rampage2018FalseRampage delves into the subject of legal insan...2.946078/8o0WyZOxZl04jk1hMXsqgMilfGT.jpg[{'name': 'De Laurentiis Entertainment Group (...[{'iso_3166_1': 'US', 'name': 'United States o...1987-09-01796368.097.0[{'iso_639_1': 'en', 'name': 'English'}]6.511.0
7561186587Rampage2018FalseThe boredom of small town life is eating Bill ...5.085308/xl1q07RVwYKbkngd4eL145cBaUP.jpg[{'name': 'Boll Kino Beteiligungs GmbH & Co. K...[{'iso_3166_1': 'CA', 'name': 'Canada'}, {'iso...2009-08-140.085.0[{'iso_639_1': 'en', 'name': 'English'}]6.0132.0
\n","

7539 rows × 15 columns

\n","
\n","
\n","\n","
\n"," \n","\n"," \n","\n"," \n","
\n","\n","\n","
\n"," \n","\n","\n","\n"," \n","
\n","\n","
\n","
\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","summary":"{\n \"name\": \"dsCore[\\\"items\\\"]\",\n \"rows\": 7539,\n \"fields\": [\n {\n \"column\": \"movieId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 51795,\n \"min\": 1,\n \"max\": 189111,\n \"num_unique_values\": 6336,\n \"samples\": [\n 2518,\n 3979,\n 5445\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"title\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 6127,\n \"samples\": [\n \"Mystery Men\",\n \"Scooby-Doo! and the Samurai Sword\",\n \"Underworld: Rise of the Lycans\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"year\",\n \"properties\": {\n \"dtype\": \"object\",\n \"num_unique_values\": 99,\n \"samples\": [\n \"2016\",\n \"1961\",\n \"1903\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"adult\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"True\",\n \"False\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"overview\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 6961,\n \"samples\": [\n \"Clifford Peach (Chris Makepeace), an easygoing teenager, is finding less than easy to fit in at his new high school, where a tough-talking bully (Matt Dillon) terrorizes his classmates and extorts their lunch money. Refusing to pay up, Clifford enlist the aid of an overgrown misfit whose mere presence intimidates students and teachers alike. But their \\\"business relationship\\\" soon turns personal as Clifford and the troubled loner forge a winning alliance against their intimidators - and a very special friendship with each other. Ruth Gordon, Martin Mull, Joan Cusack and John Houseman round out \\\"a truly remarkable cast\\\" (Variety) in this delightful coming-of-age comedy and triumphant tribute to the underdog.\",\n \"A former mental patient's repressed anger reaches the boiling point, leading him to embark on a mission of revenge against the thugs who once subjected him to severe physical and mental trauma.\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"popularity\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 6975,\n \"samples\": [\n 7.290872,\n 6.85606\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"poster_path\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 6973,\n \"samples\": [\n \"/uu62T87qkLkapeuu7ArlnQ6tAap.jpg\",\n \"/2h00HrZs89SL3tXB4nbkiM7BKHs.jpg\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"production_companies\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 4707,\n \"samples\": [\n \"[{'name': 'Interscope Communications', 'id': 10201}]\",\n \"[{'name': 'Dog Pond Productions', 'id': 4302}, {'name': 'Focus Productions Inc.', 'id': 33798}, {'name': 'Carros Pictures', 'id': 33799}]\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"production_countries\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 493,\n \"samples\": [\n \"[{'iso_3166_1': 'CA', 'name': 'Canada'}, {'iso_3166_1': 'HK', 'name': 'Hong Kong'}, {'iso_3166_1': 'TW', 'name': 'Taiwan'}, {'iso_3166_1': 'US', 'name': 'United States of America'}]\",\n \"[{'iso_3166_1': 'GB', 'name': 'United Kingdom'}, {'iso_3166_1': 'US', 'name': 'United States of America'}, {'iso_3166_1': 'JP', 'name': 'Japan'}]\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"release_date\",\n \"properties\": {\n \"dtype\": \"object\",\n \"num_unique_values\": 4901,\n \"samples\": [\n \"2017-05-19\",\n \"2008-10-01\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"revenue\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 137498771.25760904,\n \"min\": 0.0,\n \"max\": 2787965087.0,\n \"num_unique_values\": 3555,\n \"samples\": [\n 2279000.0,\n 3065860.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"runtime\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 33.96882200114929,\n \"min\": 0.0,\n \"max\": 877.0,\n \"num_unique_values\": 232,\n \"samples\": [\n 540.0,\n 135.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"spoken_languages\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 520,\n \"samples\": [\n \"[{'iso_639_1': 'hu', 'name': 'Magyar'}, {'iso_639_1': 'en', 'name': 'English'}, {'iso_639_1': 'fr', 'name': 'Fran\\u00e7ais'}]\",\n \"[{'iso_639_1': 'ar', 'name': '\\u0627\\u0644\\u0639\\u0631\\u0628\\u064a\\u0629'}, {'iso_639_1': 'en', 'name': 'English'}, {'iso_639_1': 'tr', 'name': 'T\\u00fcrk\\u00e7e'}]\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"vote_average\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.1900457255071981,\n \"min\": 0.0,\n \"max\": 10.0,\n \"num_unique_values\": 76,\n \"samples\": [\n 5.7,\n 5.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"vote_count\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1007.3841709098413,\n \"min\": 0.0,\n \"max\": 14075.0,\n \"num_unique_values\": 1544,\n \"samples\": [\n 669.0,\n 1241.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"}},"metadata":{},"execution_count":10}]},{"cell_type":"code","source":["dsCore[\"interactions\"]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":423},"id":"68XHfUJN-Xo3","executionInfo":{"status":"ok","timestamp":1723702607827,"user_tz":-420,"elapsed":23,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"e17b3dde-58e4-47f4-d8f9-e21680ac74f2"},"execution_count":11,"outputs":[{"output_type":"execute_result","data":{"text/plain":[" userId movieId rating timestamp\n","0 1 1 4.0 964982703\n","1 1 3 4.0 964981247\n","2 1 6 4.0 964982224\n","5 1 70 3.0 964982400\n","6 1 101 5.0 964980868\n","... ... ... ... ...\n","100830 610 166528 4.0 1493879365\n","100831 610 166534 4.0 1493848402\n","100833 610 168250 5.0 1494273047\n","100834 610 168252 5.0 1493846352\n","100835 610 170875 3.0 1493846415\n","\n","[70468 rows x 4 columns]"],"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","
userIdmovieIdratingtimestamp
0114.0964982703
1134.0964981247
2164.0964982224
51703.0964982400
611015.0964980868
...............
1008306101665284.01493879365
1008316101665344.01493848402
1008336101682505.01494273047
1008346101682525.01493846352
1008356101708753.01493846415
\n","

70468 rows × 4 columns

\n","
\n","
\n","\n","
\n"," \n","\n"," \n","\n"," \n","
\n","\n","\n","
\n"," \n","\n","\n","\n"," \n","
\n","\n","
\n","
\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","summary":"{\n \"name\": \"dsCore[\\\"interactions\\\"]\",\n \"rows\": 70468,\n \"fields\": [\n {\n \"column\": \"userId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 182,\n \"min\": 1,\n \"max\": 610,\n \"num_unique_values\": 610,\n \"samples\": [\n 82,\n 219,\n 56\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"movieId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 36230,\n \"min\": 1,\n \"max\": 189111,\n \"num_unique_values\": 6325,\n \"samples\": [\n 3990,\n 6188,\n 764\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"rating\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.0454214189682098,\n \"min\": 0.5,\n \"max\": 5.0,\n \"num_unique_values\": 10,\n \"samples\": [\n 2.5,\n 3.0,\n 3.5\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"timestamp\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 217281264,\n \"min\": 828124615,\n \"max\": 1537799250,\n \"num_unique_values\": 61053,\n \"samples\": [\n 1053623881,\n 1516151579,\n 996216735\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"}},"metadata":{},"execution_count":11}]},{"cell_type":"code","source":["dsCore[\"users\"]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":423},"id":"PQNo_Qxs_YUO","executionInfo":{"status":"ok","timestamp":1723702607828,"user_tz":-420,"elapsed":23,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"e27bc73f-481f-4feb-ad3b-3b8cdac3caf3"},"execution_count":12,"outputs":[{"output_type":"execute_result","data":{"text/plain":[" userId\n","0 1\n","1 2\n","2 3\n","3 4\n","4 5\n",".. ...\n","605 606\n","606 607\n","607 608\n","608 609\n","609 610\n","\n","[610 rows x 1 columns]"],"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","
userId
01
12
23
34
45
......
605606
606607
607608
608609
609610
\n","

610 rows × 1 columns

\n","
\n","
\n","\n","
\n"," \n","\n"," \n","\n"," \n","
\n","\n","\n","
\n"," \n","\n","\n","\n"," \n","
\n","\n","
\n","
\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","summary":"{\n \"name\": \"dsCore[\\\"users\\\"]\",\n \"rows\": 610,\n \"fields\": [\n {\n \"column\": \"userId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 176,\n \"min\": 1,\n \"max\": 610,\n \"num_unique_values\": 610,\n \"samples\": [\n 82,\n 219,\n 56\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"}},"metadata":{},"execution_count":12}]},{"cell_type":"code","source":["dsCore[\"tags\"]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":423},"id":"2xazdLmI_fm9","executionInfo":{"status":"ok","timestamp":1723702607828,"user_tz":-420,"elapsed":21,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"b03d3f18-0a99-4c29-d041-ff186ba8fb40"},"execution_count":13,"outputs":[{"output_type":"execute_result","data":{"text/plain":[" userId movieId tag timestamp\n","0 2 60756 funny 1445714994\n","1 2 60756 Highly quotable 1445714996\n","2 2 60756 will ferrell 1445714992\n","3 2 89774 Boxing story 1445715207\n","4 2 89774 MMA 1445715200\n","... ... ... ... ...\n","3671 599 2959 violent 1498456914\n","3673 606 1357 music 1176765393\n","3674 606 1948 British 1177512649\n","3675 606 3578 Romans 1173212944\n","3676 606 5694 70mm 1175638092\n","\n","[2503 rows x 4 columns]"],"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","
userIdmovieIdtagtimestamp
0260756funny1445714994
1260756Highly quotable1445714996
2260756will ferrell1445714992
3289774Boxing story1445715207
4289774MMA1445715200
...............
36715992959violent1498456914
36736061357music1176765393
36746061948British1177512649
36756063578Romans1173212944
3676606569470mm1175638092
\n","

2503 rows × 4 columns

\n","
\n","
\n","\n","
\n"," \n","\n"," \n","\n"," \n","
\n","\n","\n","
\n"," \n","\n","\n","\n"," \n","
\n","\n","
\n","
\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","summary":"{\n \"name\": \"dsCore[\\\"tags\\\"]\",\n \"rows\": 2503,\n \"fields\": [\n {\n \"column\": \"userId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 159,\n \"min\": 2,\n \"max\": 606,\n \"num_unique_values\": 45,\n \"samples\": [\n 537,\n 356,\n 357\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"movieId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 43460,\n \"min\": 1,\n \"max\": 174055,\n \"num_unique_values\": 1031,\n \"samples\": [\n 46972,\n 3897,\n 288\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"tag\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 1248,\n \"samples\": [\n \"camp\",\n \"pizza beer\",\n \"faerie tale\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"timestamp\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 170749103,\n \"min\": 1137179352,\n \"max\": 1537094688,\n \"num_unique_values\": 2329,\n \"samples\": [\n 1252898620,\n 1137181153,\n 1262795852\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"}},"metadata":{},"execution_count":13}]},{"cell_type":"code","source":["dsCore[\"links\"]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":423},"id":"-JEWgbZf_kih","executionInfo":{"status":"ok","timestamp":1723702607828,"user_tz":-420,"elapsed":20,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"f0ee55b6-462e-4001-d1d9-d01053e2cd27"},"execution_count":14,"outputs":[{"output_type":"execute_result","data":{"text/plain":[" movieId imdbId tmdbId\n","0 1 114709 862.0\n","1 2 113497 8844.0\n","2 3 113228 15602.0\n","3 4 114885 31357.0\n","4 5 113041 11862.0\n","... ... ... ...\n","9676 183199 6149818 432987.0\n","9691 184349 453047 22916.0\n","9696 184931 1137450 395990.0\n","9706 186587 2231461 427641.0\n","9719 189111 5359048 525662.0\n","\n","[6336 rows x 3 columns]"],"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","
movieIdimdbIdtmdbId
01114709862.0
121134978844.0
2311322815602.0
3411488531357.0
4511304111862.0
............
96761831996149818432987.0
969118434945304722916.0
96961849311137450395990.0
97061865872231461427641.0
97191891115359048525662.0
\n","

6336 rows × 3 columns

\n","
\n","
\n","\n","
\n"," \n","\n"," \n","\n"," \n","
\n","\n","\n","
\n"," \n","\n","\n","\n"," \n","
\n","\n","
\n","
\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","summary":"{\n \"name\": \"dsCore[\\\"links\\\"]\",\n \"rows\": 6336,\n \"fields\": [\n {\n \"column\": \"movieId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 51594,\n \"min\": 1,\n \"max\": 189111,\n \"num_unique_values\": 6336,\n \"samples\": [\n 2702,\n 4178,\n 5780\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"imdbId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1063550,\n \"min\": 439,\n \"max\": 7158814,\n \"num_unique_values\": 6336,\n \"samples\": [\n 162677,\n 31742,\n 82926\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"tmdbId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 93387.08176960479,\n \"min\": 2.0,\n \"max\": 525662.0,\n \"num_unique_values\": 6332,\n \"samples\": [\n 54138.0,\n 22102.0,\n 20829.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"}},"metadata":{},"execution_count":14}]},{"cell_type":"code","source":["dsCore[\"genres\"].head(5)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":206},"id":"NrAS6xWuAUoG","executionInfo":{"status":"ok","timestamp":1723702607828,"user_tz":-420,"elapsed":19,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"bac06dd7-bbf4-45f4-e09b-76fe441984b8"},"execution_count":15,"outputs":[{"output_type":"execute_result","data":{"text/plain":[" genre genreId\n","0 Adventure 0\n","1 Animation 1\n","2 Children 2\n","3 Comedy 3\n","4 Fantasy 4"],"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","
genregenreId
0Adventure0
1Animation1
2Children2
3Comedy3
4Fantasy4
\n","
\n","
\n","\n","
\n"," \n","\n"," \n","\n"," \n","
\n","\n","\n","
\n"," \n","\n","\n","\n"," \n","
\n","\n","
\n","
\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","summary":"{\n \"name\": \"dsCore[\\\"genres\\\"]\",\n \"rows\": 5,\n \"fields\": [\n {\n \"column\": \"genre\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 5,\n \"samples\": [\n \"Animation\",\n \"Fantasy\",\n \"Children\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"genreId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 0,\n \"max\": 4,\n \"num_unique_values\": 5,\n \"samples\": [\n 1,\n 4,\n 2\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"}},"metadata":{},"execution_count":15}]},{"cell_type":"code","source":["dsCore[\"movieGenres\"]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":423},"id":"dsvBZ3AlGPkj","executionInfo":{"status":"ok","timestamp":1723702607828,"user_tz":-420,"elapsed":16,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"66880d7f-f8ee-4bc6-eab1-a9df46145f28"},"execution_count":16,"outputs":[{"output_type":"execute_result","data":{"text/plain":[" movieId genreId\n","0 1 0\n","1 1 1\n","2 1 2\n","3 1 3\n","4 1 4\n","... ... ...\n","21978 184931 9\n","22000 186587 7\n","22001 186587 0\n","22002 186587 12\n","22038 189111 15\n","\n","[14324 rows x 2 columns]"],"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","
movieIdgenreId
010
111
212
313
414
.........
219781849319
220001865877
220011865870
2200218658712
2203818911115
\n","

14324 rows × 2 columns

\n","
\n","
\n","\n","
\n"," \n","\n"," \n","\n"," \n","
\n","\n","\n","
\n"," \n","\n","\n","\n"," \n","
\n","\n","
\n","
\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","summary":"{\n \"name\": \"dsCore[\\\"movieGenres\\\"]\",\n \"rows\": 14324,\n \"fields\": [\n {\n \"column\": \"movieId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 50475,\n \"min\": 1,\n \"max\": 189111,\n \"num_unique_values\": 6336,\n \"samples\": [\n 2702,\n 4178,\n 5780\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"genreId\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 3,\n \"min\": 0,\n \"max\": 19,\n \"num_unique_values\": 20,\n \"samples\": [\n 0,\n 17,\n 15\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"}},"metadata":{},"execution_count":16}]},{"cell_type":"code","source":["dsCore[\"reviews\"]"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":423},"id":"wYRCUybBp3K6","executionInfo":{"status":"ok","timestamp":1723702607828,"user_tz":-420,"elapsed":15,"user":{"displayName":"komik lu","userId":"03876213071376330190"}},"outputId":"8654241f-6dc7-4830-9bdc-568f7531229a"},"execution_count":17,"outputs":[{"output_type":"execute_result","data":{"text/plain":[" item_id txt\n","3 3739 I'm still starry-eyed from it; I saw this last...\n","4 1562 Failed on every Front; Joel Schumacher who did...\n","5 8977 Poor Casting, Poor script Poor direction.; I h...\n","6 2174 An Accomplished Tim Burton Movie; A Great Idea...\n","11 2997 Good, But Not For Everyone; A truly original e...\n","... ... ...\n","2624598 1092 Definitely Not a Cheap Erotic Thriller; Cather...\n","2624602 592 Dark and Gothic; Tim Burton has successfully m...\n","2624603 520 Aims low, with hilarious results; ROBIN HOOD: ...\n","2624604 8640 Worst epic of 2004; I usually love big epics i...\n","2624605 1377 superb Second Movie; I was glad to see that Ti...\n","\n","[1305199 rows x 2 columns]"],"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","
item_idtxt
33739I'm still starry-eyed from it; I saw this last...
41562Failed on every Front; Joel Schumacher who did...
58977Poor Casting, Poor script Poor direction.; I h...
62174An Accomplished Tim Burton Movie; A Great Idea...
112997Good, But Not For Everyone; A truly original e...
.........
26245981092Definitely Not a Cheap Erotic Thriller; Cather...
2624602592Dark and Gothic; Tim Burton has successfully m...
2624603520Aims low, with hilarious results; ROBIN HOOD: ...
26246048640Worst epic of 2004; I usually love big epics i...
26246051377superb Second Movie; I was glad to see that Ti...
\n","

1305199 rows × 2 columns

\n","
\n","
\n","\n","
\n"," \n","\n"," \n","\n"," \n","
\n","\n","\n","
\n"," \n","\n","\n","\n"," \n","
\n","\n","
\n"," \n"," \n"," \n","
\n","\n","
\n","
\n"],"application/vnd.google.colaboratory.intrinsic+json":{"type":"dataframe","variable_name":"df"}},"metadata":{},"execution_count":17}]},{"cell_type":"markdown","source":["### Download Datasets\n","Download all pandas dataframe from object dsCore as csv"],"metadata":{"id":"cYd12kUMsOTt"}},{"cell_type":"code","source":["# prompt: download all pandas dataframe on dsCore\n","\n","for key, df in dsCore.items():\n"," df.to_csv(f\"{key}.csv\", index=False)"],"metadata":{"id":"BWcq6B4srzKr","executionInfo":{"status":"ok","timestamp":1723702813523,"user_tz":-420,"elapsed":81791,"user":{"displayName":"komik lu","userId":"03876213071376330190"}}},"execution_count":18,"outputs":[]},{"cell_type":"code","source":["# prompt: Copy file reviews.csv to MyDrive\n","\n","!cp reviews.csv /content/drive/MyDrive\n"],"metadata":{"id":"jsRTCa2BulyZ","executionInfo":{"status":"ok","timestamp":1723703485408,"user_tz":-420,"elapsed":61365,"user":{"displayName":"komik lu","userId":"03876213071376330190"}}},"execution_count":19,"outputs":[]},{"cell_type":"code","source":["# prompt: Clear all cache and dataframe on dsCore\n","\n","# Clear all cache and dataframe on dsCore\n","for key, df in dsCore.items():\n"," df.iloc[0:0]\n","dsCore.clear()"],"metadata":{"id":"iP7_idahvDQ_","executionInfo":{"status":"ok","timestamp":1723703699700,"user_tz":-420,"elapsed":1083,"user":{"displayName":"komik lu","userId":"03876213071376330190"}}},"execution_count":21,"outputs":[]}]} \ No newline at end of file