{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# This is a test-script that loads the dataset." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# %pip install datasets\n", "from datasets import load_dataset\n", "import pandas as pd\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "dt = load_dataset(\"siavava/ai-tech-articles\")\n" ] }, { "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
idyeartitleurltext
002023\"MIT Technology Review\"\"https://www.technologyreview.com\"\"Featured Topics Newsletters Events Podcasts F...
112023\"WIRED - The Latest in Technology, Science, Cu...\"https://www.wired.com\"\"Open Navigation Menu To revisit this article,...
222019\"The Verge\"\"https://www.theverge.com\"\"The Verge homepage The Verge The Verge logo.\\...
332023\"TechCrunch | Startup and Technology News\"\"https://www.techcrunch.com\"\"WeWork reportedly on the verge of filing for ...
442022\"A new vision of artificial intelligence for t...\"https://www.technologyreview.com/2022/04/22/1...\"Featured Topics Newsletters Events Podcasts A...
552022\"The scientist who co-created CRISPR isn’t rul...\"https://www.technologyreview.com/2022/04/26/1...\"Featured Topics Newsletters Events Podcasts F...
662022\"These fast, cheap tests could help us coexist...\"https://www.technologyreview.com/2022/04/27/1...\"Featured Topics Newsletters Events Podcasts F...
772022\"Tackling multiple tasks with a single visual ...\"http://www.deepmind.com/blog/tackling-multipl...\"DeepMind Search Search Close DeepMind About O...
882019\"About - Google DeepMind\"\"https://www.deepmind.com/about\"\"DeepMind Search Search Close DeepMind About O...
992023\"Blog - Google DeepMind\"\"https://www.deepmind.com/blog-categories/appl...\"DeepMind Search Search Close DeepMind About O...
\n", "
" ], "text/plain": [ " id year title \\\n", "0 0 2023 \"MIT Technology Review\" \n", "1 1 2023 \"WIRED - The Latest in Technology, Science, Cu... \n", "2 2 2019 \"The Verge\" \n", "3 3 2023 \"TechCrunch | Startup and Technology News\" \n", "4 4 2022 \"A new vision of artificial intelligence for t... \n", "5 5 2022 \"The scientist who co-created CRISPR isn’t rul... \n", "6 6 2022 \"These fast, cheap tests could help us coexist... \n", "7 7 2022 \"Tackling multiple tasks with a single visual ... \n", "8 8 2019 \"About - Google DeepMind\" \n", "9 9 2023 \"Blog - Google DeepMind\" \n", "\n", " url \\\n", "0 \"https://www.technologyreview.com\" \n", "1 \"https://www.wired.com\" \n", "2 \"https://www.theverge.com\" \n", "3 \"https://www.techcrunch.com\" \n", "4 \"https://www.technologyreview.com/2022/04/22/1... \n", "5 \"https://www.technologyreview.com/2022/04/26/1... \n", "6 \"https://www.technologyreview.com/2022/04/27/1... \n", "7 \"http://www.deepmind.com/blog/tackling-multipl... \n", "8 \"https://www.deepmind.com/about\" \n", "9 \"https://www.deepmind.com/blog-categories/appl... \n", "\n", " text \n", "0 \"Featured Topics Newsletters Events Podcasts F... \n", "1 \"Open Navigation Menu To revisit this article,... \n", "2 \"The Verge homepage The Verge The Verge logo.\\... \n", "3 \"WeWork reportedly on the verge of filing for ... \n", "4 \"Featured Topics Newsletters Events Podcasts A... \n", "5 \"Featured Topics Newsletters Events Podcasts F... \n", "6 \"Featured Topics Newsletters Events Podcasts F... \n", "7 \"DeepMind Search Search Close DeepMind About O... \n", "8 \"DeepMind Search Search Close DeepMind About O... \n", "9 \"DeepMind Search Search Close DeepMind About O... " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = dt[\"train\"].to_pandas()\n", "df.head(10)\n" ] } ], "metadata": { "kernelspec": { "display_name": "data-mining", "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.5" } }, "nbformat": 4, "nbformat_minor": 2 }