|
@@ -780,23 +780,23 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 8,
|
|
|
+ "execution_count": 32,
|
|
|
"metadata": {
|
|
|
"ExecuteTime": {
|
|
|
- "end_time": "2019-01-27T15:06:26.455863Z",
|
|
|
- "start_time": "2019-01-27T15:06:26.375634Z"
|
|
|
+ "end_time": "2019-01-27T22:00:31.196061Z",
|
|
|
+ "start_time": "2019-01-27T22:00:31.148769Z"
|
|
|
}
|
|
|
},
|
|
|
"outputs": [
|
|
|
{
|
|
|
"data": {
|
|
|
"application/vnd.jupyter.widget-view+json": {
|
|
|
- "model_id": "66c1cc01b4c34cddb206d110a76dc51a",
|
|
|
+ "model_id": "0d609788ff3c4aaa88f0891b4c86f7eb",
|
|
|
"version_major": 2,
|
|
|
"version_minor": 0
|
|
|
},
|
|
|
"text/plain": [
|
|
|
- "interactive(children=(Dropdown(description='column', options=('claps', 'days_since_publication', 'fans', 'num_…"
|
|
|
+ "interactive(children=(IntSlider(value=3000, description='x', max=5000, min=1000, step=100), Dropdown(descripti…"
|
|
|
]
|
|
|
},
|
|
|
"metadata": {},
|
|
@@ -805,9 +805,10 @@
|
|
|
],
|
|
|
"source": [
|
|
|
"@interact\n",
|
|
|
- "def show_titles_more_than(column=list(df.select_dtypes('number').columns), \n",
|
|
|
- " x=(1000, 5000, 100)):\n",
|
|
|
- " display(HTML(f'<h2>Showing articles with more than {x} {column}<h2>'))\n",
|
|
|
+ "def show_titles_more_than(x=(1000, 5000, 100),\n",
|
|
|
+ " column=list(df.select_dtypes('number').columns), \n",
|
|
|
+ " ):\n",
|
|
|
+ " # display(HTML(f'<h2>Showing articles with more than {x} {column}<h2>'))\n",
|
|
|
" display(df.loc[df[column] > x, ['title', 'published_date', 'read_time', 'tags', 'views', 'reads']])"
|
|
|
]
|
|
|
},
|