Commit cfdb1d07 authored by Nathan's avatar Nathan 🚴

adds source to parallel apply func

parent e2dd7269
......@@ -927,6 +927,24 @@
"df['lead_type_vec'] = np.select(conditions, choices, default='NA')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"mask = (\n",
" ((df['Inactive'] == 'No') & (df['Providers'] == 0))\n",
" & ((df['Inactive'] == 'No') & (df['Providers'] < 5))\n",
" & (df['Inactive'] == 'No')\n",
" & (df['duplicate_leads']) # <-- you can also just evaluate boolean arrays\n",
" & df['bad_leads']\n",
")\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 32,
......@@ -1913,7 +1931,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## A _parallel_ apply func"
"## A _parallel_ apply func\n",
"Source: https://towardsdatascience.com/make-your-own-super-pandas-using-multiproc-1c04f41944a1"
]
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment