<jupyter_start><jupyter_text>Coursera Capstone Project - Week 3 Task  Scraping Data from Wikipedia<jupyter_code>import pandas as pd
from collections import Counter
url='https://en.wikipedia.org/wiki/List_of_postal_codes_of_Canada:_M'
table=pd.read_html(url)
table[0]


checktable1=table[0]['Borough']!='Not assigned'
df_checked1=df[checktable]
df_checked1
print('Number of rows: ',df_checked1.shape[0])
print('Number of columns: ',df_checked1.shape[1])<jupyter_output>Number of rows:  103
Number of columns:  3
{'fraction_non_alphanumeric': 0.11764705882352941, 'fraction_numerical': 0.027450980392156862, 'mean_word_length': 8.290909090909091, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '548575', 'license': 'MIT', 'n_tokens_mistral': 191, 'n_tokens_neox': 182, 'n_words': 39, 'path': 'Coursera_Capstone_Week_3.ipynb', 'repo_name': 'mj409897/Coursera_Capstone', 'size': '510'}