aboutsummaryrefslogtreecommitdiff
path: root/project.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'project.ipynb')
-rw-r--r--project.ipynb150
1 files changed, 68 insertions, 82 deletions
diff --git a/project.ipynb b/project.ipynb
index 7e3ffd4..c1fa63a 100644
--- a/project.ipynb
+++ b/project.ipynb
@@ -11,7 +11,7 @@
},
{
"cell_type": "code",
- "execution_count": 1104,
+ "execution_count": 1,
"metadata": {},
"outputs": [
{
@@ -31,7 +31,7 @@
"True"
]
},
- "execution_count": 1104,
+ "execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
@@ -56,7 +56,7 @@
},
{
"cell_type": "code",
- "execution_count": 1105,
+ "execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -66,7 +66,7 @@
},
{
"cell_type": "code",
- "execution_count": 1106,
+ "execution_count": 4,
"metadata": {},
"outputs": [
{
@@ -98,7 +98,7 @@
" after = None\n",
" downloaded = 0\n",
"\n",
- " def __init__(self, posts_per_subreddit=1000):\n",
+ " def __init__(self, posts_per_subreddit=100):\n",
" client_id = 'dog1LGxsD9M3bXtglOzKsQ'\n",
" client_secret = 'nc-HHPBGtz51-_r4vNLGcuCHmT39Lw'\n",
" username = 'NoSeason1949'\n",
@@ -141,13 +141,13 @@
" return self.posts\n",
"\n",
"# Fetch Data\n",
- "data_fetcher = DataFetcher(posts_per_subreddit=1000)\n",
+ "data_fetcher = DataFetcher(posts_per_subreddit=100)\n",
"data_fetcher.fetch()\n"
]
},
{
"cell_type": "code",
- "execution_count": 1107,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
@@ -182,6 +182,7 @@
" <th>title</th>\n",
" <th>link_flair_richtext</th>\n",
" <th>...</th>\n",
+ " <th>post_hint</th>\n",
" <th>preview</th>\n",
" <th>media_metadata</th>\n",
" <th>url_overridden_by_dest</th>\n",
@@ -190,7 +191,6 @@
" <th>crosspost_parent</th>\n",
" <th>is_gallery</th>\n",
" <th>gallery_data</th>\n",
- " <th>poll_data</th>\n",
" <th>call_to_action</th>\n",
" </tr>\n",
" </thead>\n",
@@ -199,14 +199,14 @@
" <th>0</th>\n",
" <td>None</td>\n",
" <td>Python</td>\n",
- " <td>Tell /r/python what you're working on this wee...</td>\n",
- " <td>t2_145f96</td>\n",
+ " <td>It's December, which means it's time for [Adve...</td>\n",
+ " <td>t2_9iikd</td>\n",
" <td>False</td>\n",
" <td>None</td>\n",
" <td>0</td>\n",
" <td>False</td>\n",
- " <td>Sunday Daily Thread: What's everyone working o...</td>\n",
- " <td>[{'e': 'text', 't': 'Daily Thread'}]</td>\n",
+ " <td>/r/Python's 2022 Advent of Code</td>\n",
+ " <td>[{'e': 'text', 't': 'News'}]</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
@@ -223,16 +223,16 @@
" <th>1</th>\n",
" <td>None</td>\n",
" <td>Python</td>\n",
- " <td>Have some burning questions on advanced Python...</td>\n",
+ " <td>Discussion of using Python in a professional e...</td>\n",
" <td>t2_145f96</td>\n",
" <td>False</td>\n",
" <td>None</td>\n",
" <td>0</td>\n",
" <td>False</td>\n",
- " <td>Tuesday Daily Thread: Advanced questions</td>\n",
+ " <td>Thursday Daily Thread: Python Careers, Courses...</td>\n",
" <td>[{'e': 'text', 't': 'Daily Thread'}]</td>\n",
" <td>...</td>\n",
- " <td>{'images': [{'source': {'url': 'https://extern...</td>\n",
+ " <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
@@ -247,15 +247,16 @@
" <th>2</th>\n",
" <td>None</td>\n",
" <td>Python</td>\n",
- " <td>You might think that's a minor change, but [ne...</td>\n",
- " <td>t2_7l8dn5ub</td>\n",
+ " <td>I just published the [Python Data Science Dece...</td>\n",
+ " <td>t2_4ei3rm7y</td>\n",
" <td>False</td>\n",
" <td>None</td>\n",
" <td>0</td>\n",
" <td>False</td>\n",
- " <td>Flake8 took down the gitlab repository in favo...</td>\n",
- " <td>[{'e': 'text', 't': 'News'}]</td>\n",
+ " <td>Python Data Science December</td>\n",
+ " <td>[{'e': 'text', 't': 'Beginner Showcase'}]</td>\n",
" <td>...</td>\n",
+ " <td>self</td>\n",
" <td>{'images': [{'source': {'url': 'https://extern...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
@@ -265,23 +266,22 @@
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
- " <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>None</td>\n",
" <td>Python</td>\n",
- " <td>It's still a POC at this point as I am explori...</td>\n",
- " <td>t2_uakheq67</td>\n",
+ " <td>Any library/framework (pygame, kivy, Ursina, e...</td>\n",
+ " <td>t2_x23yv</td>\n",
" <td>False</td>\n",
" <td>None</td>\n",
" <td>0</td>\n",
" <td>False</td>\n",
- " <td>I made a CLI tool that helps you stay up to da...</td>\n",
- " <td>[{'e': 'text', 't': 'Beginner Showcase'}]</td>\n",
+ " <td>Any open source games written in Python? Ideal...</td>\n",
+ " <td>[{'e': 'text', 't': 'Discussion'}]</td>\n",
" <td>...</td>\n",
- " <td>{'images': [{'source': {'url': 'https://extern...</td>\n",
- " <td>{'bl1t2pheqxz91': {'status': 'valid', 'e': 'Re...</td>\n",
+ " <td>NaN</td>\n",
+ " <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
@@ -295,18 +295,18 @@
" <th>4</th>\n",
" <td>None</td>\n",
" <td>Python</td>\n",
- " <td></td>\n",
- " <td>t2_110daa</td>\n",
+ " <td>Im super excited about this. I have been leari...</td>\n",
+ " <td>t2_64896tmr</td>\n",
" <td>False</td>\n",
" <td>None</td>\n",
" <td>0</td>\n",
" <td>False</td>\n",
- " <td>How to Create Python Packages for Sharing Code...</td>\n",
- " <td>[{'e': 'text', 't': 'Tutorial'}]</td>\n",
+ " <td>I made a program that takes a signal from a po...</td>\n",
+ " <td>[{'e': 'text', 't': 'Beginner Showcase'}]</td>\n",
" <td>...</td>\n",
+ " <td>self</td>\n",
" <td>{'images': [{'source': {'url': 'https://extern...</td>\n",
" <td>NaN</td>\n",
- " <td>https://youtube.com/watch?v=fT-3V8t01DE&amp;amp;fe...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
@@ -317,7 +317,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
- "<p>5 rows × 118 columns</p>\n",
+ "<p>5 rows × 117 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -329,11 +329,11 @@
"4 None Python \n",
"\n",
" selftext author_fullname saved \\\n",
- "0 Tell /r/python what you're working on this wee... t2_145f96 False \n",
- "1 Have some burning questions on advanced Python... t2_145f96 False \n",
- "2 You might think that's a minor change, but [ne... t2_7l8dn5ub False \n",
- "3 It's still a POC at this point as I am explori... t2_uakheq67 False \n",
- "4 t2_110daa False \n",
+ "0 It's December, which means it's time for [Adve... t2_9iikd False \n",
+ "1 Discussion of using Python in a professional e... t2_145f96 False \n",
+ "2 I just published the [Python Data Science Dece... t2_4ei3rm7y False \n",
+ "3 Any library/framework (pygame, kivy, Ursina, e... t2_x23yv False \n",
+ "4 Im super excited about this. I have been leari... t2_64896tmr False \n",
"\n",
" mod_reason_title gilded clicked \\\n",
"0 None 0 False \n",
@@ -343,58 +343,44 @@
"4 None 0 False \n",
"\n",
" title \\\n",
- "0 Sunday Daily Thread: What's everyone working o... \n",
- "1 Tuesday Daily Thread: Advanced questions \n",
- "2 Flake8 took down the gitlab repository in favo... \n",
- "3 I made a CLI tool that helps you stay up to da... \n",
- "4 How to Create Python Packages for Sharing Code... \n",
- "\n",
- " link_flair_richtext ... \\\n",
- "0 [{'e': 'text', 't': 'Daily Thread'}] ... \n",
- "1 [{'e': 'text', 't': 'Daily Thread'}] ... \n",
- "2 [{'e': 'text', 't': 'News'}] ... \n",
- "3 [{'e': 'text', 't': 'Beginner Showcase'}] ... \n",
- "4 [{'e': 'text', 't': 'Tutorial'}] ... \n",
- "\n",
- " preview \\\n",
- "0 NaN \n",
- "1 {'images': [{'source': {'url': 'https://extern... \n",
- "2 {'images': [{'source': {'url': 'https://extern... \n",
- "3 {'images': [{'source': {'url': 'https://extern... \n",
- "4 {'images': [{'source': {'url': 'https://extern... \n",
+ "0 /r/Python's 2022 Advent of Code \n",
+ "1 Thursday Daily Thread: Python Careers, Courses... \n",
+ "2 Python Data Science December \n",
+ "3 Any open source games written in Python? Ideal... \n",
+ "4 I made a program that takes a signal from a po... \n",
"\n",
- " media_metadata \\\n",
- "0 NaN \n",
- "1 NaN \n",
- "2 NaN \n",
- "3 {'bl1t2pheqxz91': {'status': 'valid', 'e': 'Re... \n",
- "4 NaN \n",
+ " link_flair_richtext ... post_hint \\\n",
+ "0 [{'e': 'text', 't': 'News'}] ... NaN \n",
+ "1 [{'e': 'text', 't': 'Daily Thread'}] ... NaN \n",
+ "2 [{'e': 'text', 't': 'Beginner Showcase'}] ... self \n",
+ "3 [{'e': 'text', 't': 'Discussion'}] ... NaN \n",
+ "4 [{'e': 'text', 't': 'Beginner Showcase'}] ... self \n",
"\n",
- " url_overridden_by_dest author_cakeday \\\n",
- "0 NaN NaN \n",
- "1 NaN NaN \n",
- "2 NaN NaN \n",
- "3 NaN NaN \n",
- "4 https://youtube.com/watch?v=fT-3V8t01DE&amp;fe... NaN \n",
+ " preview media_metadata \\\n",
+ "0 NaN NaN \n",
+ "1 NaN NaN \n",
+ "2 {'images': [{'source': {'url': 'https://extern... NaN \n",
+ "3 NaN NaN \n",
+ "4 {'images': [{'source': {'url': 'https://extern... NaN \n",
"\n",
- " crosspost_parent_list crosspost_parent is_gallery gallery_data poll_data \\\n",
- "0 NaN NaN NaN NaN NaN \n",
- "1 NaN NaN NaN NaN NaN \n",
- "2 NaN NaN NaN NaN NaN \n",
- "3 NaN NaN NaN NaN NaN \n",
- "4 NaN NaN NaN NaN NaN \n",
+ " url_overridden_by_dest author_cakeday crosspost_parent_list \\\n",
+ "0 NaN NaN NaN \n",
+ "1 NaN NaN NaN \n",
+ "2 NaN NaN NaN \n",
+ "3 NaN NaN NaN \n",
+ "4 NaN NaN NaN \n",
"\n",
- " call_to_action \n",
- "0 NaN \n",
- "1 NaN \n",
- "2 NaN \n",
- "3 NaN \n",
- "4 NaN \n",
+ " crosspost_parent is_gallery gallery_data call_to_action \n",
+ "0 NaN NaN NaN NaN \n",
+ "1 NaN NaN NaN NaN \n",
+ "2 NaN NaN NaN NaN \n",
+ "3 NaN NaN NaN NaN \n",
+ "4 NaN NaN NaN NaN \n",
"\n",
- "[5 rows x 118 columns]"
+ "[5 rows x 117 columns]"
]
},
- "execution_count": 1107,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}