Skip to content

Instantly share code, notes, and snippets.

@alfredo-g-zapiola
Created March 19, 2019 16:25
Show Gist options
  • Save alfredo-g-zapiola/84e4c686efedb07826f2a734bcb0caee to your computer and use it in GitHub Desktop.
Save alfredo-g-zapiola/84e4c686efedb07826f2a734bcb0caee to your computer and use it in GitHub Desktop.
Created on Cognitive Class Labs
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Neighbourhoods - Toronto\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Scrape https://en.wikipedia.org/wiki/List_of_postal_codes_of_Canada:_M\n",
"2. Transform data to dataframe:\n",
" i. Columns: PostalCOde, Borough, Neighborhood.\n",
" ii. Not assigned buroughs: drop row.\n",
" iii. For PostalCode, append all neighbourhoods (like a group concat)\n",
" iv. If there is borough but no neighbourhood, neighborhood = borough\n",
" v. Explain steps\n",
" vi. print df.shape\n",
"3. Submit link to Github\n",
"4. Links: http://beautiful-soup-4.readthedocs.io/en/latest/\n",
" https://www.youtube.com/watch?v=ng2o98k983k"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment