File size: 8,037 Bytes
9cff1e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
3271545
9cff1e5
 
 
 
 
 
 
 
 
3271545
 
 
 
 
 
 
 
 
 
 
9cff1e5
 
 
 
 
 
 
 
 
 
 
 
 
3271545
 
 
 
 
 
 
 
 
 
 
9cff1e5
 
3271545
9cff1e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
{
 "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": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>year</th>\n",
       "      <th>title</th>\n",
       "      <th>url</th>\n",
       "      <th>text</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>2023</td>\n",
       "      <td>\"MIT Technology Review\"</td>\n",
       "      <td>\"https://www.technologyreview.com\"</td>\n",
       "      <td>\"Featured Topics Newsletters Events Podcasts F...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>2023</td>\n",
       "      <td>\"WIRED - The Latest in Technology, Science, Cu...</td>\n",
       "      <td>\"https://www.wired.com\"</td>\n",
       "      <td>\"Open Navigation Menu To revisit this article,...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2019</td>\n",
       "      <td>\"The Verge\"</td>\n",
       "      <td>\"https://www.theverge.com\"</td>\n",
       "      <td>\"The Verge homepage The Verge The Verge logo.\\...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>2023</td>\n",
       "      <td>\"TechCrunch | Startup and Technology News\"</td>\n",
       "      <td>\"https://www.techcrunch.com\"</td>\n",
       "      <td>\"WeWork reportedly on the verge of filing for ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>2022</td>\n",
       "      <td>\"A new vision of artificial intelligence for t...</td>\n",
       "      <td>\"https://www.technologyreview.com/2022/04/22/1...</td>\n",
       "      <td>\"Featured Topics Newsletters Events Podcasts A...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>2022</td>\n",
       "      <td>\"The scientist who co-created CRISPR isn’t rul...</td>\n",
       "      <td>\"https://www.technologyreview.com/2022/04/26/1...</td>\n",
       "      <td>\"Featured Topics Newsletters Events Podcasts F...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6</td>\n",
       "      <td>2022</td>\n",
       "      <td>\"These fast, cheap tests could help us coexist...</td>\n",
       "      <td>\"https://www.technologyreview.com/2022/04/27/1...</td>\n",
       "      <td>\"Featured Topics Newsletters Events Podcasts F...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>7</td>\n",
       "      <td>2022</td>\n",
       "      <td>\"Tackling multiple tasks with a single visual ...</td>\n",
       "      <td>\"http://www.deepmind.com/blog/tackling-multipl...</td>\n",
       "      <td>\"DeepMind Search Search Close DeepMind About O...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8</td>\n",
       "      <td>2019</td>\n",
       "      <td>\"About - Google DeepMind\"</td>\n",
       "      <td>\"https://www.deepmind.com/about\"</td>\n",
       "      <td>\"DeepMind Search Search Close DeepMind About O...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>9</td>\n",
       "      <td>2023</td>\n",
       "      <td>\"Blog - Google DeepMind\"</td>\n",
       "      <td>\"https://www.deepmind.com/blog-categories/appl...</td>\n",
       "      <td>\"DeepMind Search Search Close DeepMind About O...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "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
}