mirror of
https://github.com/wassname/scrape_r_rational.git
synced 2026-09-09 11:33:49 +08:00
dedup tags
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
+14
-13
@@ -9,7 +9,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -19,7 +19,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -491,7 +491,7 @@
|
||||
"[13412 rows x 24 columns]"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -515,7 +515,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 41,
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -529,9 +529,10 @@
|
||||
"d[\"url\"] = d[\"url\"].apply(lambda x: collapsibe('...', urls2a(x)))\n",
|
||||
"d[\"score\"] = d[\"score\"].round(2)\n",
|
||||
"\n",
|
||||
"d['tags'] = d['tags'].apply(lambda x: \", \".join(x))\n",
|
||||
"d['reviews_quotes'] = d['reviews_quotes'].apply(lambda x: \"- \" + \"<br> - \".join(x))\n",
|
||||
"d['if_you_liked_x_you_will_like_this'] = d['if_you_liked_x_you_will_like_this'].apply(lambda x: \", \".join(x))\n",
|
||||
"# TODO unique\n",
|
||||
"d['tags'] = d['tags'].apply(lambda x: \", \".join(unique_elements(x)))\n",
|
||||
"d['reviews_quotes'] = d['reviews_quotes'].apply(lambda x: \"- \" + \"<br> - \".join(unique_elements(x)))\n",
|
||||
"d['if_you_liked_x_you_will_like_this'] = d['if_you_liked_x_you_will_like_this'].apply(lambda x: \", \".join(unique_elements(x)))\n",
|
||||
"\n",
|
||||
"# prefix = 'https://reddit.com/r/rational/comments/'\n",
|
||||
"prefix = 'https://reddit.com'\n",
|
||||
@@ -548,7 +549,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 42,
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -578,7 +579,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 43,
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -635,7 +636,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 44,
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -687,7 +688,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 45,
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -1151,7 +1152,7 @@
|
||||
"[13412 rows x 24 columns]"
|
||||
]
|
||||
},
|
||||
"execution_count": 45,
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -1163,7 +1164,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 46,
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user